Elio Darras
Personal projectDistributed on TestFlight

Darrao Sport

Training and energy tracker for iOS

App screenshots
Real app screenshots.

The workout on the Apple Watch

Course · 8 × 1 min9:41
24:125,08 km
4'46"/km
Bloc 5 / 8 · fraction162 bpm
Z1Z2Z3Z4Z5
Illustration, not a capture
A drawn illustration of what the device shows. Not a capture.

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 computes a daily energy score from Apple HealthKit and pushes structured workouts to the Apple Watch. The AI coach runs on the device: no health data ever leaves the phone.

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

01The principle

A personal iOS app that brings together three usually separate logbooks: 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 choices. The model never computes: a score produced by a model is neither reproducible nor testable, so everything numeric is computed in Dart and the model narrates it. The AI runs on the phone, with Apple Foundation Models on iOS 26: zero bytes added, zero cost, offline, no health data leaves. And there is always a deterministic fallback: 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.

02Energy

The chain: HealthKit, aggregation of the night and the day before, score computation, then text. The score starts from a 40-point base, plus signed contributions: sleep duration, quality, heart-rate variability, resting rate, activity load, declared stress. Bounded from 1 to 100.

Everything is relative to the person: each metric is compared to their 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 say why they are empty, and a free-question energy coach with non-negotiable guardrails: never a diagnosis, never a pathology name, no fasting, no hard effort on low recovery.

03Running

The import reads the coach's file as .xlsx, .csv or .pdf and extracts repetitions, recoveries buried in an instruction, pace and heart-rate ranges, the gym tab attached to the right day. Contradictions in the file are flagged, never silently fixed, and re-importing keeps progress.

The programme is a queue, not a calendar: the next workout is the first not done. 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 composes 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 per zone. The verdict is computed before any call to the model. Then kilometre by kilometre, block by block, comparison with sessions of the same type, and export as images or as JSON and CSV.

04Gym, sensors, agenda

Three sources of gym sessions: the cycles from the coach's file, hand-made sessions, 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: notification and Live Activity in the Dynamic Island, with buttons handled by App Intents.

Nothing is lost: every gesture goes into a draft, every ticked set into history instantly. The logbook tracks history per exercise, estimated 1RM, records, and which plates to load on the bar.

Sensors: Polar H10 chest strap read over Bluetooth, heart rate and RR intervals, with its internal memory for swimming; treadmill over FTMS for real distance and incline; writing to Health with a closed list of sports; TCX export to Strava.

Optional: 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, exportable and restorable as one file, erasable from the profile.

05Native, 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: the JSON is 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, violet-to-blue gradient. Never a shadow on an animated element, no looping animation, selected state never carried by colour alone, 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. TestFlight distribution with Dart hotfixes over the air through Shorebird, never installed silently: on a health app, you must know when the code that interprets your data changes.