Prerequisites
- A Supabase project at supabase.com
- Your project credentials (URL, anon key, service role key)
Database Migration
Run the migration
Copy the contents of
supabase/migrations/001_initial_schema.sql and run it. This creates all tables, indexes, RLS policies, storage buckets, and triggers.Verify tables
In Table Editor, confirm you see all 23 tables:
profiles, recipes, recipe_images, recipe_tags, recipe_tagged_users, recipe_favorites, recipe_reposts, recipe_comments, recipe_comment_mentions, posts, post_images, post_tags, post_tagged_users, post_favorites, post_reposts, post_comments, post_comment_mentions, collections, collection_saved_items, saved_items, follows, notifications, lightroom_settings.Storage Bucket Configuration
All 4 buckets are public with nofile_size_limit or allowed_mime_types restrictions at the bucket level:
| Bucket | Public | Bucket-Level Restrictions |
|---|---|---|
avatars | Yes | None |
cover-photos | Yes | None |
recipe-images | Yes | None |
post-images | Yes | None |
auth.uid() matches the folder name).
Environment Variables
Mobile (apps/mobile/.env) — primary development target:
apps/web-interim/.env.local) — only needed if working on auth callbacks or landing page:
apps/web/.env.local) — Phase 2, not needed for current development:
Using the CLI (Alternative)
Troubleshooting
Migration fails
Migration fails
Check for existing tables. If needed, drop and recreate the public schema:Then re-run the migration.
Can't upload images
Can't upload images
Verify storage policies exist in Storage → Policies. Check that buckets are set to public. Verify the user session is valid.
RLS too restrictive
RLS too restrictive
Check policies in Authentication → Policies. Temporarily disable RLS to test:Re-enable after debugging.