Working with different workout formats
A session can include intervals, recovery periods, circuits and warm-ups. I separated the logic for reading those formats and calculating their duration, so the daily plan can use the actual workout structure.
Training is harder to keep track of when the program, session times and nutrition plan live in different places. Moving a workout or changing its duration can mean working out the rest of the day again by hand.
I built a training app that brings my program, daily workouts, session tracking and fuel planning together. The app combines the training program with saved session details and schedule changes.
A fuel engine uses explicit rules to plan around the day’s workouts. Training state and logs are saved through serverless endpoints, keeping completed sessions separate from future program changes.
The architecture, at a glance.
Sessions, formats and planned durations
Timing, location and saved session changes
Rules based on the day’s training
Workout details, timers, logs and the daily plan
Session changes and completed logs are saved to Neon Postgres through serverless endpoints and loaded when the app opens.
A session can include intervals, recovery periods, circuits and warm-ups. I separated the logic for reading those formats and calculating their duration, so the daily plan can use the actual workout structure.
I can move or change planned sessions without rewriting completed logs. Saved overrides and historical records are kept separate from updates to the future program.
The fuel engine uses explicit rules and checks its inputs. I can test what happens when a session moves, gets skipped or changes duration, without asking a model to generate a new plan each time.