Supabase Setup
CommonPlace uses Supabase for authentication, database, and storage.
Creating a Project
- Sign up at supabase.com
- Create a new project
- 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
- Open the Supabase dashboard
- Go to SQL Editor
- Copy and paste each migration file in order
- Execute
Required Tables
The following tables are created by migrations:
| Table | Purpose |
|---|---|
profiles | User profiles |
posts | User posts |
friendships | Friend connections |
circles | Friend groupings |
messages | Direct messages |
reports | User reports |
Authentication Setup
- Go to Authentication → Providers
- Enable Email provider (minimum)
- Configure email templates if desired
Storage Buckets
Create the following storage buckets:
avatars— User profile imagespost-media— Post attachmentsvoice— 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