Skip to main content

Supabase Setup

CommonPlace uses Supabase for authentication, database, and storage.

Creating a Project

  1. Sign up at supabase.com
  2. Create a new project
  3. Note your project URL and anon key

Running Migrations

Database schema is managed through migration files in supabase/migrations/.

Option 1: Supabase CLI

# Install Supabase CLI
npm install -g supabase

# Link to your project
supabase link --project-ref your-project-ref

# Run migrations
supabase db push

Option 2: SQL Editor

  1. Open the Supabase dashboard
  2. Go to SQL Editor
  3. Copy and paste each migration file in order
  4. Execute

Required Tables

The following tables are created by migrations:

TablePurpose
profilesUser profiles
postsUser posts
friendshipsFriend connections
circlesFriend groupings
messagesDirect messages
reportsUser reports

Authentication Setup

  1. Go to Authentication → Providers
  2. Enable Email provider (minimum)
  3. Configure email templates if desired

Storage Buckets

Create the following storage buckets:

  • avatars — User profile images
  • post-media — Post attachments
  • voice — Voice narration files

Set appropriate RLS policies on each bucket.

Verifying Setup

After migrations, verify:

  • Tables are created
  • RLS is enabled on all tables
  • Functions are created
  • Triggers are active

Last updated: 2026-02-07