Gofasta Documentation
Gofasta is a Go backend toolkit — a CLI for scaffolding projects and generating code, backed by a library of independent, production-ready packages. Use what you need, ignore the rest. This documentation covers everything you need to build, deploy, and maintain Go backend services with Gofasta.
Getting Started
New to Gofasta? Start here:
- Introduction — What Gofasta is and why it exists
- Installation — Install the CLI tool (3 options)
- Quick Start — Create a project and generate your first resource in 5 minutes
- Project Structure — Understand the generated directory layout
Guides
In-depth walkthroughs for common tasks:
- REST API — Build and customize REST endpoints
- GraphQL — Add GraphQL schemas and resolvers
- Database & Migrations — Manage your database schema
- Authentication — JWT tokens and RBAC with Casbin
- Code Generation — Use the CLI to generate models, services, controllers, and more
- Background Jobs — Cron scheduling and async task queues
- Deployment — Deploy to a VPS via SSH (Docker or binary), with systemd, nginx, and GitHub Actions
CLI Reference
Every command the Gofasta CLI provides:
- gofasta new — Create a new project
- gofasta generate — Generate code (scaffold, model, service, etc.)
- gofasta migrate — Run database migrations
- gofasta deploy — Deploy to a VPS via SSH
- gofasta dev — Start the development server
- gofasta verify — Run the full preflight gauntlet
- gofasta status — Project drift report
- gofasta inspect — Show a resource’s full composition
- gofasta config — Emit the JSON Schema for
config.yaml - gofasta do — Run a named development workflow
- gofasta ai — Install AI coding agent configuration
Package Library
Every package is independent — import only what you need. Reference for github.com/gofastadev/gofasta/pkg/*:
- Config — Configuration loading and database setup
- Auth — JWT and RBAC
- Middleware — HTTP middleware collection
- Cache — In-memory and Redis caching
- View all packages →
For AI Agents
This documentation is published in the llmstxt.org format so an AI coding agent can load current, version-matched docs instead of relying on training-set recall:
- llms.txt — A structured index of every documentation page, with a one-line description and absolute URL for each. Start here to find the right page.
- llms-full.txt — The entire documentation concatenated into a single file, for agents that prefer loading everything in one shot.
Both are regenerated on every deploy from the same MDX sources as this site, so they
never drift from the pages above. A scaffolded project also ships an AGENTS.md
briefing — see gofasta ai for per-agent setup.