- Configured OpenCode as fallback when Gemini quota exceeded
- Created gemini-fallback.js utility (tries Gemini → OpenCode)
- API keys stored in .env (excluded from git)
- PM unblocked: can resume 05-03 with fallback system
Flow: Gemini (primary) → OpenCode (fallback) → fail gracefully
- Add custom_workouts and custom_workout_exercises tables (schema)
- New endpoints:
- GET /api/exercises - List all exercises for picker
- POST /api/custom-workouts - Fork program workout
- GET /api/custom-workouts - List user's custom workouts
- GET /api/custom-workouts/:id - Get workout with exercises
- PUT /api/custom-workouts/:id - Update workout exercises
- DELETE /api/custom-workouts/:id - Delete custom workout
- Updated endpoints for source_type support:
- GET /api/logs - Filter by source_type and custom_workout_id
- POST /api/logs - Save with source_type and custom_workout_id
- DELETE /api/logs - Support custom workout log deletion
- Adds Phase 4 planning overview
Completes: 04-01-schema-migration, 04-02-backend-api
Next: 04-03-frontend-workout-edit
- DELETE /api/logs accepts user_id, program_exercise_id, date, set_number in request body
- Deletes matching workout_logs row by composite key
- Returns 200 + deleted id on success, 404 if row not found
- Consistent with existing POST /api/logs (no auth middleware, user_id from body)
- Ny databasstruktur för historik/progress tracking
- Nya endpoints: POST/GET measurements och strength
- Onboarding sparar till rätt tabeller
- Beräknar och sparar body_fat_pct
- Fixar tomma numeriska fält (null istället för '')
- Döljer 1RM för nybörjare