Docs·UnderPeaks

Connecting Your Database · Supabase

Supabase

Supabase is the recommended adapter for Underpeaks Core and the easiest to get started with.

Create a Supabase project

  1. Go to supabase.com and sign in
  2. Click New project
  3. Choose a name, password, and region
  4. Wait for the project to provision (~2 minutes)

Get your credentials

In your Supabase project dashboard, go to Settings → API:

VariableWhere to find it
NEXT_PUBLIC_SUPABASE_URLProject URL
NEXT_PUBLIC_SUPABASE_ANON_KEYanon / public key
NEXT_PUBLIC_SUPABASE_SERVICE_KEYservice_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_role key bypasses RLS. Never expose it to the client.
  • Supabase free tier has a 500MB database limit and pauses after 1 week of inactivity.