Build full-stack Go web apps in minutes, not days.
The Rails-like framework that Go developers have been waiting for.
Go is fast, simple, and deploys as a single binary. But starting a web project from scratch means wiring up routers, ORMs, templates, auth, CSRF, sessions, migrations, Docker... hours of boilerplate before you write your first feature.
Catuaba fixes that. One command gives you a production-ready app. Another gives you a full CRUD with views, API, and database β in seconds.
catuaba new blog --db postgres --auth
cd blog
catuaba g scaffold Post title:string content:text published:boolean
make devThat's it. You now have a running blog with:
- Landing page styled with Tailwind CSS
- Full CRUD for Posts β HTML views and JSON API
- User registration and login with bcrypt + sessions
- Database migrations, CSRF protection, flash messages
- Hot-reload in development (Templ + Tailwind + wgo)
- Docker-ready for production
![]() |
![]() |
| Generated home page | Scaffold CRUD β posts list |
![]() |
![]() |
| Edit form | Post detail view |
![]() |
![]() |
| Registration page (--auth) | Custom 404 page |
| You want | Catuaba gives you |
|---|---|
| Start a project fast | catuaba new myapp β full app in 3 seconds |
| CRUD without boilerplate | catuaba g scaffold β model, views, API, routes, migration |
| Type-safe HTML | Templ β compiled templates, IDE autocomplete, no interface{} |
| Interactivity without JS frameworks | HTMX + Alpine.js β 31kb total |
| Production CSS | Tailwind CSS β standalone binary, no Node.js |
| Auth that just works | --auth β login, register, logout, sessions, bcrypt |
| AI-powered development | Built-in MCP server β Claude/Cursor understand your project |
| Deploy anywhere | Single binary + Docker. That's Go. |
| Layer | Technology |
|---|---|
| HTTP | Gin |
| ORM | GORM β Postgres, MySQL, SQLite |
| Views | Templ β type-safe, compiled HTML |
| Interactivity | HTMX + Alpine.js |
| CSS | Tailwind CSS |
| Sessions | SCS |
| Migrations | Raw SQL (up/down) via golang-migrate |
macOS (Apple Silicon)
curl -L https://github.com/dayvsonlima/catuaba/releases/latest/download/catuaba-darwin-arm64.tar.gz | tar xz
sudo mv catuaba /usr/local/bin/macOS (Intel)
curl -L https://github.com/dayvsonlima/catuaba/releases/latest/download/catuaba-darwin-amd64.tar.gz | tar xz
sudo mv catuaba /usr/local/bin/Linux
curl -L https://github.com/dayvsonlima/catuaba/releases/latest/download/catuaba-linux-amd64.tar.gz | tar xz
sudo mv catuaba /usr/local/bin/Windows β download from releases, extract, add to PATH.
go install github.com/dayvsonlima/catuaba@latest- Go 1.22+
- Templ β
go install github.com/a-h/templ/cmd/templ@latest - wgo (hot-reload) β
go install github.com/bokwoon95/wgo@latest - A database: PostgreSQL, MySQL, or SQLite
catuaba new myapp --db postgres
cd myapp
go mod tidyFlags:
--db postgres|mysql|sqlite(default: postgres)--authβ adds login, register, logout
catuaba g scaffold Post title:string content:text published:booleanThis creates everything:
| What | Where |
|---|---|
| Model | app/models/post.go |
| Migration | database/migrations/*_create_posts.{up,down}.sql |
| HTML handlers | app/controllers/posts/ (index, show, new, create, edit, update, delete) |
| Templ views | app/views/posts/ (index, show, form) |
| Routes | Auto-injected into config/routes.go |
make devOpen http://localhost:8080 β done.
Three watchers run in parallel:
- Templ β recompiles
.templfiles on save - Tailwind β rebuilds CSS on save
- wgo β rebuilds and restarts the Go server
All generators run inside your project directory with catuaba g <generator>.
catuaba g scaffold Product name:string price:float description:text active:booleanCreates model + migration + HTML handlers + Templ views + JSON API + routes. This is the fastest way to build features.
HTML routes:
| Method | Path | Description |
|---|---|---|
| GET | /products |
List with pagination |
| GET | /products/new |
New form |
| POST | /products |
Create |
| GET | /products/:id |
Detail view |
| GET | /products/:id/edit |
Edit form |
| POST | /products/:id |
Update |
| POST | /products/:id/delete |
Delete |
JSON API routes:
| Method | Path |
|---|---|
| GET | /api/products |
| POST | /api/products |
| GET | /api/products/:id |
| PUT/PATCH | /api/products/:id |
| DELETE | /api/products/:id |
catuaba g api Order total:float status:stringSame as scaffold but without HTML views β JSON API only.
catuaba g model Category name:string description:textCreates model + SQL migration.
catuaba g controller Auth login logout # Controller with methods
catuaba g middleware RateLimit # Middleware
catuaba g service EmailSender # Service layer
catuaba g seed Posts # Database seed
catuaba g migration add_category_id_to_posts # Empty SQL migration
catuaba g view about # Templ page| Type | Go | SQL | HTML |
|---|---|---|---|
string |
string |
VARCHAR(255) |
text input |
text |
string |
TEXT |
textarea |
integer |
int |
INTEGER |
number input |
float |
float64 |
REAL |
number input |
boolean |
bool |
BOOLEAN |
checkbox |
datetime |
time.Time |
TIMESTAMP |
datetime-local |
| Command | Description |
|---|---|
catuaba new <name> |
Create application |
catuaba g scaffold <name> [fields...] |
Full-stack CRUD |
catuaba g api <name> [fields...] |
JSON API |
catuaba g model <name> [fields...] |
Model + migration |
catuaba g controller <name> [methods...] |
Controller |
catuaba g middleware <name> |
Middleware |
catuaba g service <name> |
Service |
catuaba g seed <name> |
Database seed |
catuaba g migration <name> |
SQL migration |
catuaba g view <name> |
Templ view page |
catuaba server |
Start server |
catuaba routes |
List all routes |
catuaba db migrate |
Run pending migrations |
catuaba db rollback |
Rollback last migration |
catuaba db status |
Migration status |
catuaba install <plugin> |
Install plugin |
catuaba mcp |
Start MCP server |
For detailed guides on each part of the framework:
- Models β GORM models, field types, relationships, migrations, querying
- Controllers β HTML handlers vs JSON API, form binding, route patterns
- Views β Templ templates, layouts, components, HTMX, Alpine.js, Tailwind CSS
- Middleware β Built-in stack, CSRF, sessions, flash messages, auth, custom middleware
External references:
| Topic | Link |
|---|---|
| HTTP framework | Gin documentation |
| ORM | GORM documentation |
| Views | Templ guide |
| Interactivity | HTMX documentation |
| Client-side JS | Alpine.js documentation |
| CSS | Tailwind CSS documentation |
| Sessions | SCS documentation |
| Migrations | golang-migrate |
myapp/
βββ application.go # Entrypoint: middleware stack, routes, graceful shutdown
βββ Makefile # dev, build, test, docker
βββ Dockerfile # Multi-stage production build
βββ docker-compose.yml # App + database
βββ .env # Environment variables
βββ config/
β βββ config.go # Env vars β AppConfig struct
β βββ routes.go # Routes (auto-managed by generators)
βββ database/
β βββ connection.go # GORM connection + migration runner
β βββ migrations/ # SQL files (up/down)
βββ app/
β βββ models/ # GORM models
β βββ controllers/
β β βββ home.go # Home page
β β βββ {resource}/ # HTML handlers (scaffold)
β β βββ api/{resource}/ # JSON handlers (api/scaffold)
β βββ views/
β βββ layouts/base.templ # HTML5 layout: head, nav, flash, footer
β βββ components/ # Reusable: nav, flash, pagination, form fields
β βββ pages/ # Static pages: home, 404
β βββ {resource}/ # CRUD views: index, show, form
βββ middleware/ # Full stack (see below)
βββ static/css/ # Tailwind source + compiled output
Every app comes with a production-ready middleware stack β no configuration needed:
| Middleware | What it does |
|---|---|
| Health | GET /health returns 200 |
| RequestID | X-Request-ID on every response |
| Logger | Structured JSON: method, path, status, latency |
| Recovery | Catches panics β 500 |
| SecureHeaders | HSTS, X-Frame-Options, CSP |
| CORS | Configurable via CORS_ALLOWED_ORIGIN |
| RateLimit | Token bucket: 10 req/s, burst 40 |
| Session | SCS cookie sessions |
| CSRF | Auto token validation (skips /api/ routes) |
| Flash | Flash messages: success, error, warning |
catuaba new myapp --db postgres --authGenerates a complete auth system:
GET /registerβ registration formPOST /registerβ create accountGET /loginβ login formPOST /loginβ authenticatePOST /logoutβ destroy sessionRequireAuth()middleware β protects routes, redirects to/login
Passwords are hashed with bcrypt. Sessions use SCS (cookie-based, OWASP-compliant).
| Driver | Flag | Example |
|---|---|---|
| PostgreSQL | --db postgres |
Default. Docker Compose included |
| MySQL | --db mysql |
Docker Compose included |
| SQLite | --db sqlite |
Zero config, file-based |
Raw SQL, versioned, up/down:
# Auto-generated with models and scaffolds
database/migrations/20240101120000_create_posts.up.sql
database/migrations/20240101120000_create_posts.down.sql
# Manual migration
catuaba g migration add_slug_to_posts
# Run / rollback / check
catuaba db migrate
catuaba db rollback
catuaba db statusCatuaba ships with a built-in MCP server. AI coding assistants (Claude Code, Cursor, Windsurf) can understand your project structure and generate code β without reading every file.
Every generated app includes a .mcp.json file β just open the project in Claude Code or Cursor and the MCP server is auto-discovered.
For manual setup, add to your .mcp.json or claude_desktop_config.json:
{
"mcpServers": {
"catuaba": {
"command": "catuaba",
"args": ["mcp"]
}
}
}Resources β your project as compact JSON:
| Resource | Returns |
|---|---|
catuaba://project/overview |
Module, Go version, DB, port, plugins, directories |
catuaba://project/models |
All models with fields, types, tags |
catuaba://project/routes |
All routes: method, path, handler |
catuaba://project/controllers |
All controllers and functions |
catuaba://project/middleware |
All middleware functions |
catuaba://project/env |
Env var names (no values) |
Tools β generate code through the AI:
| Tool | What it does |
|---|---|
generate_scaffold |
Full CRUD: model + handlers + views + API + routes |
generate_model |
Model + SQL migration |
get_model |
Inspect model details |
get_routes |
List routes (filterable by prefix) |
get_logs |
Recent app logs (filterable by level/path) |
run_command |
Run any catuaba generate subcommand |
install_plugin |
Install a plugin |
Every generated app also includes a CLAUDE.md with framework conventions, so AI assistants follow the right patterns automatically.
Extend Catuaba with plugins:
catuaba install stripe-payments # From registry
catuaba install https://github.com/user/my-plugin # From git
catuaba install ./local-plugin # From local path
catuaba plugin list # Browse registry
catuaba plugin info stripe-payments # DetailsPlugins are defined by a plugin.yaml manifest and can add files, inject routes, add imports, insert struct fields, and set environment variables.
docker compose up -d --buildThe generated Dockerfile is a multi-stage build:
- Installs Templ + builds templates
- Builds Tailwind CSS (minified)
- Compiles Go binary with
-ldflags="-w -s" - Runs on
alpine:3.19(~15MB image)
make build
./bin/myappmake dev # Hot-reload (templ + tailwind + wgo)
make build # Production binary
make test # go test ./...
make tidy # go mod tidy
make docker-up # Docker Compose up
make docker-down # Docker Compose downContributions are welcome!
git clone https://github.com/dayvsonlima/catuaba.git
cd catuaba
go mod tidy
go test -v ./...- Fork the repo
- Create your branch (
git checkout -b feature/my-feature) - Run tests (
go test ./...) - Submit a PR
MIT License β see LICENSE for details.






