Pipelinehow the machine is wired
Six sources, one store, one engine, one coach. Production reads are strictly SELECT-only; nothing on this surface can write.
Data Flow
ARCHITECTURE- Watch Ultra
- Lab PDFs
- Meal photos
- Manual logs
- HealthKit export
- n8n parse flows
- Quick-log UI
- Supabase (prod, RO)
- Sample modules (dev)
- Notion (optional)
- Composite score
- 5 pillars
- Correlations
- Focus queue
- This dashboard
- Coach (OpenAI)
- PWA on desktop
Source Registry
6 FEEDS| Source | Provides | Cadence | Path | Status |
|---|---|---|---|---|
| Apple Watch Ultra | Sleep, HRV, RHR, workouts, VO2, temp, SpO2 | Continuous · syncs on wake | HealthKit export → parser | live source |
| Quarterly Bloodwork | 55-marker panel across 8 sections | Every ~90 days | Lab PDF → n8n parse → store | jun 5 draw |
| n8n Meal Pipeline | Meal photos → macros, template compliance | Per meal | Photo → GPT parse → Supabase | v2 |
| Manual Entries | Habits, fasts, reaction tests, DEXA | Daily | Quick-log UI | human |
| Score Engine | Composite + 5 pillars + correlations | Nightly 06:00 | All sources → weighted model | v3 |
| Coach (OpenAI) | Conversational layer over all data | On demand | gpt-4o-mini · server-side key | key loaded |
Prod Schema Probe
SELECT-ONLY| Table | Purpose | State |
|---|---|---|
| health_scores | Nightly composite + pillar scores | pending — sample fallback active |
| biomarker_readings | Lab + wearable marker time series | pending — sample fallback active |
| activity_logs | Unified event stream (logbook) | pending — sample fallback active |
| profiles | Identity, goals, device registry | pending — sample fallback active |
| library_items | Existing prod table used as reachability probe | reachable |
Operator Profile
IDENTITY- OperatorShawn Jerry (@shawn)
- Age / Sex21 · Male
- Height / Weight183 cm · 79 kg
- WearableApple Watch Ultra
- Bloodwork CadenceQuarterly
- System Live SinceMay 2026
- standing goalsVO2 max 56 by SeptemberOmega-3 index above 8%Sleep score 85+ average
Guarantees
NON-NEGOTIABLERead-only prod. The Supabase client uses the RLS-protected publishable key and issues SELECTs only. There is no code path that writes to production from this app.
Server-side secrets. OPENAI_API_KEY and NOTION_TOKEN live in .env.local without a NEXT_PUBLIC_ prefix; they are read in route handlers and never shipped to the browser.
Honest sourcing. Every page carries a LIVE or SAMPLE badge. Sample modules are structured 1:1 with the intended prod schema so the swap is a data change, not a rewrite.
Graceful degradation. Supabase down → sample data. OpenAI down → grounded local stub. Notion absent → nothing blocks. The dashboard always renders complete.