Getting Started

Create without Docker

Set up a Grit project using cloud services instead of Docker. Perfect for machines where Docker isn't available or when you prefer managed services.

Prerequisites

You don't need Docker at all. Just make sure you have these installed:

  • Go 1.21+go version
  • Node.js 18+node --version
  • pnpmnpm install -g pnpm
  • Grit CLIgo install github.com/MUKE-coder/grit/v2/cmd/grit@latest

Step 1: Create your project

Scaffold a new Grit project as usual:

terminal
$ grit new myapp

The CLI will generate all the files, including .env, .env.cloud.example, and docker-compose.yml. You'll ignore the Docker files and configure cloud services instead.

Step 2: Set up cloud services

Instead of running PostgreSQL, Redis, and MinIO in Docker containers, you'll use managed cloud services. All of these have generous free tiers.

PostgreSQL — Neonneon.tech →
  1. Create a free account at neon.tech
  2. Create a new project (pick a region close to you)
  3. Copy the connection string from the dashboard

It looks like this:

DATABASE_URL=postgres://user:password@ep-xxx-xxx-123456.us-east-2.aws.neon.tech/neondb?sslmode=require
Redis — Upstashupstash.com →
  1. Create a free account at upstash.com
  2. Create a new Redis database
  3. Copy the Redis URL (TLS enabled)

It looks like this:

REDIS_URL=rediss://default:your-password@your-endpoint.upstash.io:6379

Note the rediss:// (with double 's') — that's TLS-encrypted Redis.

File Storage — Cloudflare R2cloudflare.com →
  1. Go to Cloudflare Dashboard → R2
  2. Create a bucket (e.g. myapp-uploads)
  3. Go to Manage R2 API Tokens → Create Token
  4. Copy the endpoint, access key, and secret key
STORAGE_DRIVER=r2
R2_ENDPOINT=https://your-account-id.r2.cloudflarestorage.com
R2_ACCESS_KEY=your-r2-access-key-id
R2_SECRET_KEY=your-r2-secret-access-key
R2_BUCKET=myapp-uploads
R2_REGION=auto

Alternatively, you can use Backblaze B2 — set STORAGE_DRIVER=b2 and configure the B2 variables instead.

Email — Resendresend.com →
  1. Sign up at resend.com
  2. Verify your domain (or use the sandbox for testing)
  3. Create an API key
RESEND_API_KEY=re_your_api_key_here
MAIL_FROM=noreply@yourdomain.com

Step 3: Configure your .env

Grit scaffolds a .env.cloud.example file with all the cloud variables pre-filled as placeholders. Copy it and fill in your keys:

terminal
$ cd myapp
$ cp .env.cloud.example .env

Then open .env and replace the placeholder values with your actual cloud service credentials. Here's the full template:

.env
# App
APP_NAME=myapp
APP_ENV=development
APP_PORT=8080
APP_URL=http://localhost:8080
# Database (Neon)
DATABASE_URL=postgres://user:password@ep-xxx.neon.tech/neondb?sslmode=require
# JWT
JWT_SECRET=change-me-to-a-random-string-at-least-32-chars
JWT_ACCESS_EXPIRY=15m
JWT_REFRESH_EXPIRY=168h
# Redis (Upstash)
REDIS_URL=rediss://default:your-password@your-endpoint.upstash.io:6379
# Storage (Cloudflare R2)
STORAGE_DRIVER=r2
R2_ENDPOINT=https://your-account-id.r2.cloudflarestorage.com
R2_ACCESS_KEY=your-r2-access-key-id
R2_SECRET_KEY=your-r2-secret-access-key
R2_BUCKET=myapp-uploads
R2_REGION=auto
# Email (Resend)
RESEND_API_KEY=re_your_api_key_here
MAIL_FROM=noreply@yourdomain.com
# CORS
CORS_ORIGINS=http://localhost:3000,http://localhost:3001
# GORM Studio
GORM_STUDIO_ENABLED=true
GORM_STUDIO_USERNAME=admin
GORM_STUDIO_PASSWORD=change-me-in-prod

Step 4: Start developing

With cloud services configured, you can run everything locally without Docker:

1. Install dependencies

terminal
$ cd myapp
$ pnpm install
$ cd apps/api && go mod tidy && cd ../..

2. Start the Go API

terminal
$ cd apps/api
$ go run cmd/api/main.go

Runs on http://localhost:8080. Auto-migrates the database on first run.

3. Start the frontend apps (in separate terminals)

terminal
# Terminal 2 — Web app
$ pnpm --filter web dev
# Terminal 3 — Admin panel
$ pnpm --filter admin dev

Web on http://localhost:3000, Admin on http://localhost:3001

Docker vs Cloud: when to use which

Docker (default)Cloud services
Setupdocker compose up -dSign up for 3-4 services
CostFree (local)Free tiers available
OfflineWorks offlineNeeds internet
ResourcesUses local RAM/CPULightweight locally
Best forMost developersLow-spec machines, CI/CD

Pro tip: use cloud for production too

If you set up cloud services for development, you already have your production infrastructure ready. Just create separate Neon projects and R2 buckets for staging and production, and you're good to deploy.