Tech Stack
Backend
| Component | Technology |
|---|---|
| Language | Go 1.26 |
| HTTP Router | chi v5 |
| Database | PostgreSQL 16 |
| Database toolkit | sqlc — type-safe Go codegen from raw SQL |
| Migrations | golang-migrate v4 |
| Object storage | GCS or AWS S3 (pluggable) |
| CDN | CloudFront signed URLs (optional, on top of S3) |
| Amazon SES or standard SMTP (pluggable) | |
| Auth | Google OAuth2, GitHub OAuth2, scoped API keys |
| Crypto | bcrypt (passwords/keys), AES-256-GCM (token encryption) |
| Logging | zap structured logger |
| Swagger | OpenAPI 3.0 docs via swaggo |
Frontend
The frontend is a separate project located in the fluxsend-frontend repository. It is built independently and served via NGINX alongside the backend.
Documentation
| Component | Technology |
|---|---|
| Site generator | MkDocs with Material for MkDocs |
| Hosting | Docker container (NGINX-alpine) |
Infrastructure
| Component | Technology |
|---|---|
| Containerization | Docker, multi-stage builds |
| Orchestration | Docker Compose |
| Architecture | linux/amd64 and linux/arm64 |
| CI/CD | GitHub Actions |
| Registries | Docker Hub (bobaklabs/*), GitHub Container Registry (ghcr.io) |
Architecture Overview
FluxSend follows a clean layered architecture:
HTTP handlers (api/) → Service layer (service/) → Repository layer (repo/)
- Handlers handle HTTP concerns — request parsing, response formatting, status codes
- Services contain business logic — share validation, quota enforcement, plan limits
- Repositories are auto-generated by sqlc from raw SQL queries and provide data access
The backend runs two HTTP servers simultaneously:
- API server (port 3000) — serves the browser frontend, uses session-cookie authentication
- CLI server (port 8091, prefix
/api) — serves programmatic access, supports both cookie and API-key authentication with scope-based authorization
Storage and email providers follow the strategy pattern: a common interface with interchangeable implementations selected at runtime via environment variables.