Vitals
Vitals by mariansan — a personal health intelligence platform for Galaxy Watch and Fitbit. Wearable data flows in automatically from two sources; Claude Sonnet synthesizes it into a daily briefing, trend analysis, and an AI coach.
What it does
- Ingests daily metrics from **Galaxy Watch** (companion Android app) and **Fitbit via Google Health API** — sleep, heart rate, HRV, SpO₂, steps, calories, workouts, weight, and body composition
- Runs a Claude Sonnet analysis over each snapshot and delivers a plain-language morning briefing with actionable recommendations
- **Trends:** 7-day and 30-day time-series charts across four metric categories, with delta indicators and period toggles
- **AI Coach:** a streaming Claude conversation with full health context — ask anything about your metrics and get structured, markdown-rendered guidance in real time
- Dashboard PWA can trigger an immediate sync from the companion app via FCM — no manual "Sync now" needed
- Live data refresh via Supabase Realtime — the dashboard updates the moment new data lands
- Supports multiple users — each person's data isolated at the database level by Supabase RLS
- Installable as a PWA with push notifications — morning brief and evening check-in delivered to the home screen
- Fully private, password-gated, noindex — no manual data entry
Why it matters
- Replaces 15–20 minutes of daily health review with a single 30-second briefing that actually changes what you do
- **Two data sources, one pipeline:** Galaxy Watch and Fitbit covered — device-agnostic from day one
- Zero-friction capture: WorkManager handles the daily Samsung Health sync automatically after one-time setup
- The Coach screen makes your data conversational — metrics become context, not just numbers
- Vercel Cron + `after()` replaced an n8n dependency — removed an external workflow orchestrator from the production stack
Architecture
- **Samsung path:** Galaxy Watch → Health Connect → companion Android app (WorkManager, 07:00 daily) → POST `/api/ingest`
- **Google Health path:** OAuth2 → Google Health API `list` endpoint → Vercel Cron daily ingestion — SpO₂, HRV, resting HR, respiratory rate, and VO₂ max use `list`, not `dailyRollUp`
- Claude Sonnet runs inside `/api/generate` via `after()` — response returns immediately; generation completes post-response without hitting Vercel's function timeout
- Coach screen streams tokens from `/api/coach` → ReadableStream → client; full daily snapshot included in the system prompt
- Supabase Realtime pushes `daily_analysis` updates live — zero-refresh UX
- FCM closes the loop: the dashboard triggers on-demand sync on the Android companion
- SpO₂ aggregated as daily median to resist outlier sensor readings; activity totals filtered to Samsung Health source only to prevent double-counting
Design
- Rebuilt from scratch against a Claude Design spec — 22 components audited, 50 pull requests
- Dark-first token system with WCAG AA across all three themes; ring+pulse brand mark with custom SplashScreen
- MetricTile, shared PageHeader, SpO₂ reference band, and BottomTabBar all redesigned to spec
Philosophy
- Wearable data earns its place only when it surfaces something you can act on today
- One briefing that changes what you do — not a graph you scroll past and forget
- The Coach screen makes data conversational: your metrics become context, not decoration
- Next.js
- Supabase
- Claude API
- Firebase
- Android
- Google Health API
- Recharts
- Tailwind CSS