How ikhoanulislam/fitlog-nextjs works
FitLog is a workout-library web app. The main workflow is browsing workouts, loading a lift’s details, adding it to today’s plan or saving it, then reviewing, sorting, completing, and removing lifts in My Plan. PlanContext enforces the five-lift cap, tracks completion, and persists plan state in localStorage; the navbar reflects plan and saved counts. The sampled source confirms these interactions and API calls; route composition and other README-described behavior are represented only where supported by the tree or README.
Main entry points: [id]/page.js Workout detail · PlanContext.js Plan state · Library.js Workout library · my-plan/page.js My Plan
Components 17
App experience
- App shell
app/layout.js - Home route
app/page.js - Live counters
components/Navbar.js - Loading indicator
components/Spinner.js - Not found page
app/not-found.js
Workout discovery
- Library intro
components/Hero.js - Workout library
components/Library.js - Workout card
components/WorkoutCard.js - Workout detail
app/workout/[id]/page.js - Workout stats
components/Stats.js - Muscle tags
components/Tags.js
Plan management
- My Plan
app/my-plan/page.js - Plan state
context/PlanContext.js
Workout and state data
- Workout API client
lib/api.js - Browser storage
Other components
- Gym user
- Workout API
Connections 24
- Gym user → Home route: opens
- App shell → Home route: renders route
- App shell → Plan state: provides state
- App shell → Live counters: renders
- Home route → Library intro: renders
- Home route → Workout library: renders
- Workout library → Workout API client: requests list
- Workout API client → Workout API: fetches workouts
- Workout library → Workout card: renders items
- Workout card → Workout detail: links to
- Gym user → Workout detail: opens lift
- Workout detail → Workout API client: requests lift
- Workout API client → Workout API: fetches lift
- Workout detail → Plan state: adds or saves
- Workout detail → Muscle tags: renders groups
- Workout library → Loading indicator: shows while loading
- Workout detail → Loading indicator: shows while loading
- Workout detail → Not found page: shows when missing
- Gym user → My Plan: opens plan
- My Plan → Plan state: reads and updates
- My Plan → Workout stats: renders metrics
- My Plan → Loading indicator: shows until ready
- Live counters → Plan state: reads counts
- Plan state → Browser storage: loads and saves