Logo Catuaba

Catuaba

Cộng đồng
dayvsonlima

🍷 Build full-stack Go web apps in minutes, not days. Rails-like CLI with Gin, GORM, Templ, HTMX, Tailwind CSS, and built-in AI integration (MCP).

Nhà phát hànhdayvsonlima
Kho mãcatuaba
Ngôn ngữGo
Bản fork
2
Sao
19
Công cụ có sẵn
0
Phương thức truyền tảistdio
Danh mục
Giấy phépMIT
Liên kết
  • Kết nối công cụ với quy trình làm việc AI

    Catuaba cung cấp các khả năng MCP mà ứng dụng khách và tác nhân AI tương thích có thể sử dụng.

  • 0 công cụ có sẵn

    Xem các thao tác có thể gọi bên dưới, kèm tên và mô tả nếu máy chủ cung cấp.

  • Cấu hình sẵn để sao chép

    Dùng các đoạn cấu hình cài đặt mẫu để thiết lập máy chủ này trong ứng dụng khách MCP bạn muốn dùng.

  • Chỉ số quan tâm đến mã nguồn mở

    19 sao và 2 bản fork từ kho mã được liên kết.


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.

bash
catuaba new blog --db postgres --auth
cd blog
catuaba g scaffold Post title:string content:text published:boolean
make dev

That'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

Why Catuaba?

You wantCatuaba gives you
Start a project fastcatuaba new myapp — full app in 3 seconds
CRUD without boilerplatecatuaba g scaffold — model, views, API, routes, migration
Type-safe HTMLTempl — compiled templates, IDE autocomplete, no interface{}
Interactivity without JS frameworksHTMX + Alpine.js — 31kb total
Production CSSTailwind CSS — standalone binary, no Node.js
Auth that just works--auth — login, register, logout, sessions, bcrypt
AI-powered developmentBuilt-in MCP server — Claude/Cursor understand your project
Deploy anywhereSingle binary + Docker. That's Go.

The Stack

LayerTechnology
HTTPGin
ORMGORM — Postgres, MySQL, SQLite
ViewsTempl — type-safe, compiled HTML
InteractivityHTMX + Alpine.js
CSSTailwind CSS
SessionsSCS
MigrationsRaw SQL (up/down) via golang-migrate

Install

Binary (recommended)

macOS (Apple Silicon)

bash
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)

bash
curl -L https://github.com/dayvsonlima/catuaba/releases/latest/download/catuaba-darwin-amd64.tar.gz | tar xz
sudo mv catuaba /usr/local/bin/

Linux

bash
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.

From source

bash
go install github.com/dayvsonlima/catuaba@latest

Prerequisites

  • 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

Getting Started

1. Create your app

bash
catuaba new myapp --db postgres
cd myapp
go mod tidy

Flags:

  • --db postgres|mysql|sqlite (default: postgres)
  • --auth — adds login, register, logout

2. Generate a resource

bash
catuaba g scaffold Post title:string content:text published:boolean

This creates everything:

