Introduction

Welcome to Grit

Grit is a full-stack meta-framework that fuses a Go backend (Gin + GORM) with a Next.js frontend (React + App Router) and a Filament-like admin panel in a single monorepo. It ships with authentication, file storage, email, background jobs, AI integration, and a visual database browser -- all wired together out of the box.

What is Grit?

Think of Grit as Laravel's developer experience, but with Go's performance and React's frontend ecosystem. Instead of stitching together 15+ tools to build a modern full-stack app, you run one command and get everything: a Go API server, a React frontend, an admin dashboard, shared TypeScript types, Docker infrastructure, and a CLI that generates full-stack resources for you.

Grit is opinionated by design. There is one way to structure your project, one auth system, one state management approach, one folder structure. This means any developer can jump into any Grit project and immediately understand it. It also means AI assistants can generate Grit code confidently because the patterns are predictable and consistent.

Every piece of code Grit generates is yours. No lock-in, no black boxes, no runtime magic. The CLI produces clean, readable, editable files that you own and control.

Key Features

CLI Scaffolder
grit new myapp creates a complete monorepo with Go API, Next.js frontend, admin panel, shared types, and Docker setup.
Full-Stack Code Gen
grit generate resource Post creates a Go model, CRUD handler, React Query hooks, Zod schema, and admin page in one shot.
Admin Panel
A Filament-like resource-based admin dashboard with data tables, form builders, charts, widgets, and a polished dark theme.
End-to-End Type Safety
Go struct tags auto-generate TypeScript types and Zod schemas. Change the backend, run grit sync, and the frontend stays in sync.
Batteries Included
JWT auth, file storage (S3/R2/MinIO), email (Resend), background jobs, cron, Redis caching, and AI integration ship with every project.
GORM Studio
A visual database browser embedded at /studio. Browse tables, inspect data, and manage your database without leaving the browser.

How It Works

1

Scaffold your project

Run grit new myapp to generate the full monorepo -- Go API with auth, Next.js web app, admin panel, shared types, Docker Compose, and GORM Studio.

2

Start the dev environment

Run docker compose up -d to start PostgreSQL, Redis, MinIO, and Mailhog. Then run turbo dev to start the Go API and Next.js apps with hot reload.

3

Generate resources

Use grit generate resource Post --fields "title:string,content:text" to create a full-stack resource. The Go model, handler, React hooks, Zod schema, and admin page are all created and wired together.

4

Build and ship

Your app is production-ready from day one. Multi-stage Docker builds for Go and Next.js. Deploy anywhere -- VPS, Kubernetes, or your favorite cloud provider.

Quick Example

Create a project and generate your first resource in under a minute:

terminal
$ grit new myapp
$ cd myapp
$ docker compose up -d
$ grit generate resource Post --fields "title:string,content:text,published:bool"
$ turbo dev

That's it. You now have a Go API serving CRUD endpoints for Posts, a React frontend with data fetching hooks, Zod validation, and an admin panel with a data table and form -- all connected and ready to use.

What Gets Generated

When you run grit generate resource Post, the CLI creates:

apps/api/internal/models/post.goGORM model with struct tags, timestamps, and soft deletes
apps/api/internal/handlers/post.goCRUD handler with pagination, sorting, filtering, and search
apps/api/internal/services/post.goBusiness logic layer with reusable query scopes
packages/shared/schemas/post.tsZod validation schemas (create + update)
packages/shared/types/post.tsTypeScript types inferred from the Go model
apps/admin/hooks/use-posts.tsReact Query hooks for all CRUD operations
apps/admin/app/resources/posts/page.tsxAdmin page with data table, search, and delete actions

Who is Grit For?

  • Freelancers and agencies who need to ship client projects fast with a complete stack that works out of the box.
  • Solo SaaS developers who want Go's performance for their backend but React's ecosystem for their frontend.
  • Small to mid-size teams building internal tools, CRMs, dashboards, or SaaS products.
  • Laravel developers who want to move to Go but miss the developer experience.
  • Next.js developers who are frustrated with serverless limitations and want a real backend.