Quick Start
Get a full-stack Grit project running in 5 minutes. This guide assumes you have Go, Node.js, pnpm, and Docker already installed. If not, see the Installation guide first.
Prerequisites
Make sure the following tools are installed on your machine before proceeding:
go versionnode --versionpnpm --versiondocker --versionInstall the Grit CLI
Install the Grit CLI globally using go install. This gives you the grit command available anywhere on your system.
Verify the installation by running grit --help. You should see the Grit ASCII art logo and a list of available commands.
Update to the latest version
Already have Grit installed? Update the CLI to the latest version with a single command. This removes the old binary and installs the newest release:
Run grit version afterwards to confirm you're on the latest release.
Create a New Project
Scaffold a complete full-stack project with one command. This creates the entire monorepo: Go API, Next.js web app, admin panel, shared types, Docker setup, and all the batteries.
The project name must be lowercase, alphanumeric, and hyphens only (e.g., my-saas-app). It must start with a letter and cannot end with a hyphen.
Start Infrastructure Services
Navigate into the project and start the Docker services. This launches PostgreSQL, Redis, MinIO (S3-compatible storage), and Mailhog (email testing).
This starts the following services in the background:
- PostgreSQL 16 on port 5432 -- your primary database
- Redis 7 on port 6379 -- caching and job queues
- MinIO on port 9000 (console: 9001) -- local S3-compatible file storage
- Mailhog on port 8025 -- catch-all email testing UI
Do not have Docker? See the Installation guide for a cloud-only setup using Neon (Postgres) and Upstash (Redis) instead.
Start the Go API
Navigate into the Go API directory, install dependencies with go mod tidy, then start the server. This runs the Go backend on port 8080 with auto-migration enabled.
You should see the Gin router start up and log all registered routes. The API is now running at http://localhost:8080. Interactive API docs (Scalar) are at http://localhost:8080/docs and GORM Studio is available at http://localhost:8080/studio.
The first run of go mod tidy may take a minute as Go downloads all dependencies. Subsequent runs will be instant.Start the Frontend
Open a new terminal (keep the API running), navigate back to the project root, install Node.js dependencies, then start the Next.js web app.
To also run the admin panel, open another terminal and run:
Alternatively, you can run everything at once with Turborepo from the project root:
Once started, you can access:
http://localhost:8080Backend + GORM Studio at /studiohttp://localhost:3000Next.js frontend with auth pageshttp://localhost:3001Resource-based admin dashboardhttp://localhost:8080/docsInteractive Scalar API referencehttp://localhost:8025Email testing inboxTry registering a user at http://localhost:3000/register, then log in and explore the dashboard. Open http://localhost:3001 to see the admin panel. Visit http://localhost:8080/studio to browse your database visually with GORM Studio.
Generate a Resource
Now for the magic. Generate a complete full-stack resource with a single command. This creates the Go model, CRUD handler, service layer, React Query hooks, Zod schemas, TypeScript types, and an admin page -- all wired together.
This generates the following files:
apps/api/internal/models/post.go-- GORM model with struct tagsapps/api/internal/handlers/post.go-- Full CRUD handler with paginationapps/api/internal/services/post.go-- Business logic layerpackages/shared/schemas/post.ts-- Zod validation schemaspackages/shared/types/post.ts-- TypeScript typesapps/admin/hooks/use-posts.ts-- React Query hooksapps/admin/app/resources/posts/page.tsx-- Admin page with data table
It also automatically registers the routes in routes.go, adds the model to auto-migrations, and injects the resource into the admin sidebar. Restart turbo dev and visit the admin panel to see your new Posts resource with a fully functional data table and create form.
Upgrading?v0.13.0
If you have an existing Grit project and want to update the framework components (admin panel, configs, web app) to the latest version, run:
This preserves your resource definitions and API code while updating all framework-generated files. Use grit upgrade --force to overwrite without prompting.