WhatWhere
Modelapp/models/post.go
Migrationdatabase/migrations/*_create_posts.{up,down}.sql
HTML handlersapp/controllers/posts/ (index, show, new, create, edit, update, delete)
Templ viewsapp/views/posts/ (index, show, form)
RoutesAuto-injected into config/routes.go

3. Start developing

bash
make dev

Open http://localhost:8080 — done.

Three watchers run in parallel:

  • Templ — recompiles .templ files on save
  • Tailwind — rebuilds CSS on save
  • wgo — rebuilds and restarts the Go server

Generators

All generators run inside your project directory with catuaba g <generator>.

Full-stack scaffold

bash
catuaba g scaffold Product name:string price:float description:text active:boolean

Creates model + migration + HTML handlers + Templ views + JSON API + routes. This is the fastest way to build features.

HTML routes:

MethodPathDescription
GET/productsList with pagination
GET/products/newNew form
POST/productsCreate
GET/products/:idDetail view
GET/products/:id/editEdit form
POST/products/:idUpdate
POST/products/:id/deleteDelete

JSON API routes:

MethodPath
GET/api/products
POST/api/products
GET/api/products/:id
PUT/PATCH/api/products/:id
DELETE/api/products/:id

API only

bash
catuaba g api Order total:float status:string

Same as scaffold but without HTML views — JSON API only.

Model

bash
catuaba g model Category name:string description:text

Creates model + SQL migration.

Other generators

bash
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

Field types

TypeGoSQLHTML
stringstringVARCHAR(255)text input
textstringTEXTtextarea
integerintINTEGERnumber input
floatfloat64REALnumber input
booleanboolBOOLEANcheckbox
datetimetime.TimeTIMESTAMPdatetime-local

Commands

CommandDescription
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 serverStart server
catuaba routesList all routes
catuaba db migrateRun pending migrations
catuaba db rollbackRollback last migration
catuaba db statusMigration status
catuaba install <plugin>Install plugin
catuaba mcpStart MCP server

Documentation

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:


Project Structure

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

Middleware

Every app comes with a production-ready middleware stack — no configuration needed:

MiddlewareWhat it does
HealthGET /health returns 200
RequestIDX-Request-ID on every response
LoggerStructured JSON: method, path, status, latency
RecoveryCatches panics → 500
SecureHeadersHSTS, X-Frame-Options, CSP
CORSConfigurable via CORS_ALLOWED_ORIGIN
RateLimitToken bucket: 10 req/s, burst 40
SessionSCS cookie sessions
CSRFAuto token validation (skips /api/ routes)
FlashFlash messages: success, error, warning

Authentication

bash
catuaba new myapp --db postgres --auth

Generates a complete auth system:

  • GET /register — registration form
  • POST /register — create account
  • GET /login — login form
  • POST /login — authenticate
  • POST /logout — destroy session
  • RequireAuth() middleware — protects routes, redirects to /login

Passwords are hashed with bcrypt. Sessions use SCS (cookie-based, OWASP-compliant).


Database

Drivers

DriverFlagExample
PostgreSQL--db postgresDefault. Docker Compose included
MySQL--db mysqlDocker Compose included
SQLite--db sqliteZero config, file-based

Migrations

Raw SQL, versioned, up/down:

bash
# 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 status

MCP Server (AI Integration)

Catuaba 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.

Setup

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:

json
{
  "mcpServers": {
    "catuaba": {
      "command": "catuaba",
      "args": ["mcp"]
    }
  }
}

What the AI gets

Resources — your project as compact JSON:

ResourceReturns
catuaba://project/overviewModule, Go version, DB, port, plugins, directories
catuaba://project/modelsAll models with fields, types, tags
catuaba://project/routesAll routes: method, path, handler
catuaba://project/controllersAll controllers and functions
catuaba://project/middlewareAll middleware functions
catuaba://project/envEnv var names (no values)

Tools — generate code through the AI:

ToolWhat it does
generate_scaffoldFull CRUD: model + handlers + views + API + routes
generate_modelModel + SQL migration
get_modelInspect model details
get_routesList routes (filterable by prefix)
get_logsRecent app logs (filterable by level/path)
run_commandRun any catuaba generate subcommand
install_pluginInstall a plugin

Every generated app also includes a CLAUDE.md with framework conventions, so AI assistants follow the right patterns automatically.


Plugins

Extend Catuaba with plugins:

bash
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         # Details

Plugins are defined by a plugin.yaml manifest and can add files, inject routes, add imports, insert struct fields, and set environment variables.


Deploy

Docker (recommended)

bash
docker compose up -d --build

The generated Dockerfile is a multi-stage build:

  1. Installs Templ + builds templates
  2. Builds Tailwind CSS (minified)
  3. Compiles Go binary with -ldflags="-w -s"
  4. Runs on alpine:3.19 (~15MB image)

Manual

bash
make build
./bin/myapp

Development

Make targets

bash
make 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 down

Contributing

Contributions are welcome!

bash
git clone https://github.com/dayvsonlima/catuaba.git
cd catuaba
go mod tidy
go test -v ./...
  1. Fork the repo
  2. Create your branch (git checkout -b feature/my-feature)
  3. Run tests (go test ./...)
  4. Submit a PR

License

MIT License — see LICENSE for details.

Cài đặt

TypingMind
Yêu cầu:

Node.js 18+

{
  "mcpServers": {
    "dayvsonlima-catuaba": {
      "command": "npx",
      "args": [
        "-y",
        "catuaba"
      ]
    }
  }
}

Dùng MCP Catuaba với nhiều mô hình AI

TypingMind kết nối các công cụ MCP ở cấp không gian làm việc, nên sau khi kết nối Catuaba, bạn có thể dùng với nhiều mô hình AI khác nhau trong TypingMind thay vì phải thiết lập riêng cho từng mô hình. MCP này chạy cục bộ thông qua trình kết nối MCP của TypingMind trên thiết bị của bạn.

Hướng dẫn thiết lập để dùng trình kết nối cục bộ

Dùng cách này khi máy chủ MCP cần truy cập các tệp, ứng dụng hoặc tài nguyên riêng tư trên máy tính của bạn.

1

Mở cài đặt MCP

Trong TypingMind, vào Cài đặt, Cài đặt nâng cao, rồi đến Giao thức ngữ cảnh mô hình và chọn Cài trình kết nối.

  1. Mở TypingMind trong trình duyệt của bạn.
  2. Nhấp vào biểu tượng Cài đặt.
  3. Vào Cài đặt nâng cao.
  4. Mở mục Giao thức ngữ cảnh mô hình.
  5. Nhấp vào Cài trình kết nối rồi chọn Thiết bị này.
Màn hình thiết lập trình kết nối MCP của TypingMind với tùy chọn Thiết bị này được chọn
2

Chạy lệnh trình kết nối

Chọn Thiết bị này, sao chép lệnh từ TypingMind và chạy trong Terminal. Giữ tiến trình chạy trong khi bạn dùng MCP.

  1. Sao chép lệnh thiết lập hiển thị trong TypingMind.
  2. Mở Terminal trên macOS hoặc Windows Terminal trên Windows.
  3. Dán và chạy lệnh.
  4. Xác nhận cài đặt gói nếu Terminal hỏi bạn có muốn tiếp tục không.
  5. Giữ tiến trình trong cửa sổ Terminal chạy trong khi dùng các công cụ MCP.
3

Thêm Catuaba làm máy chủ

Khi trạng thái trình kết nối là Sẵn sàng, nhấp vào Sửa máy chủ và dán cấu hình máy chủ MCP.

  1. Đợi đến khi trạng thái trình kết nối hiển thị Sẵn sàng.
  2. Nhấp vào Sửa máy chủ.
  3. Dán cấu hình máy chủ MCP của Catuaba.
  4. Lưu danh sách máy chủ.
  5. Làm mới nếu bạn muốn xác nhận trình kết nối vẫn sẵn sàng.
Cài đặt MCP của TypingMind hiển thị máy chủ đang hoạt động và nút Sửa máy chủ
{
  "mcpServers": {
    "dayvsonlima-catuaba": {
      "command": "npx",
      "args": [
        "-y",
        "catuaba"
      ]
    }
  }
}
4

Dùng kết nối với nhiều mô hình

Lưu danh sách máy chủ, mở Plugin, bật các công cụ MCP của Catuaba, sau đó chọn bất kỳ mô hình AI nào được hỗ trợ trong TypingMind và dùng các công cụ trong cuộc trò chuyện hoặc gán chúng cho một tác nhân AI.

  1. Mở trang Plugin trong TypingMind.
  2. Bật các công cụ MCP của Catuaba.
  3. Bắt đầu cuộc trò chuyện và chọn mô hình AI bạn muốn dùng.
  4. Dùng các công cụ MCP trong cuộc trò chuyện hoặc gán chúng cho một tác nhân AI.
  5. Chuyển sang mô hình AI khác bất cứ khi nào cần mà không phải kết nối lại MCP.
Cuộc trò chuyện TypingMind dùng các công cụ MCP đã bật với một mô hình AI được chọn
Bạn có thể dùng Catuaba giúp tôi làm việc này không?
Catuaba
Được. Tôi đã đọc.
Đây là kết quả tôi tìm được bằng Catuaba.

Câu hỏi thường gặp

Máy chủ MCP Catuaba dùng để làm gì?

Catuaba là máy chủ MCP cho phép các ứng dụng AI tương thích kết nối với công cụ và ngữ cảnh bên ngoài. Trong TypingMind, bạn chỉ cần thêm máy chủ MCP này một lần để các công cụ của nó có sẵn trong không gian làm việc AI của bạn.

Bạn có thể dùng MCP Catuaba với nhiều mô hình AI trong TypingMind không?

Có. TypingMind kết nối các công cụ MCP ở cấp không gian làm việc, nên bạn có thể dùng Catuaba với nhiều mô hình AI như Claude, ChatGPT, Gemini hoặc các mô hình khác đã cấu hình trong TypingMind mà không cần thiết lập máy chủ MCP riêng cho từng mô hình.

Vì sao nên dùng MCP Catuaba với TypingMind?

TypingMind là một trong những giao diện trò chuyện với LLM tốt nhất vì tập hợp nhiều mô hình AI, prompt, plugin, tác nhân AI, khóa API và công cụ MCP vào một không gian làm việc. Khi kết nối Catuaba, bạn có thể dùng các công cụ MCP của dịch vụ này với những mô hình ưa thích, đồng thời giữ quy trình trò chuyện gọn gàng trong TypingMind.

Làm cách nào để kết nối MCP Catuaba với TypingMind?

Catuaba hoạt động thông qua trình kết nối MCP cục bộ của TypingMind. Đây là lựa chọn phù hợp nhất khi máy chủ MCP cần truy cập tệp cục bộ, ứng dụng máy tính, công cụ dòng lệnh hoặc tài nguyên riêng trên máy tính của bạn.

MCP Catuaba cung cấp những công cụ nào trong TypingMind?

Catuaba cung cấp các chức năng MCP mà bạn có thể bật từ trang Plugin của TypingMind để dùng trong trò chuyện hoặc gán cho tác nhân AI.

Bạn có cần chia sẻ khóa API với TypingMind để dùng MCP Catuaba không?

Không. TypingMind ưu tiên xử lý cục bộ và cho phép bạn kiểm soát nhà cung cấp mô hình, khóa API, prompt và cấu hình MCP. Nếu Catuaba yêu cầu xác thực, hãy thêm các header, cài đặt OAuth hoặc cấu hình cục bộ cần thiết cho máy chủ MCP đó khi tạo kết nối.

Máy chủ MCP liên quan

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