[Expo App] ──Supabase JS──► Auth / Postgres / Storage (RLS)
│
└──Bearer──► [Express :3001] ──service role──► Supabase
│
├── OpenAI (embed + generate)
└── RevenueCat (Pro checks)
Goal: Running Expo app with navigation shell and Uniwind.
| # | Sub-chapter | Files |
|---|---|---|
| 1.1 | Create Expo 55 project & scripts | package.json, app.json, tsconfig.json |
| 1.2 | Wire Metro + Uniwind | metro.config.js, src/global.css, src/uniwind-types.d.ts |
| 1.3 | Theme & navigation tokens | src/lib/theme.ts, src/lib/navigation.ts |
| 1.4 | Root layout & splash | src/app/_layout.tsx |
| 1.5 | Placeholder route groups | src/app/(auth)/_layout.tsx, src/app/(app)/_layout.tsx, src/app/(app)/(tabs)/_layout.tsx |
Checkpoint: App opens with empty auth/app shells.
Goal: App can talk to Supabase; types exist for later features.
| # | Sub-chapter | Files |
|---|---|---|
| 2.1 | Create Supabase project & env | .env (EXPO_PUBLIC_SUPABASE_URL, EXPO_PUBLIC_SUPABASE_KEY), supabase/config.toml |
| 2.2 | Extensions & enums | supabase/migrations/20260708043706_extensions_and_enums.sql |
| 2.3 | Supabase JS client | src/utils/supabase.ts |
Checkpoint: Client initializes; no auth UI yet.
Goal: Sign up / login / logout; protected routes.
| # | Sub-chapter | Files |
|---|---|---|
| 3.1 | Profiles table + trigger | supabase/migrations/20260708043718_profiles.sql |
| 3.2 | Auth store (Zustand) + AuthScreen | src/features/auth/auth.tsx |
| 3.3 | Login & signup screens | src/app/(auth)/login.tsx, src/app/(auth)/signup.tsx |
| 3.4 | Auth layout redirect (logged-in → app) | src/app/(auth)/_layout.tsx |
| 3.5 | App layout guard (logged-out → login) | src/app/(app)/_layout.tsx |
| 3.6 | Init session in root | src/app/_layout.tsx |
Checkpoint: Full auth loop; unauthenticated users can’t enter (app).
Goal: Data model + security before any UI CRUD.