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@latestVerify the installation:
grit version
# grit version 3.114.0Quick 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 servicesCreate a New Project
grit new BusinessCopilotThis 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 devAvailable Services
| Service | URL |
|---|---|
| Web (Landing Page) | http://localhost:3000 |
| Admin Panel | http://localhost:3001 |
| Go API | http://localhost:8080 |
| API Docs (gin-docs) | http://localhost:8080/docs |
| Pulse (Observability) | http://localhost:8080/pulse/ui/ |
| GORM Studio | http://localhost:8080/studio |
| Mailhog | http://localhost:8025 |
| MinIO Console | http://localhost:9003 |
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.yamlCLI 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 siteGenerate 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 upgradeThis 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 --forceAfter 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 .envFill in your keys for Neon (Postgres), Upstash (Redis), Cloudflare R2 (storage), and Resend (email).