Specimen

A personal health app for the iPhone, written in Swift and SwiftUI.

GitHub
Specimen's Gym screen on the iPhone: a card suggesting a deload, the workout templates with Upper A chosen, Start workout, and hard sets per muscle for the last 7 days.
Specimen's Gym screen on the Apple Watch: the templates Upper A (last used), Lower A and Full body, and Start workout.

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.