# mtgazer/gymflow architecture

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

- Interactive diagram: https://gitdiagram.com/mtgazer/gymflow
- Repository: https://github.com/mtgazer/gymflow

## Overview

GymFlow is a local desktop gym-management application. The owner opens the dashboard or member list from the sidebar; member workflows search records and launch add, edit, renew, or delete interactions, while dashboard views summarize membership and subscription activity. SQLite stores members, plans, and subscriptions. The graph preserves the documented revenue and subscription capabilities within the dashboard and data layer. Some database methods and UI modules were only partially sampled; edges are limited to visible calls or README-documented behavior.

Main entry points: [`ui/members.py`](https://github.com/mtgazer/gymflow/blob/main/ui/members.py) (Member list and search), [`app.py`](https://github.com/mtgazer/gymflow/blob/main/app.py) (Application shell), [`database.py`](https://github.com/mtgazer/gymflow/blob/main/database.py) (Gym data operations), [`ui/dashboard.py`](https://github.com/mtgazer/gymflow/blob/main/ui/dashboard.py) (Statistics and activity)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_shell["Desktop shell"]
  node_application["Application shell<br/>[app.py]"]
  node_navigation["Sidebar navigation<br/>[sidebar.py]"]
end

subgraph group_members["Member management"]
  node_member_list["Member list and search<br/>[members.py]"]
  node_add_member["Add member<br/>[add_member.py]"]
  node_edit_member["Edit member<br/>[edit_member.py]"]
  node_renew_member["Renew membership<br/>[renew_member.py]"]
  node_delete_confirm["Delete confirmation<br/>[delete_member.py]"]
end

subgraph group_insights["Dashboard and presentation"]
  node_dashboard["Statistics and activity<br/>[dashboard.py]"]
  node_ui_components["Reusable UI cards<br/>[components.py]"]
  node_configuration["Application configuration<br/>[config.py]"]
end

subgraph group_data["Local data"]
  node_database_layer["Gym data operations<br/>[database.py]"]
  node_sqlite_store[("SQLite database<br/>[gym.db]")]
end

node_owner(("Gym owner"))

node_owner -->|"opens"| node_application
node_application -->|"creates"| node_navigation
node_application -->|"creates"| node_dashboard
node_application -->|"creates"| node_member_list
node_navigation -->|"selects page"| node_application
node_member_list -->|"opens"| node_add_member
node_member_list -->|"opens"| node_edit_member
node_member_list -->|"opens"| node_renew_member
node_member_list -->|"opens"| node_delete_confirm
node_delete_confirm -->|"confirms callback"| node_member_list
node_member_list -->|"queries and deletes"| node_database_layer
node_add_member -->|"creates records"| node_database_layer
node_edit_member -->|"loads and updates"| node_database_layer
node_renew_member -->|"loads and subscribes"| node_database_layer
node_member_list -->|"renders cards"| node_ui_components
node_member_list -->|"refreshes"| node_dashboard
node_dashboard -->|"reads metrics"| node_database_layer
node_dashboard -->|"renders cards"| node_ui_components
node_database_layer -->|"reads and writes"| node_sqlite_store
node_application -->|"reads settings"| node_configuration
node_navigation -->|"uses buttons"| node_ui_components
node_member_list -->|"uses styling"| node_configuration
node_dashboard -->|"uses styling"| node_configuration

click node_application "https://github.com/mtgazer/gymflow/blob/main/app.py"
click node_navigation "https://github.com/mtgazer/gymflow/blob/main/ui/sidebar.py"
click node_member_list "https://github.com/mtgazer/gymflow/blob/main/ui/members.py"
click node_add_member "https://github.com/mtgazer/gymflow/blob/main/ui/dialogs/add_member.py"
click node_edit_member "https://github.com/mtgazer/gymflow/blob/main/ui/dialogs/edit_member.py"
click node_renew_member "https://github.com/mtgazer/gymflow/blob/main/ui/dialogs/renew_member.py"
click node_delete_confirm "https://github.com/mtgazer/gymflow/blob/main/ui/dialogs/delete_member.py"
click node_dashboard "https://github.com/mtgazer/gymflow/blob/main/ui/dashboard.py"
click node_ui_components "https://github.com/mtgazer/gymflow/blob/main/ui/components.py"
click node_configuration "https://github.com/mtgazer/gymflow/blob/main/config.py"
click node_database_layer "https://github.com/mtgazer/gymflow/blob/main/database.py"
click node_sqlite_store "https://github.com/mtgazer/gymflow/blob/main/gym.db"

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_application,node_navigation toneBlue
class node_member_list,node_add_member,node_edit_member,node_renew_member,node_delete_confirm toneAmber
class node_dashboard,node_ui_components,node_configuration toneMint
class node_database_layer,node_sqlite_store toneRose
class node_owner toneIndigo
```

## Components

### Desktop shell

- [Application shell](https://github.com/mtgazer/gymflow/blob/main/app.py): `app.py`
- [Sidebar navigation](https://github.com/mtgazer/gymflow/blob/main/ui/sidebar.py): `ui/sidebar.py`

### Member management

- [Member list and search](https://github.com/mtgazer/gymflow/blob/main/ui/members.py): `ui/members.py`
- [Add member](https://github.com/mtgazer/gymflow/blob/main/ui/dialogs/add_member.py): `ui/dialogs/add_member.py`
- [Edit member](https://github.com/mtgazer/gymflow/blob/main/ui/dialogs/edit_member.py): `ui/dialogs/edit_member.py`
- [Renew membership](https://github.com/mtgazer/gymflow/blob/main/ui/dialogs/renew_member.py): `ui/dialogs/renew_member.py`
- [Delete confirmation](https://github.com/mtgazer/gymflow/blob/main/ui/dialogs/delete_member.py): `ui/dialogs/delete_member.py`

### Dashboard and presentation

- [Statistics and activity](https://github.com/mtgazer/gymflow/blob/main/ui/dashboard.py): `ui/dashboard.py`
- [Reusable UI cards](https://github.com/mtgazer/gymflow/blob/main/ui/components.py): `ui/components.py`
- [Application configuration](https://github.com/mtgazer/gymflow/blob/main/config.py): `config.py`

### Local data

- [Gym data operations](https://github.com/mtgazer/gymflow/blob/main/database.py): `database.py`
- [SQLite database](https://github.com/mtgazer/gymflow/blob/main/gym.db): `gym.db`

### Other components

- **Gym owner**

## Connections

- Gym owner → Application shell: opens (evidence: `README.md`)
- Application shell → Sidebar navigation: creates (evidence: `app.py`)
- Application shell → Statistics and activity: creates (evidence: `app.py`)
- Application shell → Member list and search: creates (evidence: `app.py`)
- Sidebar navigation → Application shell: selects page (evidence: `ui/sidebar.py`)
- Member list and search → Add member: opens (evidence: `ui/members.py`)
- Member list and search → Edit member: opens (evidence: `ui/members.py`)
- Member list and search → Renew membership: opens (evidence: `ui/members.py`)
- Member list and search → Delete confirmation: opens (evidence: `ui/members.py`)
- Delete confirmation → Member list and search: confirms callback (evidence: `ui/dialogs/delete_member.py`)
- Member list and search → Gym data operations: queries and deletes (evidence: `ui/members.py`)
- Add member → Gym data operations: creates records (evidence: `ui/dialogs/add_member.py`)
- Edit member → Gym data operations: loads and updates (evidence: `ui/dialogs/edit_member.py`)
- Renew membership → Gym data operations: loads and subscribes (evidence: `ui/dialogs/renew_member.py`)
- Member list and search → Reusable UI cards: renders cards (evidence: `ui/members.py`)
- Member list and search → Statistics and activity: refreshes (evidence: `ui/members.py`)
- Statistics and activity → Gym data operations: reads metrics (evidence: `ui/dashboard.py`)
- Statistics and activity → Reusable UI cards: renders cards (evidence: `ui/dashboard.py`)
- Gym data operations → SQLite database: reads and writes (evidence: `database.py`)
- Application shell → Application configuration: reads settings (evidence: `app.py`)
- Sidebar navigation → Reusable UI cards: uses buttons (evidence: `ui/sidebar.py`)
- Member list and search → Application configuration: uses styling (evidence: `ui/members.py`)
- Statistics and activity → Application configuration: uses styling (evidence: `ui/dashboard.py`)
