# rohanislambd/fit-log-nextjs-app architecture

> Architecture diagram of the GitHub repository rohanislambd/fit-log-nextjs-app, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-26). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/rohanislambd/fit-log-nextjs-app
- Repository: https://github.com/rohanislambd/fit-log-nextjs-app

## Overview

Workout Planner is a Next.js workout browser and personal planning app. Users browse a workout library, open a workout’s details, then add it to today’s plan or save it for later; the My Plan page lets them switch lists, sort workouts, review totals, and remove entries. The graph reflects the sampled library page and detail components plus README-documented capabilities. Detail-route data retrieval and persistence wiring were not sampled; Local Storage is documented, but its implementation is not shown.

Main entry points: [`src/context/WorkoutProvider.tsx`](https://github.com/rohanislambd/fit-log-nextjs-app/blob/main/src/context/WorkoutProvider.tsx) (Workout state provider), [`src/app/my-plan/page.tsx`](https://github.com/rohanislambd/fit-log-nextjs-app/blob/main/src/app/my-plan/page.tsx) (My Plan page), [`src/app/workouts/page.tsx`](https://github.com/rohanislambd/fit-log-nextjs-app/blob/main/src/app/workouts/page.tsx) (Workout library), [`src/components/home/HomePage.tsx`](https://github.com/rohanislambd/fit-log-nextjs-app/blob/main/src/components/home/HomePage.tsx) (Home content)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_browse["Workout discovery"]
  node_home["Home page<br/>[page.tsx]"]
  node_banner["Library banner<br/>[Banner.tsx]"]
  node_homecontent["Home content<br/>[HomePage.tsx]"]
  node_library["Workout library<br/>[page.tsx]"]
  node_fetch["Workout data access<br/>[dataFatch.ts]"]
  node_card["Workout card<br/>[WorkoutCard.tsx]"]
end

subgraph group_details["Workout details"]
  node_detailroute["Workout detail route<br/>[page.tsx]"]
  node_detail["Workout details<br/>[WorkoutDetails.tsx]"]
  node_add["Add to plan"]
  node_save["Save for later"]
end

subgraph group_planning["Plan management"]
  node_myplan["My Plan page<br/>[page.tsx]"]
  node_plancard["Plan workout card<br/>[MyPlanCard.tsx]"]
  node_markdone["Mark done control<br/>[MarkDoneButton.tsx]"]
  node_empty["Empty plan state<br/>[EmtyDataCard.tsx]"]
  node_navbar["Plan navigation<br/>[Navbar.tsx]"]
end

subgraph group_state["Shared state"]
  node_provider["Workout state provider"]
  node_storage[("Local Storage")]
end

node_user(("User"))

node_user -->|"opens"| node_home
node_home -->|"renders"| node_homecontent
node_homecontent -->|"renders"| node_banner
node_homecontent -->|"renders"| node_library
node_library -->|"loads workouts"| node_fetch
node_library -->|"renders"| node_card
node_user -->|"browses"| node_library
node_user -->|"opens workout"| node_detailroute
node_detailroute -->|"renders"| node_detail
node_detail -->|"offers action"| node_add
node_detail -->|"offers action"| node_save
node_add -->|"updates plan"| node_provider
node_save -->|"updates saved list"| node_provider
node_user -->|"manages lists"| node_myplan
node_myplan -->|"reads and updates"| node_provider
node_myplan -->|"renders workouts"| node_plancard
node_myplan -->|"renders when empty"| node_empty
node_plancard -->|"shows for today"| node_markdone
node_navbar -->|"reads counts"| node_provider
node_provider -.->|"persists plan data"| node_storage

click node_home "https://github.com/rohanislambd/fit-log-nextjs-app/blob/main/src/app/page.tsx"
click node_banner "https://github.com/rohanislambd/fit-log-nextjs-app/blob/main/src/components/home/Banner.tsx"
click node_homecontent "https://github.com/rohanislambd/fit-log-nextjs-app/blob/main/src/components/home/HomePage.tsx"
click node_library "https://github.com/rohanislambd/fit-log-nextjs-app/blob/main/src/app/workouts/page.tsx"
click node_fetch "https://github.com/rohanislambd/fit-log-nextjs-app/blob/main/src/lib/dataFatch.ts"
click node_card "https://github.com/rohanislambd/fit-log-nextjs-app/blob/main/src/components/workouts/WorkoutCard.tsx"
click node_detailroute "https://github.com/rohanislambd/fit-log-nextjs-app/blob/main/src/app/workouts/%5Bid%5D/page.tsx"
click node_detail "https://github.com/rohanislambd/fit-log-nextjs-app/blob/main/src/components/workouts/WorkoutDetails.tsx"
click node_add "https://github.com/rohanislambd/fit-log-nextjs-app/blob/main/src/components/workouts/AddToPlanButton.tsx"
click node_save "https://github.com/rohanislambd/fit-log-nextjs-app/blob/main/src/components/workouts/SaveForLaterButton.tsx"
click node_myplan "https://github.com/rohanislambd/fit-log-nextjs-app/blob/main/src/app/my-plan/page.tsx"
click node_plancard "https://github.com/rohanislambd/fit-log-nextjs-app/blob/main/src/components/myplan/MyPlanCard.tsx"
click node_markdone "https://github.com/rohanislambd/fit-log-nextjs-app/blob/main/src/components/myplan/MarkDoneButton.tsx"
click node_empty "https://github.com/rohanislambd/fit-log-nextjs-app/blob/main/src/components/myplan/EmtyDataCard.tsx"
click node_navbar "https://github.com/rohanislambd/fit-log-nextjs-app/blob/main/src/components/shared/Navbar.tsx"
click node_provider "https://github.com/rohanislambd/fit-log-nextjs-app/blob/main/src/context/WorkoutProvider.tsx"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_home,node_banner,node_homecontent,node_library,node_fetch,node_card,node_user toneBlue
class node_detailroute,node_detail,node_add,node_save toneAmber
class node_myplan,node_plancard,node_markdone,node_empty,node_navbar toneMint
class node_provider,node_storage toneRose
```

## Components

### Workout discovery

- [Home page](https://github.com/rohanislambd/fit-log-nextjs-app/blob/main/src/app/page.tsx): `src/app/page.tsx`
- [Library banner](https://github.com/rohanislambd/fit-log-nextjs-app/blob/main/src/components/home/Banner.tsx): `src/components/home/Banner.tsx`
- [Home content](https://github.com/rohanislambd/fit-log-nextjs-app/blob/main/src/components/home/HomePage.tsx): `src/components/home/HomePage.tsx`
- [Workout library](https://github.com/rohanislambd/fit-log-nextjs-app/blob/main/src/app/workouts/page.tsx): `src/app/workouts/page.tsx`
- [Workout data access](https://github.com/rohanislambd/fit-log-nextjs-app/blob/main/src/lib/dataFatch.ts): `src/lib/dataFatch.ts`
- [Workout card](https://github.com/rohanislambd/fit-log-nextjs-app/blob/main/src/components/workouts/WorkoutCard.tsx): `src/components/workouts/WorkoutCard.tsx`

### Workout details

- [Workout detail route](https://github.com/rohanislambd/fit-log-nextjs-app/blob/main/src/app/workouts/%5Bid%5D/page.tsx): `src/app/workouts/[id]/page.tsx`
- [Workout details](https://github.com/rohanislambd/fit-log-nextjs-app/blob/main/src/components/workouts/WorkoutDetails.tsx): `src/components/workouts/WorkoutDetails.tsx`
- [Add to plan](https://github.com/rohanislambd/fit-log-nextjs-app/blob/main/src/components/workouts/AddToPlanButton.tsx): `src/components/workouts/AddToPlanButton.tsx`
- [Save for later](https://github.com/rohanislambd/fit-log-nextjs-app/blob/main/src/components/workouts/SaveForLaterButton.tsx): `src/components/workouts/SaveForLaterButton.tsx`

### Plan management

- [My Plan page](https://github.com/rohanislambd/fit-log-nextjs-app/blob/main/src/app/my-plan/page.tsx): `src/app/my-plan/page.tsx`
- [Plan workout card](https://github.com/rohanislambd/fit-log-nextjs-app/blob/main/src/components/myplan/MyPlanCard.tsx): `src/components/myplan/MyPlanCard.tsx`
- [Mark done control](https://github.com/rohanislambd/fit-log-nextjs-app/blob/main/src/components/myplan/MarkDoneButton.tsx): `src/components/myplan/MarkDoneButton.tsx`
- [Empty plan state](https://github.com/rohanislambd/fit-log-nextjs-app/blob/main/src/components/myplan/EmtyDataCard.tsx): `src/components/myplan/EmtyDataCard.tsx`
- [Plan navigation](https://github.com/rohanislambd/fit-log-nextjs-app/blob/main/src/components/shared/Navbar.tsx): `src/components/shared/Navbar.tsx`

### Shared state

- [Workout state provider](https://github.com/rohanislambd/fit-log-nextjs-app/blob/main/src/context/WorkoutProvider.tsx): `src/context/WorkoutProvider.tsx`
- **Local Storage**

### Other components

- **User**

## Connections

- User → Home page: opens
- Home page → Home content: renders
- Home content → Library banner: renders
- Home content → Workout library: renders
- Workout library → Workout data access: loads workouts
- Workout library → Workout card: renders
- User → Workout library: browses
- User → Workout detail route: opens workout
- Workout detail route → Workout details: renders
- Workout details → Add to plan: offers action
- Workout details → Save for later: offers action
- Add to plan → Workout state provider: updates plan
- Save for later → Workout state provider: updates saved list
- User → My Plan page: manages lists
- My Plan page → Workout state provider: reads and updates
- My Plan page → Plan workout card: renders workouts
- My Plan page → Empty plan state: renders when empty
- Plan workout card → Mark done control: shows for today
- Plan navigation → Workout state provider: reads counts
- Workout state provider → Local Storage: persists plan data
