On this page
A workout planner serves people who already know what they want to train but need a dependable plan-to-log workflow. Start with a reusable routine, a dated session and individual set records rather than exercise recommendations. This brief asks Apirex to build a native app; the first version should prove that changing tomorrow’s plan never rewrites yesterday’s completed training.
Screens
- Plans: create ordered routines with exercises and target sets, keeping archived routines available for reference.
- Today’s workout: start the selected routine and distinguish planned targets from actual performance.
- Set logger: record repetitions, load and completion, with an optional rest countdown after each saved set.
- History: open a dated session and inspect exactly what was recorded, including skipped exercises.
Data model
| Table | Key fields | Purpose |
|---|---|---|
| plans | id (uuid), title (text), archived (bool) | Reusable routines that remain separate from historical sessions. |
| plan_exercises | id (uuid), plan_id (uuid), position (int), name (text), target_reps (int) | Ordered exercise targets without prescribing a training program. |
| sessions | id (uuid), plan_id (uuid), started_at (timestamptz), completed_at (timestamptz?) | A dated snapshot of a workout in progress or completed. |
| sets | id (uuid), session_id (uuid), exercise_name (text), ordinal (int), reps (int), load (decimal), unit (text) | Actual performance, with units stored alongside the value. |
Choose local-only persistence for a private single-device training log; accounts and uploads are unnecessary for that scope. If the owner requests synchronization, add user_id ownership to plans and sessions and enforce backend row-level security through the parent session for every set. A trainer must not gain access merely because their name appears on a routine. Ask about deletion, kilograms versus pounds and whether editing a completed session is allowed before writing migrations.
Keep planned repetitions and completed repetitions visually distinct throughout the session. A skipped set is not a zero-load completed set, and deleting a draft exercise must not erase recorded performance. Ask whether rest periods continue when the phone locks, and explain notification limitations without claiming medical monitoring.
Native features for the workout planner app
Keep the routine template separate from actual reps and load so editing next week’s plan cannot rewrite a finished workout. Tie each rest interval to the current session and allow skipping without marking an unfinished set complete.
| Feature | Android (Kotlin) | iPhone (SwiftUI) | Notes |
|---|---|---|---|
| Live set logging | Room session snapshots | SwiftData completed-set records | Keep the routine template separate from actual reps and load so editing next week’s plan cannot rewrite a finished workout. |
| Rest interval cues | Deadline timer with optional notification | UserNotifications for an active rest deadline | Tie each rest interval to the current session and allow skipping without marking an unfinished set complete. |
| Optional session health export | Health Connect exercise write after consent | HealthKit workout write after consent | Only add health integration with an explicit session mapping and deduplication rule; logging sets alone is not a measured calorie calculation. |
Android notes (Kotlin and Jetpack Compose)
Render exercises and sets in a LazyColumn with stable session-exercise and set IDs. Numeric Material 3 fields should preserve an incomplete decimal draft while the lifter types; validating too early can turn a deliberate 12.5 load into an unintended whole number.
- When starting a workout, snapshot exercise names, target sets and units into Room session records. Keep the original plan editable independently, and store actual completed reps and load per set rather than continually reading targets from the live routine template.
- Use a ViewModel for the active rest interval and persist its deadline for background reconciliation. A ModalBottomSheet can edit the next interval, but WorkManager should not be presented as an exact rest buzzer; a denied notification leaves the in-app timer available.
- On Android, record two sets at 12.5 kilograms, lock the phone during rest, and reopen before the next set. Change the routine template from another screen and confirm the current session retains its snapshot. Finish twice quickly and verify there is one completed session with the intended set values.
iPhone notes (Swift and SwiftUI)
Use NavigationStack from routine to active session and a List keyed by set identifier. Keep each editable reps-and-load pair in a draft that commits on an explicit logging action, so scrolling away does not record a half-typed weight as a finished set.
- SwiftData can hold the routine template and the session snapshot as separate relationships. Store the load unit with each set and label conversions explicitly; changing the display preference from kilograms to pounds must not relabel historical numbers without conversion.
- Present rest controls in a sheet with detents and reconcile UserNotifications against the active rest deadline. If HealthKit workout export is later enabled, request that permission separately and retain export state; never invent energy expenditure from a set count.
- On an iPhone, start a workout, log a decimal load, then background during the rest interval. Return, skip the rest, and edit the next set without altering the previous one. Relaunch History after changing the plan and unit preference, checking actual reps, converted labels and the single completion record.
Copy-paste prompt
Create a workout planner for Android with Plans, Today’s workout, Set logger and History. Keep editable plan exercises separate from dated sessions and actual sets. Start with local storage unless I explicitly request account synchronization. Ask me about load units, session editing, exercise ordering, week boundaries and deletion instead of supplying training advice. Save every completed set immediately and snapshot exercise names so later routine changes do not rewrite history. Implement a rest countdown from a persisted deadline, with optional notifications and a usable permission-denied state. Show loading while opening history, an empty routine explanation, validation errors for invalid repetitions and a recoverable storage error. Use large controls suitable for one-handed logging between sets. Acceptance requires creating a routine, recording two differently loaded sets, reopening the app and finding the same session. Changing the routine must leave those historical values unchanged; a failed save must never display a completed set.
Opens Apirex with this prompt in the box. Pick the Android · Kotlin tab before you send.
Acceptance test
- Create a routine called Monday strength with rows for squat and row, then start it as a dated session rather than editing the routine directly.
- Record squat sets of 8 repetitions at 20 kg and 6 at 25 kg; finish the session and confirm both values remain individually visible.
- Close and reopen the app, open History and verify the exercise names, units and completion date without starting a duplicate session.
- Rename squat in Plans and confirm the completed session still has its original exercise label and recorded loads.
- Deny reminder permission, start a rest interval and verify the in-app countdown remains usable; force a storage failure and check that unsaved input is recoverable.
Frequently asked questions
Does this planner choose a safe training program?
No medical or coaching judgment is included in this brief: the owner supplies routines and explanatory content. Avoid injury diagnosis, recovery prescriptions or claims that a suggested load is safe for a particular person.
Should changing kilograms to pounds rewrite old sets?
Keep the recorded unit and value intact, and treat a display conversion as a separate presentation choice. Ask the owner about rounding and whether mixed-unit history is allowed before exposing a global units switch.
Can a training partner see my sessions?
Not in the local-only version described here. Shared coaching access needs an explicit consent and account model, with server checks that distinguish reading a shared routine from reading someone’s private performance history.
Build this blueprint
The blueprint prompt, ready for your platform. Edit anything before you send it.
Opens Apirex with this prompt. Pick the Android · Kotlin tab before you send. The Free plan includes 5 Rex Credits a day.