Skip to content
Amine Benlaroui
All projects

iOS and Android app, AI

Ironmile

On the App Store

A coach that plans running and strength training together, and rewrites the week when life gets in the way.

Downloads
3
Stack
Expo, Next.js, Neon, Claude
Watches
Apple Health, Health Connect, Polar, COROS

App Storeironmile.app

Today: the morning run, the evening lift
  • Model chosen blindThree models compared on 25 cases

  • Checked by codeEvery plan passes rules before it reaches the athlete

  • Written without waitingNext week starts as soon as the last session is done

  • Wired to watchesApple Health, Health Connect, Polar and COROS

The problem

A hybrid athlete, who runs and lifts, juggles two apps that do not talk to each other. The running app does not know the legs are heavy after yesterday's squats, the lifting app ignores Sunday's long run. And a fixed plan does not survive the first week of poor sleep or the first knee that complains.

What I built

  • An Expo app for iOS and Android, a Next.js API on Vercel, a Neon (Postgres) database with Drizzle, Better Auth for accounts and RevenueCat for the subscription.
  • A few questions, then the first week and the road to the goal. Every session carries one line saying why it is there.
  • The week rewrites itself when it has to: reported pain, a missed key session, an effort far above plan. A rewrite never makes the week heavier.
  • At the gym: pre-filled sets, last time under each exercise, a rest timer, swaps with the alternatives the coach prepared. Everything works offline except the coach.
  • Health data is read, never written: workouts, heart rate, sleep, heart-rate variability, from Apple Health and Health Connect, and directly from Polar and COROS.
  • Ironmile on the web, at ironmile.app: the app's screens, reading the same functions and writing through the same routes. Open to my own account only, for now.
  • A connector for Claude: a remote MCP server for which Ironmile is itself the OAuth 2.1 authorization server (dynamic client registration, PKCE). From Claude you read your plan and act as the app's buttons do: a note, a pain, a swapped exercise, a rewrite asked of the coach, the goal or a tune-up race. On my account the chat can also be the coach: the week it writes goes through the same rules in code as the server coach's. Open to my own account only, for now.

How the coach is built

  • The model was chosen blind: Opus, Sonnet and Haiku wrote plans for 25 cases, compared without knowing which wrote what. Opus won, especially on experienced runners and muscle-building goals. It writes every plan, with Sonnet as a fallback.
  • The coach's guide is written as a procedure and checked against the research literature: no run more than 10% longer than the longest of the last 30 days, at most three hard days a week, never two in a row.
  • A model's promise is not a check. Every plan passes rules written in code before it is saved. What is mechanical is fixed by code; the rest goes back to the coach as sentences it can act on, and only the faulty sessions are repaired.
  • The coach reads twelve weeks of history, summarised by code at a fixed size, last week in full, and a short memory of what the athlete likes, owns or protects.
  • Next week is written as soon as this week's last session is done, or by the day and time the athlete chose. The app keeps the current week until the new one is ready.
  • With a watch (version 1.0.2), two heart-rate numbers: a ceiling for easy runs and a threshold cap, taken only from a 30-minute test, an all-out race or the number you enter. Code places them on the sessions, not the model: adding them to the coach's answer format made the API refuse every call, while the local evaluations passed. A test now sends production's real request.

Keeping it honest

  • A test fails if any API route is not scoped to the signed-in user. No route takes a user id from the URL or the body.
  • What the app says about itself is one list of facts, whose numbers are read from the code that enforces them. The site and the posts cite it; when a fact changes, whatever cites it is flagged.
  • The very first week, without a note, is written by code from the answers. That code was run on every combination of answers, about 316,000 weeks, all within the rules.
  • API responses only grow: an installed app still reads the old fields. A build that is too old shows a single screen, “Update”.

All the way to the store

A script archives the app, signs it, numbers the build from the git history and uploads it to App Store Connect, from where it lands in TestFlight. The listing, the screenshots and the submission go through the App Store Connect API. Maestro flows drive the app on the iOS simulator and the Android emulator: sign-up, questions, paywall, gym, health.

Version 1.0.0 was submitted to Apple's review on 21 October 2026, with its two subscriptions, then again on 5 November with a paywall that spells out what the subscription gives. Apple accepted it: it has been on the App Store since November 2026, and ironmile.app is live, with a blog.

What's next

  • The Google Play release, then sign-in with Apple and Google.
  • A direct Garmin connection for everyone, once Garmin approves Ironmile.

What I would do differently

  • Build the evaluation bench before picking the model. I started with the cheapest one, counting on rules in code to hold the quality: the blind evaluation showed that rules enforce limits, not judgement.
  • Test the way out of every screen. The opening questions offered no way to sign out; I only saw it at submission time.

The screens