diegoalvarezf.dev
Back
Active

APEX

An iPhone app to understand how I recover between workouts.

Private code

Why I built it

I use Strava and my watch every day, but each app showed me a different piece. I wanted to see it all together and have something explain what it meant. It ended up being my Master's thesis.

How it works

  1. 01Reads activities from Strava and health data from HealthKit: heart rate variability, resting heart rate and sleep.
  2. 02Computes recovery, Body Battery and training load by comparing you with yourself, not with an average.
  3. 03A Claude-based coach turns those numbers into advice and routines. The server decides what the model is asked, not the app.

Try it

Move the values and watch the day's recovery change.

Recovery

71

Ready to push

Simplified version of the real formula: 45% variability, 15% resting HR, 25% sleep and 15% load.

What I learned

That the hard part wasn't the AI, it was making the numbers make sense. I spent more time reading about physiology than building the coach.

Built with

SwiftSwiftUIHealthKitFastifyPostgreSQLClaude API
APEX — Diego Álvarez