Recovery-aware AI workout planner
Builds each workout from per-muscle recovery, available equipment and a time budget, with instant offline logging, the AI choosing and explaining while code owns the arithmetic.
Problem
Generic workout apps ignore which muscles are still recovering, what equipment is available that day and how much time there is. A household sharing one app also needs separate histories and optional sync that never blocks logging.
Goal
Generate each session from real per-muscle recovery, the day's equipment and a time budget; keep set logging instant and offline; and let the AI choose and explain while code owns anything that is arithmetic.
My role
Sole designer and engineer across the product, the front end, the serverless functions, the AI integration, the export formats and verification.
Solution
An installable, local-first web app. Deterministic code computes recovery, volume and progression, and an AI model chooses and explains exercises from a candidate list that code has already filtered, under a strict response schema. A thin serverless layer proxies the model and handles opt-in sync across devices, and neither can ever block logging a set.
How it works
Logging. Sets are logged to on-device storage, together with the muscles each exercise loads.
Recovery. A recovery engine compares the hours since each muscle was last trained with a per-muscle recovery window, and picks a focus: a classic split day, whatever is rested, or muscles the user chooses.
Candidates. Code builds a candidate list filtered by the day's equipment and biased toward movements not done recently.
Volume. A volume model works out how many sets fit the time budget from work time per set, transitions and optional warm-up and stretch blocks, and caps sets per muscle at a research-based ceiling.
The model's part. A server function sends the model the candidates, the goal's repetition and rest prescription, and each exercise's last performance (comfortable, hard, partial or new), and requires a structured JSON reply. Code validates the plan and fills any gaps.
Failover. A fallback chain tries several providers in order, including an edge-hosted model, and if every one fails an offline planner builds the session locally.
The session. Timers, rest overlays, supersets and effort ratings run on the device, a checkpoint survives refreshes, and finishing a session is transactional.
Export and sync. Sessions export to standard fitness file formats (binary FIT with strength-set messages, and TCX), and cross-device sync is optional.
Technical challenges
A short candidate pool silently produced short sessions until the budget counted sets instead of exercises.
One arithmetic module shared between the browser and the serverless bundle, with no runtime imports.
Provider outages and exhausted quotas.
Valid binary fitness files, proven by byte-level decode round trips.
Sessions that survive refreshes, closing the app and device sleep.
A scripted end-to-end verification run for every fixed bug.
Capabilities
- Recovery-driven focus selection
- Equipment- and time-aware session generation
- Progressive-overload guidance
- Supersets and rest timers
- Exercise media and muscle diagrams
- Logging of outside workouts
- History and summaries
- Fitness-file export
- Several profiles on one device
- Opt-in cross-device sync
- An offline fallback planner
Technology
Impact
An app in daily use whose plans reflect real recovery and the time available. Logging never depends on the network, and an AI failure degrades to a locally built plan instead of blocking a workout.
Skills demonstrated
- Separating deterministic logic from generative output
- Structured output from an LLM
- Failover across providers
- Local-first architecture
- Binary file-format generation
- End-to-end verification discipline
Demo
PlannedOne fake profile with a generated three-week log. The demo shows the per-muscle recovery view, choosing a focus, today's equipment and a forty-five-minute budget, the generated plan with code-computed set counts beside the AI's explanations, and a finished session exported as a sample fitness file. The plan comes from a canned mock model response: no API key, no live endpoint and no real log.
Not built yet. A demo here uses only invented names and data.