Cloud deck storage with owner-scoped RLS.
Scope
- Migration
profiles (id → auth.users, handle unique-nullable, display_name, avatar_url), RLS public-read/owner-write + handle_new_user() signup trigger.
- Migration
decks (id, owner_id, name, gameplan text?, inks text[] ≤2, cards jsonb = [{cardId,quantity,isCore}], is_public default false, slug unique) + updated_at trigger; RLS select using (is_public or auth.uid()=owner_id), insert/update/delete owner-only.
deckRepository.ts CRUD (guarded by getSupabase()).
- Regenerate
database.types.ts; run pnpm test:supabase + get_advisors.
Part of #451 · Deck Builder & Engine Score milestone.
Cloud deck storage with owner-scoped RLS.
Scope
profiles(id → auth.users,handleunique-nullable,display_name,avatar_url), RLS public-read/owner-write +handle_new_user()signup trigger.decks(id,owner_id,name,gameplan text?,inks text[]≤2,cards jsonb=[{cardId,quantity,isCore}],is_publicdefault false,slugunique) +updated_attrigger; RLSselect using (is_public or auth.uid()=owner_id), insert/update/delete owner-only.deckRepository.tsCRUD (guarded bygetSupabase()).database.types.ts; runpnpm test:supabase+get_advisors.Part of #451 · Deck Builder & Engine Score milestone.