Skip to content

Instantly share code, notes, and snippets.

@Fashad-Ahmed
Created October 30, 2025 15:25
Show Gist options
  • Select an option

  • Save Fashad-Ahmed/b1defe85b7f9e0444aed753592bb0e1d to your computer and use it in GitHub Desktop.

Select an option

Save Fashad-Ahmed/b1defe85b7f9e0444aed753592bb0e1d to your computer and use it in GitHub Desktop.

Quick Start Guide - Local Testing

NEW: One-command setup available! Run ./scripts/setup-local.sh for automated setup.

πŸš€ Quick Setup (5 minutes)

1. Start Supabase

supabase start

Copy the output - you'll need the keys!

2. Create Environment File

cp .env.example .env.development.local

3. Update .env.development.local

Replace with values from supabase start:

SUPABASE_URL=http://localhost:54321
SUPABASE_ANON_KEY=your-anon-key-here
SUPABASE_SERVICE_ROLE_KEY=your-service-role-key-here
COOKIE_SECRET=any-random-string
JWT_SECRET=your-jwt-secret-from-supabase-start
PORT=3000
FRONTEND_URL=http://localhost:3000
SERVER_URL=http://localhost:3000
COOKIE_DOMAIN=localhost
COOKIE_SECURE=false
COOKIE_SAMESITE=lax

4. Start Server

npm run start:dev

5. Test API (Option A - Script)

./scripts/test-api.sh

5. Test API (Option B - Manual)

Login:

curl -X POST http://localhost:3000/api/v1/auth/login \
  -H "Content-Type: application/json" \
  -d '{"email":"[email protected]","password":"TestPass123!"}' \
  -c cookies.txt -v

Make authenticated request:

curl -X GET http://localhost:3000/api/v1/user/me \
  -b cookies.txt

πŸ“š Full Documentation

See LOCAL_SETUP.md for complete setup instructions.

πŸ”‘ Supabase URLs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment