# Bogie > A Go API service, from zero to production. Bogie is a command-line tool that scaffolds an API-only, Postgres-only Go service with generators (new, g scaffold, g model, g controller, g job, g seed, g authentication, g policy, g config) that also wire the code in, and model:sync to carry a hand-written migration into the model, queries, store and factory. It builds on Gin, sqlc with pgx, goose, River (opt-in) and Kamal, and generated apps test with Ginkgo and Gomega. Generated apps never import Bogie itself; the only bogie-go library they use is credentials. MIT licensed, v0.7.0. Generated apps need Go 1.26 or newer (the CLI itself builds with 1.25) and Docker with Compose v2 for the local Postgres. Install: `go install github.com/bogie-go/bogie@latest`. Then `bogie new blog && cd blog && make up && bogie db:prepare && bogie server`. Every generated app follows six rules: ctx first on anything doing I/O; interfaces declared where they are consumed; the models package imports nothing third-party; constructors return (T, error); *gin.Context never travels below the controllers; no util, helpers or common packages. Each app ships an AGENTS.md with the rules, the commands and a recipe per task. ## Guides - [Getting started](https://bogie-go.com/docs/getting-started.html): Install Bogie, generate a new service, and get it migrating, seeded and serving. - [Models and migrations](https://bogie-go.com/docs/models.html): Add a table with g model, change one with g migration, and run it through db:*. - [Seeds](https://bogie-go.com/docs/seeds.html): Plain Go seeds with g seed; db:seed runs every one, every time, so each is safe to run twice. - [Resources, controllers and routing](https://bogie-go.com/docs/controllers.html): Scaffold a whole resource or write a controller by hand, and see how either gets registered. - [Static files and error pages](https://bogie-go.com/docs/static-files.html): Files in public/, embedded in the binary and served below the router; the 404 and 500 pages. - [Authentication](https://bogie-go.com/docs/authentication.html): Guard a route group with a middleware: a shared secret, a bearer token, or a machine client's key. - [Authorization](https://bogie-go.com/docs/authorization.html): Since v0.7.0, bogie g policy writes plain-Go authorization: a denial is 403, and a token may carry a role claim. - [Services](https://bogie-go.com/docs/services.html): Give logic that is not CRUD a package of its own, with no HTTP in it. - [Background jobs](https://bogie-go.com/docs/jobs.html): Add River with --jobs at new time, or later with g job, and write a worker that runs beside it. - [Configuration and credentials](https://bogie-go.com/docs/configuration.html): The environment variables, the encrypted settings file, and what staging means here. - [Your own Postgres](https://bogie-go.com/docs/own-postgres.html): Point the app at a Postgres you already run, without Docker. - [Testing and CI](https://bogie-go.com/docs/testing.html): Ginkgo and Gomega specs, the test/ folder (testdb, testapp, factories, request specs), what bin/ci runs, and what doctor checks before either does. - [Deploying](https://bogie-go.com/docs/deploying.html): One Docker image, every role, shipped with Kamal 2 to staging and production. - [Upgrading an app](https://bogie-go.com/docs/upgrading.html): bogie app:update, a three-way merge to a newer layout that keeps your edits. - [Conventions and agents](https://bogie-go.com/docs/conventions.html): The six rules every generated app keeps, and why the layout is the way it is. - [Rails equivalents](https://bogie-go.com/docs/from-rails.html): A lookup table: the Rails names for things, and where each one lives in a generated Bogie app. - [Command reference](https://bogie-go.com/docs/commands.html): Every Bogie command, every generator and every make target, in one place. - [Releases](https://bogie-go.com/docs/releases.html): What each Bogie version added or changed, newest first, with breaking changes marked. ## Markdown copies Every guide as plain Markdown, generated from the same source as the HTML: - [Working on a Bogie app](https://bogie-go.com/docs/index.md) - [Getting started](https://bogie-go.com/docs/getting-started.md) - [Models and migrations](https://bogie-go.com/docs/models.md) - [Seeds](https://bogie-go.com/docs/seeds.md) - [Resources, controllers and routing](https://bogie-go.com/docs/controllers.md) - [Static files and error pages](https://bogie-go.com/docs/static-files.md) - [Authentication](https://bogie-go.com/docs/authentication.md) - [Authorization](https://bogie-go.com/docs/authorization.md) - [Services](https://bogie-go.com/docs/services.md) - [Background jobs](https://bogie-go.com/docs/jobs.md) - [Configuration and credentials](https://bogie-go.com/docs/configuration.md) - [Your own Postgres](https://bogie-go.com/docs/own-postgres.md) - [Testing and CI](https://bogie-go.com/docs/testing.md) - [Deploying](https://bogie-go.com/docs/deploying.md) - [Upgrading an app](https://bogie-go.com/docs/upgrading.md) - [Conventions and agents](https://bogie-go.com/docs/conventions.md) - [Command reference](https://bogie-go.com/docs/commands.md) - [Releases](https://bogie-go.com/docs/releases.md) - [Rails equivalents](https://bogie-go.com/docs/from-rails.md) ## Source and design - [The book](https://bogie-go.com/book.html): Bogie: How to Go from Zero to Production, by Roonglit Chareonsupkul. Kindle and paperback on Amazon. - [Team](https://bogie-go.com/team.html): who builds and maintains Bogie - [Repository](https://github.com/bogie-go/bogie): the tool, MIT - [DESIGN.md](https://github.com/bogie-go/bogie/blob/main/docs/DESIGN.md): every decision and its reasoning - [STATUS.md](https://github.com/bogie-go/bogie/blob/main/docs/STATUS.md): what works today and what is next ## Not Not a framework, not full-stack (API-only, no views), Postgres only.