This project uses Supabase remote instance only. You must have a Supabase project set up at supabase.com.
- Go to your project on supabase.com
- Navigate to Settings → API
- Copy the following:
- Project URL → Use for
SUPABASE_URL - anon public key → Use for
SUPABASE_ANON_KEY - service_role secret key → Use for
SUPABASE_SERVICE_ROLE_KEY
- Project URL → Use for
Update your .env file:
SUPABASE_URL=https://your-project.supabase.co
SUPABASE_ANON_KEY=your_anon_key_here
SUPABASE_SERVICE_ROLE_KEY=your_service_role_key_hereGo to your project dashboard on supabase.com
Note: Migrations require Supabase CLI. Install it and login:
npm install -g supabase
supabase loginBefore creating or applying migrations, link your local project to your remote Supabase project:
supabase link --project-ref your-project-refYou can find your project ref in your Supabase project settings (Settings → General → Reference ID).
supabase migration new migration_nameThis creates a new file in supabase/migrations/ with format: YYYYMMDDHHMMSS_migration_name.sql
supabase db pushThis applies migrations to your remote Supabase project.
supabase migration repair --status reverted migration_name- Files in
supabase/migrations/ - Format:
YYYYMMDDHHMMSS_migration_name.sql - Use transactions when possible
SUPABASE_URL=your_project_url
SUPABASE_ANON_KEY=your_anon_key
SUPABASE_SERVICE_ROLE_KEY=your_service_role_keyimport { createClient } from '@supabase/supabase-js';
const supabase = createClient(
process.env.SUPABASE_URL,
process.env.SUPABASE_ANON_KEY
);- Dashboard: Your project URL on supabase.com
- API URL: Your project API URL
- Documentation: supabase.com/docs