HealthData

A complete health data ecosystem — from multi-source ingestion to ML predictions, from personalized coaching to workouts pushed directly to the watch. Built solo, with AI as a development partner.


The problem

My Whoop band says recovery is at 62%. My Garmin shows a Body Battery of 45 and a training status of "Unproductive". Two sensors, two algorithms, two different answers to the same question: is my body ready to train today?

The answer isn't in either app. It's somewhere in between.

The complete loop

I built a system that consolidates all sources, models the data, and produces a concrete result: an adapted workout every week, validated by simulation, pushed directly to my Garmin watch. Not another app — a complete ecosystem, from ingestion to wrist.

The complete HealthData loop: data sources, consolidation, ML prediction, coaching, workout generation, Garmin push, execution, feedback

10 endpoints, under 3 seconds

Garmin, Whoop, Withings, Foodvisor — each source has its quirks. Garmin has no public API for physiological data. Whoop is well-documented but limited. Nutrition goes through HealthKit as an abstraction layer. The pipeline unifies everything in parallel, in under 3 seconds.

Unified ingestion pipeline: Nutrition via HealthKit, Whoop, Garmin to 10+ endpoints in under 3 seconds

Who do you trust?

My resting heart rate: 5.53 bpm average gap between Garmin and Whoop over 3 years. Not a bug — a difference in measurement methodology. The kind of insight you only get by cross-referencing your sources over time, in a BigQuery notebook built with Claude.

Sleep seasonality, training load impact on recovery, multivariate anomaly detection — the questions the apps never ask.

Two brains

5 Random Forest models predict recovery, sleep, strain, weight and effort — with confidence intervals and feature importance for each variable. But an ML model isn't enough. It can't interpret, negotiate, or understand that you have a meeting at noon.

Claude orchestrates 55 tools via the Model Context Protocol. It interprets predictions, enforces coaching rules, and produces a contextualized recommendation. Neither is sufficient alone.

ML architecture: 5 Random Forest models for recovery, sleep, strain, weight and effort prediction

Coaching, not a chatbot

The coaching engine doesn't just recommend — it protects. Every suggestion passes through quantitative guardrails: Training Stress Balance measures cumulative fatigue, the Acute:Chronic Workload Ratio catches risky load spikes, and sleep debt modulates allowed intensity. No back-to-back HIIT sessions. Forced rest if ACWR exceeds 1.5.

Safety guardrails: Training Stress Balance, Acute:Chronic Workload Ratio, Recovery and sleep debt

Before validation, every plan is simulated. The Digital Twin replays the week day by day: each simulated session generates a load that modifies the next day's predicted recovery. If the simulation detects an overreach risk by end of week, the plan is adjusted before it's even proposed.

Coaching inputs and constraints flowing to workout output, then recursive Digital Twin simulation

"What are we doing tomorrow?"

That's my evening question. Not in Garmin. Not in Whoop. In Claude, on my phone. Claude calls the tools it needs, cross-references my data, and responds. If the workout is validated, it's on my watch before I leave.

Claude app: asking 'On fait quoi demain ?' in the Jean-Claude le Coach project
The question
Claude calling MCP tools: hd_get_coaching_board, fetching data in real time
MCP tool calls
Claude's thought process: coaching board analysis, target TSS, ML projection, workout template
The reasoning
Coaching response: Run Z2 50min, target HR 135-150 bpm, detailed structure with ML explanation
The recommendation

The interfaces

SvelteKit Dashboard — Deep analysis

ML predictions with confidence intervals, activity journal in calendar view, cross-metric correlations — the web interface for digging deeper. 390 Svelte components, 40+ pages.

SvelteKit dashboard: tomorrow's recovery prediction score 58, model confidence, personalized recommendations and influencing factors
Activity journal: calendar view with bubbles proportional to training load, filterable by workout type

iOS App — Daily check-in

Training load, daily prescription, recovery factors — everything at a glance. Swift 6, native SwiftUI, 476 files.

iOS app, Training tab: daily prescription Maintain, Strain Guidance, Training Load CTL 99 / ATL 90 / TSB +10
iOS app, Health tab: Recovery with contributing factors — Sleep Score, HRV, Resting HR, Strain, SpO2

BigQuery Notebooks — Long-term exploration

Garmin vs Whoop comparison over 3 years, contextual anomaly detection, seasonality — the analyses the apps never run. Co-built with Claude in BigQuery.

BigQuery notebook: daily HRV comparison Garmin vs Whoop over 6 months, overlaid time series
BigQuery notebook: contextual Z-Score anomaly detection — HRV crashes vs rolling baseline over 3.5 years

Infrastructure

40+ Cloud Functions in Node.js and Python, real-time Firestore, BigQuery for analytics, a native iOS app, and an MCP server on Cloud Run — all orchestrated by a single developer.

Infrastructure: Serverless compute with Node.js and Python, Database with Firestore and BigQuery, Mobile native iOS with SwiftUI, Intelligence with FastMCP on Cloud Run

Tech stack

SvelteKit Svelte 5 Swift 6 SwiftUI Node.js Python Cloud Functions Firestore BigQuery Cloud Run FastMCP Random Forest OAuth 2.0 Garmin API Whoop API HealthKit

Want to know more?

The full technical deep-dive is coming to Substack — or check out my services.