# sovannareachvan/cuttrack architecture

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

- Interactive diagram: https://gitdiagram.com/sovannareachvan/cuttrack
- Repository: https://github.com/sovannareachvan/cuttrack

## Overview

CutTrack is a browser-only workout tracker. The user creates or selects a profile, views a date-specific workout from that profile’s split, logs exercise sets and cardio, and the app saves profile history locally. The graph includes the documented profile, planning, cardio, and history capabilities; Calendar and Progress are currently placeholders. Source excerpts show key dashboard and logging calls, but not every storage operation, so those relationships are limited to what the excerpts and README support.

Main entry points: [`src/pages/DashboardPage.jsx`](https://github.com/sovannareachvan/cuttrack/blob/master/src/pages/DashboardPage.jsx) (Dashboard), [`src/App.jsx`](https://github.com/sovannareachvan/cuttrack/blob/master/src/App.jsx) (App shell and routes), [`src/components/workout/ExerciseDetails.jsx`](https://github.com/sovannareachvan/cuttrack/blob/master/src/components/workout/ExerciseDetails.jsx) (Exercise details and logging), [`src/hooks/useAppStore.jsx`](https://github.com/sovannareachvan/cuttrack/blob/master/src/hooks/useAppStore.jsx) (Profile and workout store)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App and navigation"]
  node_entry["React entry<br/>[main.jsx]"]
  node_shell["App shell and routes<br/>[App.jsx]"]
  node_navigation["Navigation controls"]
  node_topbar["Topbar<br/>[Topbar.jsx]"]
  node_dashboard["Dashboard<br/>[DashboardPage.jsx]"]
  node_calendar["Calendar placeholder<br/>[App.jsx]"]
  node_progress["Progress placeholder<br/>[App.jsx]"]
end

subgraph group_profiles["Profiles and persistence"]
  node_profile_ui["Profile setup and switching"]
  node_store["Profile and workout store<br/>[useAppStore.jsx]"]
  node_storage[("Browser LocalStorage")]
end

subgraph group_planning["Workout planning"]
  node_programs["Programs and schedules<br/>[programs.js]"]
  node_exercise_library["Exercise library<br/>[exercises.js]"]
  node_week_preview["Week preview<br/>[WeekPreview.jsx]"]
  node_date_utils["Date utilities<br/>[dateUtils.js]"]
end

subgraph group_tracking["Workout tracking"]
  node_today_workout["Today workout summary<br/>[TodayWorkout.jsx]"]
  node_stats["Workout statistics<br/>[StatsCards.jsx]"]
  node_exercise_card["Exercise card<br/>[ExerciseCard.jsx]"]
  node_exercise_details["Exercise details and logging"]
  node_set_tracker["Set tracker<br/>[SetTracker.jsx]"]
  node_cardio_timer["Cardio timer<br/>[CardioTimer.jsx]"]
  node_cardio_defaults["Cardio defaults<br/>[cardio.js]"]
end

node_user(("Gym user"))
node_youtube["YouTube search"]

node_user -->|"opens app"| node_entry
node_entry -->|"renders"| node_shell
node_shell -->|"provides state"| node_store
node_shell -->|"renders"| node_navigation
node_shell -->|"renders setup"| node_profile_ui
node_shell -->|"routes to"| node_dashboard
node_shell -->|"routes to"| node_calendar
node_shell -->|"routes to"| node_progress
node_navigation -.->|"includes"| node_topbar
node_dashboard -->|"renders"| node_topbar
node_topbar -->|"renders switcher"| node_profile_ui
node_profile_ui -->|"updates profiles"| node_store
node_store -->|"loads and saves"| node_storage
node_dashboard -->|"reads and updates"| node_store
node_dashboard -->|"selects workout"| node_programs
node_dashboard -->|"resolves exercises"| node_exercise_library
node_dashboard -->|"uses date keys"| node_date_utils
node_dashboard -->|"renders summary"| node_today_workout
node_dashboard -->|"renders stats"| node_stats
node_dashboard -->|"renders preview"| node_week_preview
node_dashboard -->|"renders exercises"| node_exercise_card
node_dashboard -->|"opens details"| node_exercise_details
node_dashboard -->|"renders cardio"| node_cardio_timer
node_week_preview -->|"looks up schedule"| node_programs
node_week_preview -->|"builds week"| node_date_utils
node_exercise_details -->|"renders sets"| node_set_tracker
node_exercise_details -->|"builds search link"| node_exercise_library
node_exercise_details -->|"links to search"| node_youtube
node_cardio_timer -->|"uses limits"| node_cardio_defaults

click node_entry "https://github.com/sovannareachvan/cuttrack/blob/master/src/main.jsx"
click node_shell "https://github.com/sovannareachvan/cuttrack/blob/master/src/App.jsx"
click node_navigation "https://github.com/sovannareachvan/cuttrack/tree/master/src/components/layout"
click node_topbar "https://github.com/sovannareachvan/cuttrack/blob/master/src/components/layout/Topbar.jsx"
click node_dashboard "https://github.com/sovannareachvan/cuttrack/blob/master/src/pages/DashboardPage.jsx"
click node_calendar "https://github.com/sovannareachvan/cuttrack/blob/master/src/App.jsx"
click node_progress "https://github.com/sovannareachvan/cuttrack/blob/master/src/App.jsx"
click node_profile_ui "https://github.com/sovannareachvan/cuttrack/tree/master/src/components/profile"
click node_store "https://github.com/sovannareachvan/cuttrack/blob/master/src/hooks/useAppStore.jsx"
click node_programs "https://github.com/sovannareachvan/cuttrack/blob/master/src/data/programs.js"
click node_exercise_library "https://github.com/sovannareachvan/cuttrack/blob/master/src/data/exercises.js"
click node_week_preview "https://github.com/sovannareachvan/cuttrack/blob/master/src/components/dashboard/WeekPreview.jsx"
click node_date_utils "https://github.com/sovannareachvan/cuttrack/blob/master/src/utils/dateUtils.js"
click node_today_workout "https://github.com/sovannareachvan/cuttrack/blob/master/src/components/dashboard/TodayWorkout.jsx"
click node_stats "https://github.com/sovannareachvan/cuttrack/blob/master/src/components/dashboard/StatsCards.jsx"
click node_exercise_card "https://github.com/sovannareachvan/cuttrack/blob/master/src/components/workout/ExerciseCard.jsx"
click node_exercise_details "https://github.com/sovannareachvan/cuttrack/blob/master/src/components/workout/ExerciseDetails.jsx"
click node_set_tracker "https://github.com/sovannareachvan/cuttrack/blob/master/src/components/workout/SetTracker.jsx"
click node_cardio_timer "https://github.com/sovannareachvan/cuttrack/blob/master/src/components/workout/CardioTimer.jsx"
click node_cardio_defaults "https://github.com/sovannareachvan/cuttrack/blob/master/src/data/cardio.js"

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_entry,node_shell,node_navigation,node_topbar,node_dashboard,node_calendar,node_progress,node_user toneBlue
class node_profile_ui,node_store,node_storage toneAmber
class node_programs,node_exercise_library,node_week_preview,node_date_utils toneMint
class node_today_workout,node_stats,node_exercise_card,node_exercise_details,node_set_tracker,node_cardio_timer,node_cardio_defaults toneRose
class node_youtube toneIndigo
```

## Components

### App and navigation

- [React entry](https://github.com/sovannareachvan/cuttrack/blob/master/src/main.jsx): `src/main.jsx`
- [App shell and routes](https://github.com/sovannareachvan/cuttrack/blob/master/src/App.jsx): `src/App.jsx`
- [Navigation controls](https://github.com/sovannareachvan/cuttrack/tree/master/src/components/layout): `src/components/layout`
- [Topbar](https://github.com/sovannareachvan/cuttrack/blob/master/src/components/layout/Topbar.jsx): `src/components/layout/Topbar.jsx`
- [Dashboard](https://github.com/sovannareachvan/cuttrack/blob/master/src/pages/DashboardPage.jsx): `src/pages/DashboardPage.jsx`
- [Calendar placeholder](https://github.com/sovannareachvan/cuttrack/blob/master/src/App.jsx): `src/App.jsx`
- [Progress placeholder](https://github.com/sovannareachvan/cuttrack/blob/master/src/App.jsx): `src/App.jsx`

### Profiles and persistence

- [Profile setup and switching](https://github.com/sovannareachvan/cuttrack/tree/master/src/components/profile): `src/components/profile`
- [Profile and workout store](https://github.com/sovannareachvan/cuttrack/blob/master/src/hooks/useAppStore.jsx): `src/hooks/useAppStore.jsx`
- **Browser LocalStorage**

### Workout planning

- [Programs and schedules](https://github.com/sovannareachvan/cuttrack/blob/master/src/data/programs.js): `src/data/programs.js`
- [Exercise library](https://github.com/sovannareachvan/cuttrack/blob/master/src/data/exercises.js): `src/data/exercises.js`
- [Week preview](https://github.com/sovannareachvan/cuttrack/blob/master/src/components/dashboard/WeekPreview.jsx): `src/components/dashboard/WeekPreview.jsx`
- [Date utilities](https://github.com/sovannareachvan/cuttrack/blob/master/src/utils/dateUtils.js): `src/utils/dateUtils.js`

### Workout tracking

- [Today workout summary](https://github.com/sovannareachvan/cuttrack/blob/master/src/components/dashboard/TodayWorkout.jsx): `src/components/dashboard/TodayWorkout.jsx`
- [Workout statistics](https://github.com/sovannareachvan/cuttrack/blob/master/src/components/dashboard/StatsCards.jsx): `src/components/dashboard/StatsCards.jsx`
- [Exercise card](https://github.com/sovannareachvan/cuttrack/blob/master/src/components/workout/ExerciseCard.jsx): `src/components/workout/ExerciseCard.jsx`
- [Exercise details and logging](https://github.com/sovannareachvan/cuttrack/blob/master/src/components/workout/ExerciseDetails.jsx): `src/components/workout/ExerciseDetails.jsx`
- [Set tracker](https://github.com/sovannareachvan/cuttrack/blob/master/src/components/workout/SetTracker.jsx): `src/components/workout/SetTracker.jsx`
- [Cardio timer](https://github.com/sovannareachvan/cuttrack/blob/master/src/components/workout/CardioTimer.jsx): `src/components/workout/CardioTimer.jsx`
- [Cardio defaults](https://github.com/sovannareachvan/cuttrack/blob/master/src/data/cardio.js): `src/data/cardio.js`

### Other components

- **Gym user**
- **YouTube search**

## Connections

- Gym user → React entry: opens app (evidence: `README.md`)
- React entry → App shell and routes: renders (evidence: `src/main.jsx`)
- App shell and routes → Profile and workout store: provides state (evidence: `src/App.jsx`)
- App shell and routes → Navigation controls: renders (evidence: `src/App.jsx`)
- App shell and routes → Profile setup and switching: renders setup (evidence: `src/App.jsx`)
- App shell and routes → Dashboard: routes to (evidence: `src/App.jsx`)
- App shell and routes → Calendar placeholder: routes to (evidence: `src/App.jsx`)
- App shell and routes → Progress placeholder: routes to (evidence: `src/App.jsx`)
- Navigation controls → Topbar: includes (evidence: `src/components/layout/Topbar.jsx`)
- Dashboard → Topbar: renders (evidence: `src/pages/DashboardPage.jsx`)
- Topbar → Profile setup and switching: renders switcher (evidence: `src/components/layout/Topbar.jsx`)
- Profile setup and switching → Profile and workout store: updates profiles (evidence: `src/components/profile/ProfileSwitcher.jsx`)
- Profile and workout store → Browser LocalStorage: loads and saves (evidence: `README.md`)
- Dashboard → Profile and workout store: reads and updates (evidence: `src/pages/DashboardPage.jsx`)
- Dashboard → Programs and schedules: selects workout (evidence: `src/pages/DashboardPage.jsx`)
- Dashboard → Exercise library: resolves exercises (evidence: `src/pages/DashboardPage.jsx`)
- Dashboard → Date utilities: uses date keys (evidence: `src/pages/DashboardPage.jsx`)
- Dashboard → Today workout summary: renders summary (evidence: `src/pages/DashboardPage.jsx`)
- Dashboard → Workout statistics: renders stats (evidence: `src/pages/DashboardPage.jsx`)
- Dashboard → Week preview: renders preview (evidence: `src/pages/DashboardPage.jsx`)
- Dashboard → Exercise card: renders exercises (evidence: `src/pages/DashboardPage.jsx`)
- Dashboard → Exercise details and logging: opens details (evidence: `src/pages/DashboardPage.jsx`)
- Dashboard → Cardio timer: renders cardio (evidence: `src/pages/DashboardPage.jsx`)
- Week preview → Programs and schedules: looks up schedule (evidence: `src/components/dashboard/WeekPreview.jsx`)
- Week preview → Date utilities: builds week (evidence: `src/components/dashboard/WeekPreview.jsx`)
- Exercise details and logging → Set tracker: renders sets (evidence: `src/components/workout/ExerciseDetails.jsx`)
- Exercise details and logging → Exercise library: builds search link (evidence: `src/components/workout/ExerciseDetails.jsx`)
- Exercise details and logging → YouTube search: links to search (evidence: `src/components/workout/ExerciseDetails.jsx`)
- Cardio timer → Cardio defaults: uses limits (evidence: `src/components/workout/CardioTimer.jsx`)
