# cse442-software-engineering-ub/f26-gymranked architecture

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

- Interactive diagram: https://gitdiagram.com/cse442-software-engineering-ub/f26-gymranked
- Repository: https://github.com/cse442-software-engineering-ub/f26-gymranked

## Overview

GymRank is a workout-planning and tracking web app with a React frontend, PHP API, and MySQL backend. Users register or sign in, configure training preferences, choose plans, log workouts, and review progress and standings. The route table establishes the frontend’s major screens; sampled pages and the README establish selected API and storage relationships. Several feature APIs and backend implementations were not sampled, so their internal links are left unspecified rather than inferred.

Main entry points: [`src/App.jsx`](https://github.com/cse442-software-engineering-ub/f26-gymranked/blob/main/src/App.jsx) (Route application), [`src/auth/api.js`](https://github.com/cse442-software-engineering-ub/f26-gymranked/blob/main/src/auth/api.js) (Authentication client), [`src/workoutLog/workoutLogApi.js`](https://github.com/cse442-software-engineering-ub/f26-gymranked/blob/main/src/workoutLog/workoutLogApi.js) (Workout log API client), [`src/onboarding/parts.jsx`](https://github.com/cse442-software-engineering-ub/f26-gymranked/blob/main/src/onboarding/parts.jsx) (Training setup)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application shell"]
  node_router["Route application<br/>[App.jsx]"]
  node_dashboard["Dashboard<br/>[Dashboard.jsx]"]
end

subgraph group_setup["Account and setup"]
  node_login["Login and registration<br/>[LoginPage.jsx]"]
  node_authclient["Authentication client<br/>[api.js]"]
  node_onboarding["Training setup<br/>[parts.jsx]"]
  node_profile["Profile and preferences<br/>[ProfilePage.jsx]"]
end

subgraph group_training["Plans and workouts"]
  node_plans["Plan library and selection"]
  node_weeklyplan["Weekly workout plan<br/>[WeeklyPlan.jsx]"]
  node_active["Active workout"]
  node_logger["Workout logging<br/>[WorkoutLogger.jsx]"]
  node_logapi["Workout log API client<br/>[workoutLogApi.js]"]
  node_summary["Workout summary"]
end

subgraph group_insights["Progress and community"]
  node_history["Workout history"]
  node_progress["Exercise progress<br/>[ProgressPage.jsx]"]
  node_leaderboard["Leaderboard"]
  node_weekly["Weekly standings"]
  node_weeklygoal["Weekly goal<br/>[WeeklyGoalPage.jsx]"]
end

subgraph group_backend["Backend and storage"]
  node_phpapi["PHP API<br/>[workouts.php]"]
  node_mysql[("MySQL database")]
end

node_user(("GymRank user"))

node_user -->|"uses"| node_router
node_router -->|"routes to"| node_login
node_router -->|"routes to"| node_onboarding
node_router -->|"routes to"| node_dashboard
node_router -->|"routes to"| node_plans
node_router -->|"routes to"| node_weeklyplan
node_router -->|"routes to"| node_active
node_router -->|"routes to"| node_summary
node_router -->|"routes to"| node_history
node_router -->|"routes to"| node_progress
node_router -->|"routes to"| node_leaderboard
node_router -->|"routes to"| node_weekly
node_router -->|"routes to"| node_weeklygoal
node_login -->|"calls"| node_authclient
node_onboarding -->|"checks session"| node_authclient
node_profile -->|"checks session"| node_authclient
node_profile -->|"loads setup data"| node_onboarding
node_active -->|"renders"| node_logger
node_logger -.->|"uses"| node_logapi
node_summary -->|"loads workout data"| node_logapi
node_history -->|"loads history"| node_logapi
node_progress -->|"loads workout data"| node_logapi
node_authclient -->|"fetches API endpoint"| node_phpapi
node_phpapi -->|"reads and writes"| node_mysql

click node_router "https://github.com/cse442-software-engineering-ub/f26-gymranked/blob/main/src/App.jsx"
click node_login "https://github.com/cse442-software-engineering-ub/f26-gymranked/blob/main/src/auth/LoginPage.jsx"
click node_authclient "https://github.com/cse442-software-engineering-ub/f26-gymranked/blob/main/src/auth/api.js"
click node_onboarding "https://github.com/cse442-software-engineering-ub/f26-gymranked/blob/main/src/onboarding/parts.jsx"
click node_profile "https://github.com/cse442-software-engineering-ub/f26-gymranked/blob/main/src/profile/ProfilePage.jsx"
click node_dashboard "https://github.com/cse442-software-engineering-ub/f26-gymranked/blob/main/src/Dashboard.jsx"
click node_plans "https://github.com/cse442-software-engineering-ub/f26-gymranked/blob/main/src/WorkoutPlanLibrary.jsx"
click node_weeklyplan "https://github.com/cse442-software-engineering-ub/f26-gymranked/blob/main/src/WeeklyPlan.jsx"
click node_active "https://github.com/cse442-software-engineering-ub/f26-gymranked/blob/main/src/workoutLog/ActiveWorkoutPage.jsx"
click node_logger "https://github.com/cse442-software-engineering-ub/f26-gymranked/blob/main/src/workoutLog/WorkoutLogger.jsx"
click node_logapi "https://github.com/cse442-software-engineering-ub/f26-gymranked/blob/main/src/workoutLog/workoutLogApi.js"
click node_summary "https://github.com/cse442-software-engineering-ub/f26-gymranked/blob/main/src/workoutLog/WorkoutSummaryPage.jsx"
click node_history "https://github.com/cse442-software-engineering-ub/f26-gymranked/blob/main/src/history/WorkoutHistoryPage.jsx"
click node_progress "https://github.com/cse442-software-engineering-ub/f26-gymranked/blob/main/src/progress/ProgressPage.jsx"
click node_leaderboard "https://github.com/cse442-software-engineering-ub/f26-gymranked/blob/main/src/leaderboard/LeaderboardPage.jsx"
click node_weekly "https://github.com/cse442-software-engineering-ub/f26-gymranked/blob/main/src/weekly/WeeklyStandingsPage.jsx"
click node_weeklygoal "https://github.com/cse442-software-engineering-ub/f26-gymranked/blob/main/src/weeklyGoal/WeeklyGoalPage.jsx"
click node_phpapi "https://github.com/cse442-software-engineering-ub/f26-gymranked/blob/main/api/workouts.php"

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_router,node_dashboard,node_user toneBlue
class node_login,node_authclient,node_onboarding,node_profile toneAmber
class node_plans,node_weeklyplan,node_active,node_logger,node_logapi,node_summary toneMint
class node_history,node_progress,node_leaderboard,node_weekly,node_weeklygoal toneRose
class node_phpapi,node_mysql toneIndigo
```

## Components

### Application shell

- [Route application](https://github.com/cse442-software-engineering-ub/f26-gymranked/blob/main/src/App.jsx): `src/App.jsx`
- [Dashboard](https://github.com/cse442-software-engineering-ub/f26-gymranked/blob/main/src/Dashboard.jsx): `src/Dashboard.jsx`

### Account and setup

- [Login and registration](https://github.com/cse442-software-engineering-ub/f26-gymranked/blob/main/src/auth/LoginPage.jsx): `src/auth/LoginPage.jsx`
- [Authentication client](https://github.com/cse442-software-engineering-ub/f26-gymranked/blob/main/src/auth/api.js): `src/auth/api.js`
- [Training setup](https://github.com/cse442-software-engineering-ub/f26-gymranked/blob/main/src/onboarding/parts.jsx): `src/onboarding/parts.jsx`
- [Profile and preferences](https://github.com/cse442-software-engineering-ub/f26-gymranked/blob/main/src/profile/ProfilePage.jsx): `src/profile/ProfilePage.jsx`

### Plans and workouts

- [Plan library and selection](https://github.com/cse442-software-engineering-ub/f26-gymranked/blob/main/src/WorkoutPlanLibrary.jsx): `src/WorkoutPlanLibrary.jsx`
- [Weekly workout plan](https://github.com/cse442-software-engineering-ub/f26-gymranked/blob/main/src/WeeklyPlan.jsx): `src/WeeklyPlan.jsx`
- [Active workout](https://github.com/cse442-software-engineering-ub/f26-gymranked/blob/main/src/workoutLog/ActiveWorkoutPage.jsx): `src/workoutLog/ActiveWorkoutPage.jsx`
- [Workout logging](https://github.com/cse442-software-engineering-ub/f26-gymranked/blob/main/src/workoutLog/WorkoutLogger.jsx): `src/workoutLog/WorkoutLogger.jsx`
- [Workout log API client](https://github.com/cse442-software-engineering-ub/f26-gymranked/blob/main/src/workoutLog/workoutLogApi.js): `src/workoutLog/workoutLogApi.js`
- [Workout summary](https://github.com/cse442-software-engineering-ub/f26-gymranked/blob/main/src/workoutLog/WorkoutSummaryPage.jsx): `src/workoutLog/WorkoutSummaryPage.jsx`

### Progress and community

- [Workout history](https://github.com/cse442-software-engineering-ub/f26-gymranked/blob/main/src/history/WorkoutHistoryPage.jsx): `src/history/WorkoutHistoryPage.jsx`
- [Exercise progress](https://github.com/cse442-software-engineering-ub/f26-gymranked/blob/main/src/progress/ProgressPage.jsx): `src/progress/ProgressPage.jsx`
- [Leaderboard](https://github.com/cse442-software-engineering-ub/f26-gymranked/blob/main/src/leaderboard/LeaderboardPage.jsx): `src/leaderboard/LeaderboardPage.jsx`
- [Weekly standings](https://github.com/cse442-software-engineering-ub/f26-gymranked/blob/main/src/weekly/WeeklyStandingsPage.jsx): `src/weekly/WeeklyStandingsPage.jsx`
- [Weekly goal](https://github.com/cse442-software-engineering-ub/f26-gymranked/blob/main/src/weeklyGoal/WeeklyGoalPage.jsx): `src/weeklyGoal/WeeklyGoalPage.jsx`

### Backend and storage

- [PHP API](https://github.com/cse442-software-engineering-ub/f26-gymranked/blob/main/api/workouts.php): `api/workouts.php`
- **MySQL database**

### Other components

- **GymRank user**

## Connections

- GymRank user → Route application: uses (evidence: `src/App.jsx`)
- Route application → Login and registration: routes to (evidence: `src/App.jsx`)
- Route application → Training setup: routes to (evidence: `src/App.jsx`)
- Route application → Dashboard: routes to (evidence: `src/App.jsx`)
- Route application → Plan library and selection: routes to (evidence: `src/App.jsx`)
- Route application → Weekly workout plan: routes to (evidence: `src/App.jsx`)
- Route application → Active workout: routes to (evidence: `src/App.jsx`)
- Route application → Workout summary: routes to (evidence: `src/App.jsx`)
- Route application → Workout history: routes to (evidence: `src/App.jsx`)
- Route application → Exercise progress: routes to (evidence: `src/App.jsx`)
- Route application → Leaderboard: routes to (evidence: `src/App.jsx`)
- Route application → Weekly standings: routes to (evidence: `src/App.jsx`)
- Route application → Weekly goal: routes to (evidence: `src/App.jsx`)
- Login and registration → Authentication client: calls (evidence: `src/auth/LoginPage.jsx`)
- Training setup → Authentication client: checks session (evidence: `src/onboarding/parts.jsx`)
- Profile and preferences → Authentication client: checks session (evidence: `src/profile/ProfilePage.jsx`)
- Profile and preferences → Training setup: loads setup data (evidence: `src/profile/ProfilePage.jsx`)
- Active workout → Workout logging: renders
- Workout logging → Workout log API client: uses
- Workout summary → Workout log API client: loads workout data (evidence: `src/workoutLog/WorkoutSummaryPage.jsx`)
- Workout history → Workout log API client: loads history (evidence: `src/history/WorkoutHistoryPage.jsx`)
- Exercise progress → Workout log API client: loads workout data (evidence: `src/progress/ProgressPage.jsx`)
- Authentication client → PHP API: fetches API endpoint (evidence: `src/auth/api.js`)
- PHP API → MySQL database: reads and writes (evidence: `README.md`)
