Supabase Setup

Setting up your Supabase project for DirectoryKit.

Create a project

  1. Go to supabase.com and create a new project
  2. Choose a region close to your users
  3. Set a secure database password

Run the schema

Open the SQL Editor in your Supabase dashboard and run the contents of supabase/schema.sql. This creates all tables, indexes, triggers, and RLS policies.

Alternatively, use the migration script:

pnpm db:migrate

Get your credentials

From Settings → API, copy:

  • Project URLNEXT_PUBLIC_SUPABASE_URL
  • Anon KeyNEXT_PUBLIC_SUPABASE_ANON_KEY
  • Service Role KeySUPABASE_SERVICE_ROLE_KEY

Configure authentication

Email/password

Enabled by default in Supabase. Configure email templates in Authentication → Email Templates.

Google OAuth

  1. Go to Authentication → Providers → Google
  2. Add your Google OAuth credentials (Client ID and Secret)
  3. Set the redirect URL to your-domain.com/auth/callback

Storage

DirectoryKit uses S3-compatible storage for file uploads (not Supabase Storage). See Requirements for supported providers.

Regenerate types

After schema changes, regenerate TypeScript types:

SUPABASE_PROJECT_ID=your-project-id pnpm supabase:types