4.3 KiB
4.3 KiB
Relationship App — Structure
Agent Roles
| Area | Owner | Notes |
|---|---|---|
| Backend, Supabase, Auth, DB, RLS | Neo | All server-side work |
| UI, Mobile UX, NativeWind, Design System | Scarlett | All visual/interaction work |
| QA, Testing, Build Verification | Bishop | Verify everything works |
| Security Review, Content, Moderation | Private_Hudson | Security-first features |
| Coordination, Git, Deployment | Ripley | Orchestrates pipeline |
Phase 1 — Foundation & Infrastructure (1.0.x)
Batches follow the rule: one focused task per batch, one agent, one pass.
Batch 1.0.1: Expo Project Bootstrap (Scarlett)
- Initialize Expo project with TypeScript template
- Configure ESLint + Prettier
- Create folder architecture (app/, components/, lib/, constants/, assets/)
- Configure app entry points (app/_layout.tsx, app/index.tsx)
- Verify:
npx expo startruns clean
Batch 1.0.2: Navigation Foundation (Scarlett)
- Install and configure Expo Router
- Create tab layout with placeholder tabs (Home, Questions, Milestones, Settings)
- Create stack layout for detail screens
- Verify: navigation between tabs and stacks works
Batch 1.0.3: Supabase Project Setup (Neo)
- Create Supabase project (or document connection to existing)
- Configure environment variables (.env.local, .env.example)
- Create Supabase client in lib/supabase.ts
- Create lib/supabase.ts with init and auth helpers
- Verify: client connects to Supabase instance, health check passes
Batch 1.0.4: Database Schema — Users & Couples (Neo)
- Create
profilestable (id, email, display_name, avatar_url, created_at) - Create
couplestable (id, partner1_id, partner2_id, created_at) - Create
couple_memberstable (id, couple_id, user_id, joined_at) - Row Level Security on all tables
- Verify: can insert/select with proper RLS, cross-couple isolation works
Batch 1.0.5: Auth — Magic Link Email (Neo)
- Configure Supabase Auth for email magic links
- Auth hook: useAuth() with session state
- Protected route wrapper component
- Logout handling
- Verify: magic link flow works end-to-end
Batch 1.0.6: Auth UI — Login Screen (Scarlett)
- Login screen with email input + "Send Magic Link" button
- Loading state, success message, error state
- Deep link handling for magic link redirect
- Verify: user can request and receive magic link, redirect works
Batch 1.0.7: Pairing — Code Generation (Neo)
- Generate unique 6-character pair codes
pair_codestable (id, code, creator_id, status, expires_at, created_at)- API: create pair code, expire old codes
- RLS: only creator can generate, only partner can claim
- Verify: code generation works, uniqueness constraint, expiration works
Batch 1.0.8: Pairing — Join Flow (Neo)
- Claim pair code endpoint
- Couple creation logic on successful claim
- RLS: couple_members only visible to members
- Verify: two users can pair, couple created correctly
Batch 1.0.9: Pairing UI — Enter Code Screen (Scarlett)
- "Share Your Code" screen showing generated code with copy button
- "Enter Partner's Code" screen with input + submit
- Paired state screen showing partner info
- Loading/success/error states throughout
- Verify: full pairing flow works on device
Batch 1.0.10: Design System — Theme & Tokens (Scarlett)
- Create constants/Colors.ts with warm color palette
- Create constants/Spacing.ts with spacing scale
- Create constants/Typography.ts with font sizes/weights
- NativeWind config extending Tailwind theme with custom tokens
- Dark mode color tokens
- Verify: tokens render correctly in both modes
Batch 1.0.11: Design System — Base Components (Scarlett)
- Button component (variants: primary, secondary, ghost; sizes: sm, md, lg)
- Input component (text input with label, error state)
- Card component (with header, body, footer)
- Avatar component (with fallback initials)
- Verify: all components render in light/dark mode
Batch 1.0.12: Home Screen (Scarlett)
- Home screen layout with greeting, daily question card, quick actions
- Navigation to question packs
- Warm, calm aesthetic matching design philosophy
- Verify: home screen renders with placeholder data
Cross-Cutting Concerns
- Security: Private_Hudson reviews auth, pairing, and RLS before Phase 2
- Testing: Bishop verifies each batch with build + runtime check
- Documentation: Bishop updates docs after each verified batch