# eswargithub/gymmanagementsystem architecture

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

- Interactive diagram: https://gitdiagram.com/eswargithub/gymmanagementsystem
- Repository: https://github.com/eswargithub/gymmanagementsystem

## Overview

This is a Flask-based gym management system for members, trainers, receptionists, and administrators. Users log in and reach role-specific workflows for managing staff, members, equipment, workout plans, and training progress; results are presented through HTML templates and stored in MySQL. The sampled app.py shows role checks, database operations, and profile rendering. The README documents additional role capabilities, but many route implementations were not sampled, so those relationships are documented rather than attributed to unseen calls.

Main entry points: [`app.py`](https://github.com/eswargithub/gymmanagementsystem/blob/master/app.py) (Login and roles), [`templates`](https://github.com/eswargithub/gymmanagementsystem/tree/master/templates) (Web pages), [`gym.sql`](https://github.com/eswargithub/gymmanagementsystem/blob/master/gym.sql) (Gym database)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Access and profiles"]
  node_login["Login and roles<br/>[app.py]"]
  node_profile["Profile management<br/>[app.py]"]
end

subgraph group_operations["Gym operations"]
  node_staff["Staff management<br/>[app.py]"]
  node_members["Member management<br/>[app.py]"]
  node_equipment["Equipment inventory<br/>[app.py]"]
end

subgraph group_training["Training and progress"]
  node_plans["Workout plans<br/>[app.py]"]
  node_daily["Daily training<br/>[app.py]"]
  node_progress["Progress reports<br/>[app.py]"]
end

subgraph group_persistence["Presentation and data"]
  node_templates["Web pages"]
  node_gymdb[("Gym database<br/>[gym.sql]")]
end

node_member(("Gym member"))
node_trainer(("Trainer"))
node_receptionist(("Receptionist"))
node_admin(("Admin / owner"))
node_mysql[("MySQL service")]

node_member -->|"logs in"| node_login
node_trainer -->|"logs in"| node_login
node_receptionist -->|"logs in"| node_login
node_admin -->|"logs in"| node_login
node_login -.->|"opens profile"| node_profile
node_member -->|"enters training"| node_daily
node_member -->|"tracks progress"| node_progress
node_trainer -->|"creates plans"| node_plans
node_trainer -->|"evaluates workouts"| node_progress
node_admin -->|"manages staff"| node_staff
node_admin -->|"manages members"| node_members
node_admin -->|"manages equipment"| node_equipment
node_receptionist -->|"manages members"| node_members
node_login -.->|"renders pages"| node_templates
node_profile -->|"renders profile"| node_templates
node_staff -.->|"updates records"| node_mysql
node_members -.->|"updates records"| node_mysql
node_equipment -.->|"updates inventory"| node_mysql
node_plans -.->|"stores plans"| node_mysql
node_daily -.->|"stores entries"| node_mysql
node_progress -.->|"stores reports"| node_mysql
node_profile -->|"reads and updates"| node_mysql
node_mysql -.->|"persists data"| node_gymdb

click node_login "https://github.com/eswargithub/gymmanagementsystem/blob/master/app.py"
click node_profile "https://github.com/eswargithub/gymmanagementsystem/blob/master/app.py"
click node_staff "https://github.com/eswargithub/gymmanagementsystem/blob/master/app.py"
click node_members "https://github.com/eswargithub/gymmanagementsystem/blob/master/app.py"
click node_equipment "https://github.com/eswargithub/gymmanagementsystem/blob/master/app.py"
click node_plans "https://github.com/eswargithub/gymmanagementsystem/blob/master/app.py"
click node_daily "https://github.com/eswargithub/gymmanagementsystem/blob/master/app.py"
click node_progress "https://github.com/eswargithub/gymmanagementsystem/blob/master/app.py"
click node_templates "https://github.com/eswargithub/gymmanagementsystem/tree/master/templates"
click node_gymdb "https://github.com/eswargithub/gymmanagementsystem/blob/master/gym.sql"

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_login,node_profile toneBlue
class node_staff,node_members,node_equipment,node_mysql toneAmber
class node_plans,node_daily,node_progress toneMint
class node_templates,node_gymdb toneRose
class node_member,node_trainer,node_receptionist,node_admin toneIndigo
```

## Components

### Access and profiles

- [Login and roles](https://github.com/eswargithub/gymmanagementsystem/blob/master/app.py): `app.py`
- [Profile management](https://github.com/eswargithub/gymmanagementsystem/blob/master/app.py): `app.py`

### Gym operations

- [Staff management](https://github.com/eswargithub/gymmanagementsystem/blob/master/app.py): `app.py`
- [Member management](https://github.com/eswargithub/gymmanagementsystem/blob/master/app.py): `app.py`
- [Equipment inventory](https://github.com/eswargithub/gymmanagementsystem/blob/master/app.py): `app.py`

### Training and progress

- [Workout plans](https://github.com/eswargithub/gymmanagementsystem/blob/master/app.py): `app.py`
- [Daily training](https://github.com/eswargithub/gymmanagementsystem/blob/master/app.py): `app.py`
- [Progress reports](https://github.com/eswargithub/gymmanagementsystem/blob/master/app.py): `app.py`

### Presentation and data

- [Web pages](https://github.com/eswargithub/gymmanagementsystem/tree/master/templates): `templates`
- [Gym database](https://github.com/eswargithub/gymmanagementsystem/blob/master/gym.sql): `gym.sql`

### Other components

- **Gym member**
- **Trainer**
- **Receptionist**
- **Admin / owner**
- **MySQL service**

## Connections

- Gym member → Login and roles: logs in (evidence: `README.md`)
- Trainer → Login and roles: logs in (evidence: `README.md`)
- Receptionist → Login and roles: logs in (evidence: `README.md`)
- Admin / owner → Login and roles: logs in (evidence: `README.md`)
- Login and roles → Profile management: opens profile (evidence: `app.py`)
- Gym member → Daily training: enters training (evidence: `README.md`)
- Gym member → Progress reports: tracks progress (evidence: `README.md`)
- Trainer → Workout plans: creates plans (evidence: `README.md`)
- Trainer → Progress reports: evaluates workouts (evidence: `README.md`)
- Admin / owner → Staff management: manages staff (evidence: `README.md`)
- Admin / owner → Member management: manages members (evidence: `README.md`)
- Admin / owner → Equipment inventory: manages equipment (evidence: `README.md`)
- Receptionist → Member management: manages members (evidence: `README.md`)
- Login and roles → Web pages: renders pages
- Profile management → Web pages: renders profile (evidence: `app.py`)
- Staff management → MySQL service: updates records
- Member management → MySQL service: updates records
- Equipment inventory → MySQL service: updates inventory
- Workout plans → MySQL service: stores plans
- Daily training → MySQL service: stores entries
- Progress reports → MySQL service: stores reports
- Profile management → MySQL service: reads and updates (evidence: `app.py`)
- MySQL service → Gym database: persists data
