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 →
Last updated on