How iyiu9akhan/ph-a06-fitlog works
FitLog is a workout-browsing and personal-planning app. Users browse the library, open workout details, then add workouts to today’s plan or save them; the My Plan dashboard presents both collections for review and removal. Workout data comes from a live API with a local JSON fallback, while plan and saved state persist in browser local storage. The README also documents sorting and responsive UI; implementation details for those features were not sampled, so the graph keeps them within the dashboard rather than inventing a separate flow.
Main entry points: getWorkouts.tsx Workout data service · WorkoutPlanContext.tsx Workout plan context · my-plan/page.tsx My Plan dashboard · [detailsId]/page.tsx Workout details
Components 17
Workout discovery
- Workout library route
src/app/page.tsx - Workout cards
src/components/library/LibraryCard.tsx - Workout details
src/app/details/[detailsId]/page.tsx - Workout data service
src/lib/getWorkouts.tsx - Local workout data
public/data/fitlog.json
Plan management
- Plan and save actions
src/app/details/ActionBtn.tsx - My Plan dashboard
src/app/my-plan/page.tsx - Plan statistics
src/components/myPlan/MyPlanStats.tsx - Plan and saved tabs
src/components/myPlan/PlanTabs.tsx - Today’s workout list
src/components/myPlan/TodaysPlan.tsx - Saved workouts
src/components/myPlan/Saved.tsx
Client state
- Workout plan context
src/context/WorkoutPlanContext.tsx - Browser local storage
User feedback
- Toast notifications
src/components/customToast/ToastProvider.tsx - Toast display
src/components/customToast/Toast.tsx
Other components
- Gym user
- Workout API
Connections 19
- Gym user → Workout library route: browses
- Workout library route → Workout cards: renders
- Workout cards → Workout data service: loads workouts
- Workout details → Workout data service: loads workout
- Workout data service → Workout API: fetches
- Workout data service → Local workout data: reads on failure
- Gym user → Workout details: opens workout
- Workout details → Plan and save actions: offers actions
- Plan and save actions → Workout plan context: adds workout
- Plan and save actions → Toast notifications: requests feedback
- My Plan dashboard → Workout plan context: reads and removes
- My Plan dashboard → Plan statistics: supplies collection
- My Plan dashboard → Plan and saved tabs: supplies collections
- Plan and saved tabs → Today’s workout list: shows plan
- Plan and saved tabs → Saved workouts: shows saved
- Today’s workout list → Workout plan context: removes workout
- Today’s workout list → Toast notifications: requests feedback
- Workout plan context → Browser local storage: loads and persists
- Toast notifications → Toast display: renders