# alryqyashrf979-ux/gymmanagementsystem architecture

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

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

## Overview

This is a C# Windows Forms gym-management application using a documented three-tier architecture: UI, business logic and ADO.NET data access over SQL Server. The main user workflow starts at login, then uses dashboard access to manage people and gym operations; subscription management also supports membership changes. The README names major modules, but most UI-to-business-layer links were not visible in sampled code, so those relationships are shown as unverified rather than asserted. The sampled subscription form and business class provide direct evidence for subscription operations and persistence.

Main entry points: [`GymProject/frmDashboard.cs`](https://github.com/alryqyashrf979-ux/gymmanagementsystem/blob/main/GymProject/frmDashboard.cs) (Dashboard), [`DataBusinessLayer`](https://github.com/alryqyashrf979-ux/gymmanagementsystem/tree/main/DataBusinessLayer) (Business services), [`GymProject/Subscription/frmManageSubscription.cs`](https://github.com/alryqyashrf979-ux/gymmanagementsystem/blob/main/GymProject/Subscription/frmManageSubscription.cs) (Subscriptions), [`DataBusinessLayer/clsSubscription.cs`](https://github.com/alryqyashrf979-ux/gymmanagementsystem/blob/main/DataBusinessLayer/clsSubscription.cs) (Subscription rules)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Desktop UI"]
  node_app["Application entry<br/>[Program.cs]"]
  node_login["Login<br/>[frmLogin.cs]"]
  node_dashboard["Dashboard<br/>[frmDashboard.cs]"]
  node_input["Validated input<br/>[MyTextBox.cs]"]
end

subgraph group_domain["Gym Operations"]
  node_people["People and users"]
  node_members["Members"]
  node_subscriptions["Subscriptions"]
  node_classes["Classes and registration"]
  node_workforce["Staff and attendance"]
  node_payments["Payments"]
  node_plans["Subscription plans"]
end

subgraph group_business["Business Logic"]
  node_subscription_logic["Subscription rules<br/>[clsSubscription.cs]"]
  node_business_services["Business services"]
end

subgraph group_data["Data Access"]
  node_subscription_store["Subscription persistence"]
  node_class_store["Class persistence<br/>[clsClassesData.cs]"]
  node_employee_store["Employee persistence"]
  node_connection["Connection settings"]
end

node_operator(("Gym staff"))
node_sql[("SQL Server")]

node_operator -.->|"starts app"| node_app
node_app -->|"opens"| node_login
node_login -.->|"authenticates to"| node_dashboard
node_operator -.->|"uses"| node_dashboard
node_dashboard -.->|"offers management"| node_people
node_dashboard -.->|"offers management"| node_members
node_dashboard -.->|"offers management"| node_subscriptions
node_dashboard -.->|"offers management"| node_classes
node_dashboard -.->|"offers management"| node_workforce
node_dashboard -.->|"offers management"| node_payments
node_subscriptions -->|"invokes"| node_subscription_logic
node_subscription_logic -->|"persists subscriptions"| node_subscription_store
node_subscription_logic -.->|"uses membership actions"| node_business_services
node_subscriptions -.->|"selects plans"| node_plans
node_people -.->|"uses"| node_business_services
node_members -.->|"uses"| node_business_services
node_classes -.->|"uses"| node_business_services
node_workforce -.->|"uses"| node_business_services
node_payments -.->|"uses"| node_business_services
node_input -->|"validates input"| node_members
node_class_store -->|"reads settings"| node_connection
node_employee_store -->|"reads settings"| node_connection
node_class_store -.->|"queries"| node_sql
node_employee_store -.->|"queries"| node_sql
node_subscription_store -.->|"queries"| node_sql

click node_app "https://github.com/alryqyashrf979-ux/gymmanagementsystem/blob/main/GymProject/Program.cs"
click node_login "https://github.com/alryqyashrf979-ux/gymmanagementsystem/blob/main/GymProject/Login/frmLogin.cs"
click node_dashboard "https://github.com/alryqyashrf979-ux/gymmanagementsystem/blob/main/GymProject/frmDashboard.cs"
click node_people "https://github.com/alryqyashrf979-ux/gymmanagementsystem/tree/main/GymProject/People"
click node_members "https://github.com/alryqyashrf979-ux/gymmanagementsystem/tree/main/GymProject/Members"
click node_subscriptions "https://github.com/alryqyashrf979-ux/gymmanagementsystem/blob/main/GymProject/Subscription/frmManageSubscription.cs"
click node_classes "https://github.com/alryqyashrf979-ux/gymmanagementsystem/tree/main/GymProject/Classes"
click node_workforce "https://github.com/alryqyashrf979-ux/gymmanagementsystem/tree/main/GymProject/Employees"
click node_payments "https://github.com/alryqyashrf979-ux/gymmanagementsystem/tree/main/GymProject/Payment"
click node_plans "https://github.com/alryqyashrf979-ux/gymmanagementsystem/tree/main/GymProject/Plan"
click node_input "https://github.com/alryqyashrf979-ux/gymmanagementsystem/blob/main/GymProject/MyTextBox.cs"
click node_subscription_logic "https://github.com/alryqyashrf979-ux/gymmanagementsystem/blob/main/DataBusinessLayer/clsSubscription.cs"
click node_business_services "https://github.com/alryqyashrf979-ux/gymmanagementsystem/tree/main/DataBusinessLayer"
click node_subscription_store "https://github.com/alryqyashrf979-ux/gymmanagementsystem/blob/main/DataAccessLayer/clsSubscriptionsData.cs"
click node_class_store "https://github.com/alryqyashrf979-ux/gymmanagementsystem/blob/main/DataAccessLayer/clsClassesData.cs"
click node_employee_store "https://github.com/alryqyashrf979-ux/gymmanagementsystem/blob/main/DataAccessLayer/clsEmployeesData.cs"
click node_connection "https://github.com/alryqyashrf979-ux/gymmanagementsystem/blob/main/DataAccessLayer/DataAccessSettings.cs"

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_app,node_login,node_dashboard,node_input toneBlue
class node_people,node_members,node_subscriptions,node_classes,node_workforce,node_payments,node_plans,node_sql toneAmber
class node_subscription_logic,node_business_services toneMint
class node_subscription_store,node_class_store,node_employee_store,node_connection toneRose
class node_operator toneIndigo
```

## Components

### Desktop UI

- [Application entry](https://github.com/alryqyashrf979-ux/gymmanagementsystem/blob/main/GymProject/Program.cs): `GymProject/Program.cs`
- [Login](https://github.com/alryqyashrf979-ux/gymmanagementsystem/blob/main/GymProject/Login/frmLogin.cs): `GymProject/Login/frmLogin.cs`
- [Dashboard](https://github.com/alryqyashrf979-ux/gymmanagementsystem/blob/main/GymProject/frmDashboard.cs): `GymProject/frmDashboard.cs`
- [Validated input](https://github.com/alryqyashrf979-ux/gymmanagementsystem/blob/main/GymProject/MyTextBox.cs): `GymProject/MyTextBox.cs`

### Gym Operations

- [People and users](https://github.com/alryqyashrf979-ux/gymmanagementsystem/tree/main/GymProject/People): `GymProject/People`
- [Members](https://github.com/alryqyashrf979-ux/gymmanagementsystem/tree/main/GymProject/Members): `GymProject/Members`
- [Subscriptions](https://github.com/alryqyashrf979-ux/gymmanagementsystem/blob/main/GymProject/Subscription/frmManageSubscription.cs): `GymProject/Subscription/frmManageSubscription.cs`
- [Classes and registration](https://github.com/alryqyashrf979-ux/gymmanagementsystem/tree/main/GymProject/Classes): `GymProject/Classes`
- [Staff and attendance](https://github.com/alryqyashrf979-ux/gymmanagementsystem/tree/main/GymProject/Employees): `GymProject/Employees`
- [Payments](https://github.com/alryqyashrf979-ux/gymmanagementsystem/tree/main/GymProject/Payment): `GymProject/Payment`
- [Subscription plans](https://github.com/alryqyashrf979-ux/gymmanagementsystem/tree/main/GymProject/Plan): `GymProject/Plan`

### Business Logic

- [Subscription rules](https://github.com/alryqyashrf979-ux/gymmanagementsystem/blob/main/DataBusinessLayer/clsSubscription.cs): `DataBusinessLayer/clsSubscription.cs`
- [Business services](https://github.com/alryqyashrf979-ux/gymmanagementsystem/tree/main/DataBusinessLayer): `DataBusinessLayer`

### Data Access

- [Subscription persistence](https://github.com/alryqyashrf979-ux/gymmanagementsystem/blob/main/DataAccessLayer/clsSubscriptionsData.cs): `DataAccessLayer/clsSubscriptionsData.cs`
- [Class persistence](https://github.com/alryqyashrf979-ux/gymmanagementsystem/blob/main/DataAccessLayer/clsClassesData.cs): `DataAccessLayer/clsClassesData.cs`
- [Employee persistence](https://github.com/alryqyashrf979-ux/gymmanagementsystem/blob/main/DataAccessLayer/clsEmployeesData.cs): `DataAccessLayer/clsEmployeesData.cs`
- [Connection settings](https://github.com/alryqyashrf979-ux/gymmanagementsystem/blob/main/DataAccessLayer/DataAccessSettings.cs): `DataAccessLayer/DataAccessSettings.cs`

### Other components

- **Gym staff**
- **SQL Server**

## Connections

- Gym staff → Application entry: starts app
- Application entry → Login: opens (evidence: `GymProject/Program.cs`)
- Login → Dashboard: authenticates to
- Gym staff → Dashboard: uses
- Dashboard → People and users: offers management
- Dashboard → Members: offers management
- Dashboard → Subscriptions: offers management
- Dashboard → Classes and registration: offers management
- Dashboard → Staff and attendance: offers management
- Dashboard → Payments: offers management
- Subscriptions → Subscription rules: invokes (evidence: `GymProject/Subscription/frmManageSubscription.cs`)
- Subscription rules → Subscription persistence: persists subscriptions (evidence: `DataBusinessLayer/clsSubscription.cs`)
- Subscription rules → Business services: uses membership actions
- Subscriptions → Subscription plans: selects plans
- People and users → Business services: uses
- Members → Business services: uses
- Classes and registration → Business services: uses
- Staff and attendance → Business services: uses
- Payments → Business services: uses
- Validated input → Members: validates input (evidence: `GymProject/Members/Controls/ctrlMemberBasicDetailsWithFiltering.cs`)
- Class persistence → Connection settings: reads settings (evidence: `DataAccessLayer/clsClassesData.cs`)
- Employee persistence → Connection settings: reads settings (evidence: `DataAccessLayer/clsEmployeesData.cs`)
- Class persistence → SQL Server: queries
- Employee persistence → SQL Server: queries
- Subscription persistence → SQL Server: queries
