No description
Find a file
Bob Parsons e021e894dd
All checks were successful
Build and Deploy / build (push) Successful in 28s
Build and Deploy / build-image (push) Successful in 10s
Build and Deploy / deploy (push) Successful in 4s
fix ports and traefik setup
2026-01-03 17:36:40 -06:00
.gitea/workflows fix env loading 2026-01-03 17:24:18 -06:00
cmd/api home page loading 2026-01-03 14:07:22 -06:00
config fix env loading 2026-01-03 17:24:18 -06:00
internal working base version 2026-01-03 16:54:29 -06:00
static working base version 2026-01-03 16:54:29 -06:00
views working base version 2026-01-03 16:54:29 -06:00
.env.example setup deploys 2026-01-03 17:05:42 -06:00
.gitignore setup deploys 2026-01-03 17:05:42 -06:00
dev.sh working base version 2026-01-03 16:54:29 -06:00
docker-compose.yml fix ports and traefik setup 2026-01-03 17:36:40 -06:00
Dockerfile fix ports and traefik setup 2026-01-03 17:36:40 -06:00
Dockerfile.ci fix ports and traefik setup 2026-01-03 17:36:40 -06:00
go.mod working base version 2026-01-03 16:54:29 -06:00
go.sum working base version 2026-01-03 16:54:29 -06:00
README.md working base version 2026-01-03 16:54:29 -06:00

BAI Project

A Go web service following clean architecture patterns with Templ templating.

Quick Start

  1. Ensure you have Go and Templ installed
  2. Run ./dev.sh to start development with live reload
  3. Access the app at http://localhost:7331 (proxied from :8080)

The dev script automatically:

  • Generates Go code from .templ files
  • Restarts the server on file changes
  • Reloads your browser automatically

Architecture

  • Framework: Fiber
  • Templates: Templ
  • Dev Tools: Templ's built-in live reload
  • Pattern: Clean architecture with dependency injection

Structure

  • cmd/api/ - Application entry point
  • config/ - Configuration management via .env
  • internal/app/ - DI container
  • internal/controllers/ - Business logic orchestration
  • internal/handlers/ - HTTP request handlers
  • internal/middleware/ - HTTP middleware
  • internal/repositories/ - Data access layer
  • internal/services/ - Business logic services
  • internal/server/ - Fiber server setup
  • views/ - Templ HTML templates

Development

# Start development server with live reload
./dev.sh

# Run tests
go test ./...

# Run linter (if golangci-lint is installed)
golangci-lint run

API Endpoints

  • GET /api/health - Health check
  • GET /api/home - Home endpoint (returns "Hello World")