A living reference of best practices, code structure and guides for my Go projects. It doubles as an opinionated boilerplate for Go applications (originally "bgb", Bott's Go Boilerplate).
- Start a new Go service from a working app: CLI, layered config, structured logging, graceful shutdown
- Design the REST API contract-first, with tests that keep the OpenAPI spec and the routes in sync
- Store data in SQLite by default or Postgres by config, with every record isolated per tenant
- Delegate login to a reverse proxy instead of handling passwords and sessions
- Ship a Vue web UI embedded in a single binary, released as zips, debs and a container image
- Follow a clear folder structure that keeps business logic out of handlers
Needs Go and Node.
git clone https://github.com/go-bumbu/reference-app.git
cd reference-app
make run-uiOpen http://localhost:8081; the sample config signs every request in as admin.
- Build a new app from this reference: step-by-step guides for reusing each part
- Architecture: folder tiers, design decisions, and links to every topic doc
- Features: what is implemented, partial, or deliberately left out
- API and its OpenAPI spec
- Authentication and tenancy
- Database
- Web UI
- Server lifecycle
See DEVELOPMENT.md.
Licensed under the GPL-3.0 License.