

Why one app
Training, food, sleep and body weight usually live in separate apps, each seeing only its own slice. Here they share one database, so a feature can combine them:
- Calorie goal (Today, Food)
- Resting energy from the profile and weight trend, the ring's activity that day, and a correction learned from food logs and the weight trend
- Gym calories (Gym)
- The workout log (lifted volume, body size) in place of the watch's estimate, which counts lifting at about twice its measured cost
- Deload check (Insights, Gym)
- Training volume, the strength trend and heart rate variability (HRV)
How it is built
- The data lives on the phone.
- HealthData keeps it in a local SQLite database (GRDB) with the server schema's checks, keys and triggers.
- Logic in pure functions.
- Everything that calculates (calorie goal, strength estimates, sleep and substance analyses, the food tables fill) lives in HealthCore with unit tests.
- Oura's sign-in on the server.
- One Supabase Edge Function runs the OAuth flow and token refresh, so the client secret and refresh token never reach the phone.
- One database schema.
- Supabase CLI migrations define it and tests run the SQL in PGlite.
- CI (GitHub Actions):
- typecheck, TypeScript and SQL tests; the Swift tests run on the Mac.
How it was made
Built via a spec-driven agentic workflow in Claude Code, pairing human-led architecture and specs with custom hooks, skills, automated tests, and cross-model reviews via Antigravity, backed by manual testing and curated UX/UI.
- Every feature starts as a written plan with its open questions; I answer them and approve the plan before anything is built.
- Visible choices (layout, wording, colours) come to me as questions, each with a suggested default.
- For science decisions Claude researches the primary studies and lays out options; I make the call.