Build a mobile app called “Workout Log & Planner”.
Goal
- Help users plan workouts, follow a routine, and log sets/reps/weight quickly.
- UX must be super fast for logging (1–2 taps to add set, swipe to complete).
- Offline-first with local storage
Platforms
- iOS (SwiftUI).
Core Screens
1) Onboarding
- Ask: goal (strength / hypertrophy / fat loss), experience (beginner/intermediate/advanced), days per week, available equipment (gym/home/dumbbells/barbell).
- Generate a starter plan (can be simple templates).
2) Home (Today)
- Shows today’s workout from the plan.
- Button: “Start Workout”.
- Quick summary: last workout stats, streak, total volume this week.
3) Planner
- Calendar / week view of scheduled workouts.
- Create/edit a routine:
- Routine → Weeks (optional) → Days → Exercises
- Day template contains exercises with target sets/reps/RPE/rest time.
- Support: copy day, reorder exercises, deload week toggle.
4) Workout Session (Live Logging)
- When user taps “Start Workout”, open a session screen:
- List exercises (collapsible).
- Each exercise has sets table: set #, reps, weight, RPE, checkbox “done”.
- Big “ Add Set” button.
- Auto-suggest last used weight/reps from previous sessions.
- Timer for rest (start when a set marked done).
- Notes per exercise notes per session.
- “Finish Workout” → saves to history.
5) Exercise Library
- Browse exercises by muscle group, equipment.
- Create custom exercise.
- Each exercise has default unit (kg/lb), and history chart: best set, volume, 1RM estimate (Epley optional).
6) History
- List past workouts with search and filters.
- Workout detail: exercises, sets, volume, PRs, duration.
7) Progress / Analytics
- Simple charts:
- Weekly volume by muscle group
- Estimated 1RM trend (by selected lift)
- Consistency (workouts/week)
- PR detection (heaviest weight, best reps at weight, best estimated 1RM).
8) Settings
- Units: kg/lb
- Rest timer defaults
- Data export: CSV/JSON
- Optional cloud sync login (email OTP) if Supabase enabled.
Data Model (must implement)
- User { id, name, unitPreference, createdAt }
- Exercise { id, name, muscleGroup, equipment, isCustom }
- Routine { id, name, createdAt }
- RoutineDay { id, routineId, dayIndex, title }
- PlannedExercise { id, routineDayId, exerciseId, targetSets, targetRepsRange, targetRpe, restSec, order }
- WorkoutSession { id, userId, startedAt, endedAt, routineId?, notes, totalVolume }
- WorkoutExercise { id, sessionId, exerciseId, order, notes }
- SetEntry { id, workoutExerciseId, setNumber, reps, weight, rpe, isWarmup, isCompleted, createdAt }
Key Behaviors
- “Start Workout” copies PlannedExercise into a new WorkoutSession.
- Auto-fill based on last session for the same exercise.
- Compute totalVolume = sum(reps * weight) across completed sets.
- PR logic:
- If weight is highest ever for exercise → PR badge.
- If estimated 1RM highest ever → PR badge.
UI/UX Requirements
- Modern minimal design, dark mode support.
- Fast logging: large touch targets, sticky bottom action bar.
- Swipe gestures:
- Swipe set row to delete
- Swipe exercise to reorder in session
- Haptics for set completion.
- Loading states and empty states.
Seed Data
- Include a default exercise library: Bench Press, Squat, Deadlift, Overhead Press, Pull-up, Row, Lat Pulldown, Curl, Tricep Pushdown, Leg Press, Leg Curl, Calf Raise.