Grit Docsv3.114.0

Getting Started

Install Grit and create your first full-stack project in minutes.

Current version: v3.114.0

Installation

Install the Grit CLI globally:

go install github.com/MUKE-coder/grit/v3/cmd/grit@latest

Verify the installation:

grit version
# grit version 3.114.0

Quick Start

grit new BusinessCopilot            # Scaffold a new project
cd BusinessCopilot
docker compose up -d   # Start PostgreSQL, Redis, MinIO, Mailhog
pnpm install           # Install frontend dependencies
pnpm dev               # Start all services

Create a New Project

grit new BusinessCopilot

This creates a full monorepo with:

  • Go API — JWT auth, user management, GORM Studio, and batteries (cache, storage, email, jobs, cron, AI)
  • Web app — SaaS marketing landing page with Framer Motion animations, linking to the admin panel for login/sign-up
  • Admin panel — Full authentication (login, sign-up, forgot-password), dashboard, resource management with DataTable, FormBuilder, ViewModal, toast notifications
  • Shared package — Zod schemas and TypeScript types shared between apps
  • Docker Compose — PostgreSQL, Redis, MinIO, and Mailhog

Start Development

# Start infrastructure
cd BusinessCopilot
docker compose up -d

# Install frontend dependencies
pnpm install

# Start all services
pnpm dev

Available Services

Project Structure

BusinessCopilot/
├── apps/
│   ├── api/          # Go backend (Gin + GORM)
│   ├── web/          # Landing page (Next.js)
│   └── admin/        # Admin panel (Next.js)
├── packages/
│   └── shared/       # Zod schemas, TS types, constants
├── docker-compose.yml
├── turbo.json
└── pnpm-workspace.yaml

CLI Flags

grit new myapp            # Full monorepo (api + web + admin + shared)
grit new myapp --api      # Go API only
grit new myapp --expo     # Full monorepo + Expo mobile app
grit new myapp --mobile   # API + Expo mobile app only
grit new myapp --full     # Everything + documentation site

Generate a Resource

Once your project is set up, generate full-stack CRUD resources:

grit generate resource Post --fields "title:string,content:text,published:bool"

This creates: Go model, handler, service, Zod schemas, TypeScript types, React Query hooks, and an admin resource page — all wired up automatically.

Upgrade an Existing Project

After updating the CLI, upgrade your project's scaffold files to match:

# Update the CLI first
go install github.com/MUKE-coder/grit/v3/cmd/grit@latest

# Then upgrade your project
cd BusinessCopilot
grit upgrade

This regenerates admin components, web landing page, Docker configs, and documentation while preserving your resource definitions, API code, and environment variables.

Use --force to overwrite all files without prompting:

grit upgrade --force

After upgrading, run grit sync to regenerate TypeScript types from your Go models.

No Docker?

If you can't run Docker, use cloud services:

cp .env.cloud.example .env

Fill in your keys for Neon (Postgres), Upstash (Redis), Cloudflare R2 (storage), and Resend (email).

On this page