On this page
This fitness tracker build brief is for people recording strength sessions without a connected wearable. Its first version should prove one concrete loop: log a workout with two sets and read the same values back from Progress. Keep workouts, exercise sets, goals and progress connected to the same saved records before adding more ambitious integrations.
Screens
- Dashboard: See recent sessions and progress against a chosen goal
- Log workout: Record exercises, ordered sets, repetitions and loads
- Exercise library: Maintain names, instructions and preferred measurement units
- Progress: Compare saved sessions without treating missing measurements as zero
- Goals: Set a measurable target with a clear unit and deadline
- Profile: Choose display units and review data deletion
Data model
| Table | Key fields | Purpose |
|---|---|---|
| workouts | id (uuid), started_at (timestamptz), notes (text) | One recorded session, including unfinished drafts |
| exercises | id (uuid), name (text), load_unit (text) | Reusable movements rather than duplicated names |
| workout_sets | id (uuid), workout_id (uuid), exercise_id (uuid), position (int), reps (int), load (decimal) | Ordered performance measurements with explicit units |
| goals | id (uuid), metric (text), target (decimal), due_on (date) | User-defined targets, not prescribed training advice |
For a private exercise log, local-only storage is enough to establish the first recording journey. If a backend is requested, add owner_id to workouts and goals, derive set access through the owning workout, and enforce reads and mutations with server-side row-level security. An exercise library may be shared only when its publishing rules are explicit; personal performance must never inherit public library access.
Native features
Fitness tracking can use Health Connect on Android or HealthKit on iPhone for explicitly authorized step data, plus a workout timer that survives interruptions. Ask separately for the data types the chosen feature reads or writes; manual workouts should remain available when access is refused. Keep imported steps distinct from manually logged exercise to avoid counting the same activity twice. A background workout timer should derive elapsed time from saved start, pause and resume instants rather than assuming the screen stays awake. Do not promise continuous sensor collection merely because the visible timer keeps counting.
Android notes (Kotlin and Jetpack Compose)
Display workout history in a LazyColumn keyed by session ID, with a Material 3 exercise selector and clear pause and finish controls. Keep active-session timestamps in Room so a ViewModel can reconstruct elapsed time after process loss. Use the Health Connect permission contract through rememberLauncherForActivityResult where applicable, and represent revoked access independently from an empty step total. WorkManager suits deferred summary synchronization, not a second-by-second workout clock. On an Android device, start a timed walk, lock the screen, pause after reopening, and terminate the app. Reconstruct only the active intervals and confirm imported steps were not added again during refresh.
iPhone notes (Swift and SwiftUI)
Use NavigationStack for workout history and session detail, with a SwiftUI List separating manual sessions from imported health summaries. Put HealthKit authorization behind a plain explanation of why step access is useful; unavailable or unreadable data must not become an invented zero. Persist the active timer checkpoints with SwiftData when local tracking is selected, and update visible elapsed time from those checkpoints when the scene becomes active. On an iPhone, refuse health access, log a manual workout, and background the app during a rest interval. Reopen, finish the session, then inspect duration and accessibility labels without relying on animated progress rings.
Copy-paste prompt
Build a fitness tracker app for Android using native screens and a deliberately small first release. The core scope is workouts, exercise sets, goals and progress. Include these destinations: Dashboard, Log workout, Exercise library, Progress, Goals, Profile. Use these persisted entities: workouts, exercises, workout_sets, goals; retain stable identifiers and explicit relationships rather than maintaining independent screen totals. Ask me these owner decisions before implementing ambiguous behavior: whether loads use kilograms or pounds, whether warm-up sets count, and how an unfinished workout affects totals. Do not invent a policy or add an unrequested external integration. Start local-only unless I explicitly choose account storage; if I choose a backend, enforce ownership on the server with row-level security. Show loading, empty and recoverable error states, plus permission-denied handling wherever a native capability requests access. Keep incomplete input recoverable and distinguish it from saved data. For acceptance, log a workout with two sets and read the same values back from Progress. Also exercise the invalid-input or denied-permission path and reopen the app to inspect the persisted result. Explain any remaining device-only checks rather than equating a successful build with a passing journey.
Opens Apirex with this prompt in the box. Pick the Android · Kotlin tab before you send.
Acceptance test
- Create an exercise named Goblet squat, select kilograms, and record sets of 8 and 6 repetitions at 12 kilograms.
- Finish that workout and verify the dashboard shows one session, not two sessions for two sets.
- Edit the second set to 7 repetitions and check Progress recalculates from the amended record.
- Terminate and reopen the app; inspect the exercise name, both sets, units and goal link.
- Try saving a negative repetition count and verify validation preserves the draft without creating a completed workout.
Exercise history needs a stable identity even when a movement is renamed. Rename Goblet squat to Kettlebell goblet squat and verify earlier sets still appear under the same exercise, with no new personal record attributed to a different movement. Archiving an exercise should remove it from new-workout suggestions without erasing completed sessions.
A dashboard with no completed workouts should offer logging rather than a misleading zero-strength trend. If a progress query fails, keep the workout record available and show a retry action instead of drawing an empty chart that looks authoritative. Define whether deleting a workout also removes its child sets, and recalculate any affected goal progress from the remaining saved evidence.
Frequently asked questions
Does this include health-platform access?
No health connection is assumed in this brief. HealthKit or Health Connect would be a separate request covering account setup, permissions, entitlement requirements where applicable, and physical-device checks.
Can the app recommend rehabilitation exercises?
Keep the initial release to recording user-supplied training. Do not turn a progress trend into medical advice, a diagnosis or a rehabilitation prescription.
What happens when I change load units?
Ask whether historical values should be converted for display or kept in their original units. Preserve the source measurement so switching units does not repeatedly round recorded loads.
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.