web-production-saas-starter/go-b2b-starter
2025-12-19 21:17:14 +04:00
..
deps chore: Update dependencies and regenerate build artifacts. 2025-12-16 18:54:41 +04:00
docs chore: Update dependencies and regenerate build artifacts. 2025-12-16 18:54:41 +04:00
scripts chore: Update dependencies and regenerate build artifacts. 2025-12-16 18:54:41 +04:00
src refactor: abstract billing operations behind a new domain.BillingProvider interface and update services to use it. 2025-12-19 21:17:14 +04:00
.air.toml chore: Update dependencies and regenerate build artifacts. 2025-12-16 18:54:41 +04:00
.dockerignore chore: Update dependencies and regenerate build artifacts. 2025-12-16 18:54:41 +04:00
.gitlab-ci.yml chore: Update dependencies and regenerate build artifacts. 2025-12-16 18:54:41 +04:00
Dockerfile docs: Remove redundant implementations and comments 2025-12-17 21:00:38 +04:00
example.env chore: Update dependencies and regenerate build artifacts. 2025-12-16 18:54:41 +04:00
go.mod chore: Update dependencies and regenerate build artifacts. 2025-12-16 18:54:41 +04:00
go.sum chore: Update dependencies and regenerate build artifacts. 2025-12-16 18:54:41 +04:00
go.work chore: Update dependencies and regenerate build artifacts. 2025-12-16 18:54:41 +04:00
go.work.sum chore: Update dependencies and regenerate build artifacts. 2025-12-16 18:54:41 +04:00
Makefile update: use the docker for create migration in Makefile. 2025-12-19 21:16:00 +04:00
README.md chore: Update dependencies and regenerate build artifacts. 2025-12-16 18:54:41 +04:00

Go B2B Starter Backend

Professional Modular Monolith backend for B2B SaaS.

Quick Start

# 1. Start dependencies (Postgres, Redis)
make run-deps

# 2. Run migrations
make migrateup

# 3. Start server with live reload
make dev

🏗 Architecture

We use a Modular Monolith architecture with Clean Architecture within each module.

  • src/app/: Feature modules (Billing, Organizations, etc.)
  • src/pkg/: Shared core (Auth, Database, Logger)
  • src/api/: Shared API definitions
  • Generators: sqlc (Database), swag (API Docs)

📚 Documentation

🛠 Key Commands

Command Description
make dev Start server with Air (Live Reload)
make create-module type=app name=foo Generate a new module scaffold
make migrateup Apply DB migrations
make sqlc Generate type-safe DB code
make swagger Generate Swagger docs