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
2. Configure Environment
.env.local with your credentials:
Without image provider keys, files save to
public/uploads/ locally. Perfect for demos.3. Set Up Supabase
Apply Migrations
Configure Auth
In Supabase Dashboard → Authentication → URL Configuration:- Site URL:
http://localhost:3000 - Redirect URLs: Add
http://localhost:3000/api/auth/callback
- Create OAuth client in Google Cloud Console
- Add redirect:
https://your-project.supabase.co/auth/v1/callback - Enable Google in Supabase → Authentication → Providers
4. Start Development
5. First Generation
- Login: Click “Continue with Google” or use magic link
- Create Design: Type “Create a vintage surf shop logo design” and click Send
- Remove Background: Hover over the design and click “Remove Background” from the mini menu
- Add to Garment: Click “Add to Garment” and select a blank to create your mockup
- 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 blanks3
Generation works
Chat returns AI-generated design images
4
Lookbook works
Saved designs appear at
/lookbookCommon Issues
Login redirect loop
Login redirect loop
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.No products in garment browser
No products in garment browser
By default, mock data is used. For Shopify products, set
NEXT_PUBLIC_SHOPIFY_STORE_DOMAIN and NEXT_PUBLIC_SHOPIFY_STOREFRONT_TOKEN.Generation fails
Generation fails
Verify
REPLICATE_API_KEY or FAL_KEY is set. Check terminal for error details.Token balance errors
Token balance errors
In development, tokens auto-top-up. Set
ALLOW_TOKEN_TOP_UP=true if needed.