# mmsabit/fitlog architecture

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

- Interactive diagram: https://gitdiagram.com/mmsabit/fitlog
- Repository: https://github.com/mmsabit/fitlog

## Overview

Fit Log is a workout-browsing and personal planning app. Users browse and filter exercises, inspect exercise details, add exercises to today’s plan or save them, then manage, sort, and mark plan items done. The sampled code confirms detail fetching, shared in-memory state, and plan management; the README documents filtering, but the home-page and library implementation were not sampled, so their internal wiring is not asserted. No persistent store is evidenced.

Main entry points: [`src/app/layout.tsx`](https://github.com/mmsabit/fitlog/blob/main/src/app/layout.tsx) (Root Layout), [`src/app/workouts/[workid]/page.tsx`](https://github.com/mmsabit/fitlog/blob/main/src/app/workouts/%5Bworkid%5D/page.tsx) (Exercise Details), [`src/app/myplans/page.tsx`](https://github.com/mmsabit/fitlog/blob/main/src/app/myplans/page.tsx) (My Plans Page), [`src/context/WorkOutContext.tsx`](https://github.com/mmsabit/fitlog/blob/main/src/context/WorkOutContext.tsx) (Workout State)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_browse["Browse Workouts"]
  node_home["Home Page<br/>[page.tsx]"]
  node_banner["Workout Banner<br/>[Banner.tsx]"]
  node_library["Exercise Library<br/>[FitLibrary.tsx]"]
  node_exercise_card["Exercise Card<br/>[FitCard.tsx]"]
  node_detail_page["Exercise Details<br/>[page.tsx]"]
end

subgraph group_planning["Plan Management"]
  node_workout_actions["Plan And Save Actions<br/>[WorkOutButtons.tsx]"]
  node_workout_context["Workout State<br/>[WorkOutContext.tsx]"]
  node_plans_page["My Plans Page<br/>[page.tsx]"]
  node_plan_mid["Plan Display<br/>[MyPlanMid.tsx]"]
  node_plan_list["Plan Items<br/>[MyPlansList.tsx]"]
  node_done_action["Completion Action<br/>[MarkAsDone.tsx]"]
  node_workout_type["Workout Data Type<br/>[fit.type.ts]"]
end

subgraph group_shell["App Shell"]
  node_layout["Root Layout<br/>[layout.tsx]"]
  node_navigation["Navigation<br/>[Navber.tsx]"]
  node_footer["Footer<br/>[Footer.tsx]"]
end

node_user(("User"))
node_fit_api["FitLog API"]

node_user -->|"opens"| node_home
node_user -->|"browses"| node_library
node_user -->|"manages"| node_plans_page
node_exercise_card -->|"links to"| node_detail_page
node_detail_page -->|"fetches exercise"| node_fit_api
node_detail_page -->|"renders actions"| node_workout_actions
node_workout_actions -->|"updates plan or saved state"| node_workout_context
node_plans_page -->|"reads and updates"| node_workout_context
node_plans_page -->|"renders sorted items"| node_plan_mid
node_plan_mid -->|"renders items"| node_plan_list
node_plan_list -->|"renders completion action"| node_done_action
node_layout -->|"provides state"| node_workout_context
node_layout -->|"renders"| node_navigation
node_layout -->|"renders"| node_footer

click node_home "https://github.com/mmsabit/fitlog/blob/main/src/app/page.tsx"
click node_banner "https://github.com/mmsabit/fitlog/blob/main/src/components/body/Banner.tsx"
click node_library "https://github.com/mmsabit/fitlog/blob/main/src/components/fitlibrary/FitLibrary.tsx"
click node_exercise_card "https://github.com/mmsabit/fitlog/blob/main/src/components/fitlibrary/FitCard.tsx"
click node_detail_page "https://github.com/mmsabit/fitlog/blob/main/src/app/workouts/%5Bworkid%5D/page.tsx"
click node_workout_actions "https://github.com/mmsabit/fitlog/blob/main/src/components/workoutcomp/WorkOutButtons.tsx"
click node_workout_context "https://github.com/mmsabit/fitlog/blob/main/src/context/WorkOutContext.tsx"
click node_plans_page "https://github.com/mmsabit/fitlog/blob/main/src/app/myplans/page.tsx"
click node_plan_mid "https://github.com/mmsabit/fitlog/blob/main/src/components/myplans/MyPlanMid.tsx"
click node_plan_list "https://github.com/mmsabit/fitlog/blob/main/src/components/myplans/MyPlansList.tsx"
click node_done_action "https://github.com/mmsabit/fitlog/blob/main/src/components/myplans/MarkAsDone.tsx"
click node_layout "https://github.com/mmsabit/fitlog/blob/main/src/app/layout.tsx"
click node_navigation "https://github.com/mmsabit/fitlog/blob/main/src/components/navber/Navber.tsx"
click node_footer "https://github.com/mmsabit/fitlog/blob/main/src/components/Footer.tsx"
click node_workout_type "https://github.com/mmsabit/fitlog/blob/main/src/type/fit.type.ts"

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_library,node_exercise_card,node_detail_page,node_user toneBlue
class node_workout_actions,node_workout_context,node_plans_page,node_plan_mid,node_plan_list,node_done_action,node_workout_type toneAmber
class node_layout,node_navigation,node_footer,node_fit_api toneMint
```

## Components

### Browse Workouts

- [Home Page](https://github.com/mmsabit/fitlog/blob/main/src/app/page.tsx): `src/app/page.tsx`
- [Workout Banner](https://github.com/mmsabit/fitlog/blob/main/src/components/body/Banner.tsx): `src/components/body/Banner.tsx`
- [Exercise Library](https://github.com/mmsabit/fitlog/blob/main/src/components/fitlibrary/FitLibrary.tsx): `src/components/fitlibrary/FitLibrary.tsx`
- [Exercise Card](https://github.com/mmsabit/fitlog/blob/main/src/components/fitlibrary/FitCard.tsx): `src/components/fitlibrary/FitCard.tsx`
- [Exercise Details](https://github.com/mmsabit/fitlog/blob/main/src/app/workouts/%5Bworkid%5D/page.tsx): `src/app/workouts/[workid]/page.tsx`

### Plan Management

- [Plan And Save Actions](https://github.com/mmsabit/fitlog/blob/main/src/components/workoutcomp/WorkOutButtons.tsx): `src/components/workoutcomp/WorkOutButtons.tsx`
- [Workout State](https://github.com/mmsabit/fitlog/blob/main/src/context/WorkOutContext.tsx): `src/context/WorkOutContext.tsx`
- [My Plans Page](https://github.com/mmsabit/fitlog/blob/main/src/app/myplans/page.tsx): `src/app/myplans/page.tsx`
- [Plan Display](https://github.com/mmsabit/fitlog/blob/main/src/components/myplans/MyPlanMid.tsx): `src/components/myplans/MyPlanMid.tsx`
- [Plan Items](https://github.com/mmsabit/fitlog/blob/main/src/components/myplans/MyPlansList.tsx): `src/components/myplans/MyPlansList.tsx`
- [Completion Action](https://github.com/mmsabit/fitlog/blob/main/src/components/myplans/MarkAsDone.tsx): `src/components/myplans/MarkAsDone.tsx`
- [Workout Data Type](https://github.com/mmsabit/fitlog/blob/main/src/type/fit.type.ts): `src/type/fit.type.ts`

### App Shell

- [Root Layout](https://github.com/mmsabit/fitlog/blob/main/src/app/layout.tsx): `src/app/layout.tsx`
- [Navigation](https://github.com/mmsabit/fitlog/blob/main/src/components/navber/Navber.tsx): `src/components/navber/Navber.tsx`
- [Footer](https://github.com/mmsabit/fitlog/blob/main/src/components/Footer.tsx): `src/components/Footer.tsx`

### Other components

- **User**
- **FitLog API**

## Connections

- User → Home Page: opens
- User → Exercise Library: browses
- User → My Plans Page: manages
- Exercise Card → Exercise Details: links to
- Exercise Details → FitLog API: fetches exercise
- Exercise Details → Plan And Save Actions: renders actions
- Plan And Save Actions → Workout State: updates plan or saved state
- My Plans Page → Workout State: reads and updates
- My Plans Page → Plan Display: renders sorted items
- Plan Display → Plan Items: renders items
- Plan Items → Completion Action: renders completion action
- Root Layout → Workout State: provides state
- Root Layout → Navigation: renders
- Root Layout → Footer: renders
