Darrao Sport
Training and energy tracker for iOS
App screenshotsThe workout on the Apple Watch
4'46"/km
Screen by screen
01Your energy: today's score, the planned workout, the month's records and the agenda.
02The morning report, written on-device by Apple Intelligence. No data leaves the phone.
03The score breakdown: sleep, quality, heart-rate variability, resting rate, activity load.
04Week 7 of 10: a double workout, threshold and neuromuscular, with its target paces.
05Program progress and shortcuts: free workout, history, edit the week, my files.
06The tools: create a run sent to the watch, routines, gym sessions, treadmill.
07Onboarding: what the app reads from Health, read-only.
Role
Personal project
An iOS app that works out a daily energy score from Apple HealthKit and sends structured workouts to the Apple Watch. The AI coach runs on the phone itself, so no health data ever leaves it.
What's inside
- Daily energy score computed from Apple HealthKit.
- Structured workouts pushed to the Apple Watch through WorkoutKit.
- Live Activities during training.
- Polar H10 and FTMS Bluetooth sensors.
- On-device AI coach, no health data ever leaves the phone.
- Flutter, native Swift, NestJS backend.
In detail
01Where it comes from
I have a coach for my baseball preparation and for the races ahead. He sent me my programme in an old Excel file, honestly painful to follow day to day. Rather than copy it out by hand, I decided to build an app that reads it directly.
While I was at it, it brings together everything I was noting elsewhere. Today's energy, read from Health. The running sessions, sent to the watch. The gym, with its sets, loads and records. Everything runs on the phone, with no account and no server, and an on-device AI coach comments on the numbers without ever producing them. It's a personal app first, built for my own training, and that's where its standards come from.
02The principle
A personal iOS app that brings together three logbooks people usually keep apart. Today's energy, read from Health. The running programme, the one the coach writes in an Excel file. And the gym, with its sets, loads and records. Everything is computed on the phone, with no account and no server, and an on-device AI that comments on the numbers without ever producing them.
Three rules explain most of my choices. First, the model never computes, because a score produced by a model is neither reproducible nor testable. So everything numeric is computed in Dart, and the model narrates it. Second, the AI runs on the phone, with Apple Foundation Models on iOS 26, so zero bytes added, zero cost, it works offline, and no health data leaves. Third, there is always a deterministic fallback, and no screen depends on a network call or an inference to render.
148 Dart files, about 49,300 lines, 10 Swift files, 93 test files and 698 tests. 187 commits since 21 July, version 1.14.5.
03Energy
The chain goes from HealthKit to a piece of text, through the aggregation of the night and the previous day and the score computation. The score starts from a 40-point base, to which signed contributions are added, sleep duration, quality, heart-rate variability, resting rate, activity load, declared stress. It is bounded from 1 to 100.
Everything is relative to the person. Each metric is compared to their own 30-day baseline, and the percentage gap is what weighs. The trend has a 4-point threshold so measurement noise never flips the arrow.
Around it, a cache of the latest report, a per-metric breakdown with direct access to the coach on that topic, empty screens that explain why they are empty, and a free-question energy coach with non-negotiable guardrails. Never a diagnosis, never the name of a condition, no fasting, no hard effort on low recovery.
04Running
The import reads the coach's file as .xlsx, .csv or .pdf and pulls out the repetitions, the recoveries buried in an instruction, the pace and heart-rate ranges, and the gym tab attached to the right day. Contradictions in the file are flagged, never silently fixed, and re-importing keeps your progress.
The programme is a queue, not a calendar. The next workout is simply the first one not done yet, and doing Monday on a Tuesday is normal. Whole weeks can be realigned, or a single session moved.
Sending to the Apple Watch goes through WorkoutKit. "8 × 1 min at 4'08"–4'27"/km, 1 min recovery" becomes a native interval workout, run by the Workout app, with no watchOS app to write. A run builder also lets you compose a session by hand, with what the watch targets at each step.
The post-run report re-reads HealthKit and compares planned to actual, duration, distance, pace, average and max heart rate, and above all time spent per zone. The verdict is computed before any call to the model. Then come the kilometre by kilometre view, the block by block breakdown, the comparison with sessions of the same type, and export as images or as JSON and CSV.
05Gym, sensors, agenda
Gym sessions come from three places, the cycles in the coach's file, sessions created by hand, and the free session. Routines sorted in folders, a session screen with the previous set in sight, a custom numeric pad, and a tick that starts the rest timer. That timer survives screen changes, closing the app and locking the phone, with a notification and a Live Activity in the Dynamic Island whose buttons go through App Intents.
Nothing is lost. Every gesture goes into a draft, and every ticked set goes into the history instantly. The logbook tracks history per exercise, the estimated 1RM, the records, and works out which plates to load on the bar.
On the sensor side, a Polar H10 chest strap read over Bluetooth, heart rate and RR intervals, with its internal memory for swimming, a treadmill over FTMS for real distance and incline, writing to Health with a closed list of sports, and TCX export to Strava.
Optionally, a nutrition module with needs computed from what the watch saw, an agenda synced with the iPhone calendar, and body tracking. Everything lives on the device, exports and restores as one file, and can be erased from the profile.
06Native, design, delivery
Nine native Swift channels, workout, AI, Live Activity, reminders, calendar, Polar, treadmill, strap, files. On the AI side, generation is guided by a declared structure, which makes the JSON valid by construction. Five uses, all under the same rule, and on an iPhone without Apple Intelligence everything still works.
One design system. Near-black background, frosted glass, a violet-to-blue gradient. Never a shadow on an animated element, no looping animation, the selected state never carried by colour alone, and reduced motion respected. Nine-state orbs replace spinners, and a companion orb follows the user, breathes, and slips a word into a bubble.
698 tests written in French, describing a product guarantee rather than an implementation. CI on every push, reproducible locally. Distributed through TestFlight, with Dart hotfixes over the air via Shorebird, never installed silently. On a health app, you need to know when the code that interprets your data changes.