2.8 KiB
2.8 KiB
Phase 06 — Implementation Priorities
🎯 FOKUS: FUNKTIONALITET ÖVER DESIGN
Tier 1: MUST HAVE (IMPLEMENTERA NU)
06-01: Workout Swap System ✅
- API: POST /api/workouts/:id/swap (swap with another workout)
- API: GET /api/workouts/available (list swappable workouts)
- UI: Button "Byt pass" on workout page
- Database: Track swap history
- Reversible swaps (undo)
06-02: Muscle Group Recovery Tracking ✅
- Calculate: last workout date per muscle group
- Calculate: recovery score (0-100%)
- Display: recovery % on each muscle group
- API: GET /api/recovery/muscle-groups (current status)
- Database: muscle_group_recovery table
06-03: Smart Workout Recommendations ✅
- Algorithm: Which muscle groups are most recovered?
- Suggest: 2-3 workouts targeting recovered groups
- API: GET /api/recommendations/smart-workout
- Avoid: Overtraining same groups <48h
- One-tap: "Use this recommendation"
Tier 2: SHOULD HAVE (EFTER TIER 1)
06-04: Dashboard Analytics
- Show: Weekly workout count
- Show: Total volume (kg)
- Show: Strength score trend
- Show: Muscle group activity heatmap
- API: GET /api/analytics/dashboard
06-05: Library Improvements
- Search exercises
- Filter by muscle group
- Show exercise details + form tips
- Categorize: Weights, Bodyweight, Cardio
Tier 3: NICE TO HAVE (LATER)
06-06: Achievement Badges 06-07: Social Features 06-08: Advanced Analytics
📋 Implementation Order
- Backend First — Recovery tracking + APIs
- Frontend Second — UI for swap + recommendations
- Integration — Connect frontend to backend
- Testing — E2E validation
⚡ Quick Wins
Task 06-01 Implementation:
Backend:
- Add swapped_from_id to workout_logs
- POST /api/workouts/:id/swap endpoint
- GET /api/workouts/available endpoint
Frontend:
- Add "Byt pass" button to WorkoutPage
- Simple modal: pick another workout
- Confirm swap action
Task 06-02 Implementation:
Backend:
- Calculate recovery per muscle group
- GET /api/recovery/muscle-groups endpoint
- Store in muscle_group_recovery table
Frontend:
- Display recovery % as number/badge
- Color code: red (0-33%), yellow (34-66%), green (67-100%)
- Update real-time when workout logged
Task 06-03 Implementation:
Backend:
- Analyze last 7 days: which muscles trained?
- Find most-recovered muscle groups
- GET /api/recommendations/smart-workout
- Return 2-3 workouts + reason
Frontend:
- "Byt till rekommenderat pass" button
- Show: "Du är väl återhämtad för [muscle group]"
- One-tap action
Philosophy: Function > Form. Build working features first. Polish UI later.
Timeline: 6-8 hours for Tier 1 (parallel backend + frontend)