Connecting Your Database · Supabase
Supabase
Supabase is the recommended adapter for Underpeaks Core and the easiest to get started with.
Create a Supabase project
- Go to supabase.com and sign in
- Click New project
- Choose a name, password, and region
- Wait for the project to provision (~2 minutes)
Get your credentials
In your Supabase project dashboard, go to Settings → API:
| Variable | Where to find it |
|---|---|
NEXT_PUBLIC_SUPABASE_URL | Project URL |
NEXT_PUBLIC_SUPABASE_ANON_KEY | anon / public key |
NEXT_PUBLIC_SUPABASE_SERVICE_KEY | service_role key (keep secret) |
Set environment variables
In your .env.local:
NEXT_PUBLIC_DB_TYPE=supabase
NEXT_PUBLIC_SUPABASE_URL=https://your-project.supabase.co
NEXT_PUBLIC_SUPABASE_ANON_KEY=your-anon-key
NEXT_PUBLIC_SUPABASE_SERVICE_KEY=your-service-role-key
Enable Row Level Security
Underpeaks requires RLS to be enabled on all tables. Run the app and go to http://localhost:3000/installer — the setup wizard handles this automatically.
Notes
- The
service_rolekey bypasses RLS. Never expose it to the client. - Supabase free tier has a 500MB database limit and pauses after 1 week of inactivity.