Skip to main content

Quickstart

Get from zero to generating AI mockups in 5 minutes.

Prerequisites

  • Node.js 20+ (LTS recommended)
  • npm (default package manager)
  • Supabase account (supabase.com - free tier works)
  • fal.ai API key (fal.ai - for AI generation)

1. Clone & Install

git clone https://github.com/garmint-studio/garmint.git
cd garmint
npm install

2. Configure Environment

cp .env.local.example .env.local
Edit .env.local with your credentials:
# Required - Supabase
NEXT_PUBLIC_SUPABASE_URL=https://your-project.supabase.co
NEXT_PUBLIC_SUPABASE_ANON_KEY=eyJhbGciOiJIUzI1NiIs...
SUPABASE_SERVICE_ROLE_KEY=eyJhbGciOiJIUzI1NiIs...

# Required - AI Generation (pick one)
FAL_KEY=key_xxxxxxxxxxxxx
# OR
REPLICATE_API_KEY=r8_xxxxxxxxxxxxx

# Optional - Image uploads (falls back to local storage)
UPLOADCARE_PUBLIC_KEY=your_key
Without image provider keys, files save to public/uploads/ locally. Perfect for demos.

3. Set Up Supabase

Apply Migrations

# Option A: Local development with Supabase CLI
npx supabase start
npx supabase db reset

# Option B: Remote project
npx supabase link --project-ref your-project-ref
npx supabase db push

Configure Auth

In Supabase Dashboard → Authentication → URL Configuration:
  1. Site URL: http://localhost:3000
  2. Redirect URLs: Add http://localhost:3000/api/auth/callback
For Google OAuth (optional):
  1. Create OAuth client in Google Cloud Console
  2. Add redirect: https://your-project.supabase.co/auth/v1/callback
  3. Enable Google in Supabase → Authentication → Providers

4. Start Development

npm run dev
Visit http://localhost:3000

5. First Generation

  1. Login: Click “Continue with Google” or use magic link
  2. Create Design: Type “Create a vintage surf shop logo design” and click Send
  3. Remove Background: Hover over the design and click “Remove Background” from the mini menu
  4. Add to Garment: Click “Add to Garment” and select a blank to create your mockup
  5. Save: Click the bookmark icon to save to your lookbook

Verification Checklist

1

Auth works

Can log in via Google or magic link, session persists across pages
2

Garment browser works

Products load on /garments, can browse and favorite blanks
3

Generation works

Chat returns AI-generated design images
4

Lookbook works

Saved designs appear at /lookbook

Common Issues

Check that NEXT_PUBLIC_SUPABASE_URL and NEXT_PUBLIC_SUPABASE_ANON_KEY are set correctly. Verify Site URL in Supabase dashboard matches your dev origin.
By default, mock data is used. For Shopify products, set NEXT_PUBLIC_SHOPIFY_STORE_DOMAIN and NEXT_PUBLIC_SHOPIFY_STOREFRONT_TOKEN.
Verify REPLICATE_API_KEY or FAL_KEY is set. Check terminal for error details.
In development, tokens auto-top-up. Set ALLOW_TOKEN_TOP_UP=true if needed.

Next Steps