# s2ggolge/fitnes-pro architecture

> Architecture diagram of the GitHub repository s2ggolge/fitnes-pro, 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/s2ggolge/fitnes-pro
- Repository: https://github.com/s2ggolge/fitnes-pro

## Overview

Gym Pro is a fitness and social application backed by an ASP.NET API and browser JavaScript. Users authenticate and complete onboarding, then use social, messaging, maps, and fitness-facing UI features; admins manage accounts, bans, and logs. The tree documents major frontend capabilities, but the README is empty and most endpoint wiring and domain implementations were not sampled. Edges below therefore focus on directly evidenced calls, with selected documented-by-tree capabilities shown without speculative connections.

Main entry points: [`Backend/Gym-Pro-Api/Gym-Pro-Api/Program.cs`](https://github.com/s2ggolge/fitnes-pro/blob/main/Backend/Gym-Pro-Api/Gym-Pro-Api/Program.cs) (ASP.NET API), [`Backend/Gym-Pro-Api/Gym-Pro-Api/Services/Authentication/LoginService.cs`](https://github.com/s2ggolge/fitnes-pro/blob/main/Backend/Gym-Pro-Api/Gym-Pro-Api/Services/Authentication/LoginService.cs) (Login and onboarding), [`Backend/Gym-Pro-Api/Gym-Pro-Api/Services/Authentication/BanStorageService.cs`](https://github.com/s2ggolge/fitnes-pro/blob/main/Backend/Gym-Pro-Api/Gym-Pro-Api/Services/Authentication/BanStorageService.cs) (Ban and appeals), [`Backend/Gym-Pro-Api/Gym-Pro-Api/Controllers/AdminBanAppealController.cs`](https://github.com/s2ggolge/fitnes-pro/blob/main/Backend/Gym-Pro-Api/Gym-Pro-Api/Controllers/AdminBanAppealController.cs) (Admin appeal review)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Web client"]
  node_webui["Fitness UI<br/>[Goals.js]"]
  node_authui["Authentication UI<br/>[auth.js]"]
  node_mapui["Maps UI<br/>[Haritalar.js]"]
  node_workouts["Workout UI<br/>[Workouts.js]"]
end

subgraph group_identity["Identity and safety"]
  node_loginroute["Login endpoint"]
  node_registerroute["Registration endpoint"]
  node_login["Login and onboarding<br/>[LoginService.cs]"]
  node_register["Registration service<br/>[RegisterService.cs]"]
  node_ban["Ban and appeals"]
  node_loginlimit["Login rate limits"]
  node_twofactor["Two-factor codes"]
end

subgraph group_social["Social and messaging"]
  node_friendroute["Friend endpoints"]
  node_friends["Friend service<br/>[FriendService.cs]"]
  node_messageroute["Message endpoints"]
  node_messages["Message engine<br/>[MessageService.cs]"]
  node_requestroute["Message request endpoints"]
  node_requests["Message request service"]
  node_privacy["Messaging privacy"]
end

subgraph group_fitness["Fitness and location"]
  node_maps["Map and location<br/>[MapService.cs]"]
end

subgraph group_operations["Administration"]
  node_adminroute["Admin endpoints"]
  node_appeals["Admin appeal review"]
  node_logs["Application logs<br/>[LogService.cs]"]
end

node_user(("App user"))
node_api["ASP.NET API<br/>[Program.cs]"]
node_sql[("SQL database")]

node_user -->|"uses"| node_authui
node_user -->|"uses"| node_webui
node_authui -.->|"requests login"| node_loginroute
node_loginroute -->|"calls"| node_login
node_registerroute -->|"calls"| node_register
node_login -->|"checks ban"| node_ban
node_login -->|"records events"| node_logs
node_api -->|"registers service"| node_login
node_api -->|"registers service"| node_register
node_api -->|"registers service"| node_ban
node_api -->|"registers service"| node_loginlimit
node_api -->|"registers service"| node_twofactor
node_friendroute -->|"calls"| node_friends
node_messageroute -->|"calls"| node_messages
node_requestroute -->|"calls"| node_requests
node_appeals -->|"decides appeals"| node_ban
node_appeals -->|"clears lock"| node_loginlimit
node_appeals -->|"records decision"| node_logs
node_api -.->|"serves controllers"| node_adminroute
node_mapui -.->|"requests locations"| node_maps
node_webui -.->|"offers fitness features"| node_workouts
node_ban -->|"reads and writes"| node_sql
node_friends -->|"reads and writes"| node_sql
node_maps -.->|"uses persistence"| node_sql

click node_webui "https://github.com/s2ggolge/fitnes-pro/blob/main/Fronted/JavaScripts/UI/Goals.js"
click node_authui "https://github.com/s2ggolge/fitnes-pro/blob/main/Fronted/JavaScripts/Core/auth.js"
click node_api "https://github.com/s2ggolge/fitnes-pro/blob/main/Backend/Gym-Pro-Api/Gym-Pro-Api/Program.cs"
click node_loginroute "https://github.com/s2ggolge/fitnes-pro/blob/main/Backend/Gym-Pro-Api/Gym-Pro-Api/Controllers/Authentication/LoginControllers.cs"
click node_registerroute "https://github.com/s2ggolge/fitnes-pro/blob/main/Backend/Gym-Pro-Api/Gym-Pro-Api/Controllers/Authentication/RegisterControllers.cs"
click node_login "https://github.com/s2ggolge/fitnes-pro/blob/main/Backend/Gym-Pro-Api/Gym-Pro-Api/Services/Authentication/LoginService.cs"
click node_register "https://github.com/s2ggolge/fitnes-pro/blob/main/Backend/Gym-Pro-Api/Gym-Pro-Api/Services/Authentication/RegisterService.cs"
click node_ban "https://github.com/s2ggolge/fitnes-pro/blob/main/Backend/Gym-Pro-Api/Gym-Pro-Api/Services/Authentication/BanStorageService.cs"
click node_loginlimit "https://github.com/s2ggolge/fitnes-pro/blob/main/Backend/Gym-Pro-Api/Gym-Pro-Api/Services/Authentication/LoginRateLimitingService.cs"
click node_twofactor "https://github.com/s2ggolge/fitnes-pro/blob/main/Backend/Gym-Pro-Api/Gym-Pro-Api/Services/TwoFactor/TwoFactorService.cs"
click node_friendroute "https://github.com/s2ggolge/fitnes-pro/blob/main/Backend/Gym-Pro-Api/Gym-Pro-Api/Controllers/FriendController.cs"
click node_friends "https://github.com/s2ggolge/fitnes-pro/blob/main/Backend/Gym-Pro-Api/Gym-Pro-Api/Services/FriendService/FriendService.cs"
click node_messageroute "https://github.com/s2ggolge/fitnes-pro/blob/main/Backend/Gym-Pro-Api/Gym-Pro-Api/Controllers/Message/MessageController.cs"
click node_messages "https://github.com/s2ggolge/fitnes-pro/blob/main/Backend/Gym-Pro-Api/Gym-Pro-Api/Services/Message/Engine/MessageService.cs"
click node_requestroute "https://github.com/s2ggolge/fitnes-pro/blob/main/Backend/Gym-Pro-Api/Gym-Pro-Api/Controllers/Message/MessageRequestsController.cs"
click node_requests "https://github.com/s2ggolge/fitnes-pro/blob/main/Backend/Gym-Pro-Api/Gym-Pro-Api/Services/Message/MessageRequests/MessageRequestService.cs"
click node_privacy "https://github.com/s2ggolge/fitnes-pro/blob/main/Backend/Gym-Pro-Api/Gym-Pro-Api/Services/Message/Security/UpdatePrivacySettingsAsync.cs"
click node_maps "https://github.com/s2ggolge/fitnes-pro/blob/main/Backend/Gym-Pro-Api/Gym-Pro-Api/Services/Maps/MapService.cs"
click node_mapui "https://github.com/s2ggolge/fitnes-pro/blob/main/Fronted/JavaScripts/UI/Haritalar.js"
click node_workouts "https://github.com/s2ggolge/fitnes-pro/blob/main/Fronted/JavaScripts/UI/Workouts.js"
click node_adminroute "https://github.com/s2ggolge/fitnes-pro/blob/main/Backend/Gym-Pro-Api/Gym-Pro-Api/Controllers/AdminConttroller.cs"
click node_appeals "https://github.com/s2ggolge/fitnes-pro/blob/main/Backend/Gym-Pro-Api/Gym-Pro-Api/Controllers/AdminBanAppealController.cs"
click node_logs "https://github.com/s2ggolge/fitnes-pro/blob/main/Backend/Gym-Pro-Api/Gym-Pro-Api/Services/Log/LogService.cs"
click node_sql "https://github.com/s2ggolge/fitnes-pro/blob/main/Backend/Gym-Pro-Api/Gym-Pro-Api/Data/ApplicationDbContext.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_webui,node_authui,node_mapui,node_workouts,node_user toneBlue
class node_loginroute,node_registerroute,node_login,node_register,node_ban,node_loginlimit,node_twofactor,node_sql toneAmber
class node_friendroute,node_friends,node_messageroute,node_messages,node_requestroute,node_requests,node_privacy,node_api toneMint
class node_maps toneRose
class node_adminroute,node_appeals,node_logs toneIndigo
```

## Components

### Web client

- [Fitness UI](https://github.com/s2ggolge/fitnes-pro/blob/main/Fronted/JavaScripts/UI/Goals.js): `Fronted/JavaScripts/UI/Goals.js`
- [Authentication UI](https://github.com/s2ggolge/fitnes-pro/blob/main/Fronted/JavaScripts/Core/auth.js): `Fronted/JavaScripts/Core/auth.js`
- [Maps UI](https://github.com/s2ggolge/fitnes-pro/blob/main/Fronted/JavaScripts/UI/Haritalar.js): `Fronted/JavaScripts/UI/Haritalar.js`
- [Workout UI](https://github.com/s2ggolge/fitnes-pro/blob/main/Fronted/JavaScripts/UI/Workouts.js): `Fronted/JavaScripts/UI/Workouts.js`

### Identity and safety

- [Login endpoint](https://github.com/s2ggolge/fitnes-pro/blob/main/Backend/Gym-Pro-Api/Gym-Pro-Api/Controllers/Authentication/LoginControllers.cs): `Backend/Gym-Pro-Api/Gym-Pro-Api/Controllers/Authentication/LoginControllers.cs`
- [Registration endpoint](https://github.com/s2ggolge/fitnes-pro/blob/main/Backend/Gym-Pro-Api/Gym-Pro-Api/Controllers/Authentication/RegisterControllers.cs): `Backend/Gym-Pro-Api/Gym-Pro-Api/Controllers/Authentication/RegisterControllers.cs`
- [Login and onboarding](https://github.com/s2ggolge/fitnes-pro/blob/main/Backend/Gym-Pro-Api/Gym-Pro-Api/Services/Authentication/LoginService.cs): `Backend/Gym-Pro-Api/Gym-Pro-Api/Services/Authentication/LoginService.cs`
- [Registration service](https://github.com/s2ggolge/fitnes-pro/blob/main/Backend/Gym-Pro-Api/Gym-Pro-Api/Services/Authentication/RegisterService.cs): `Backend/Gym-Pro-Api/Gym-Pro-Api/Services/Authentication/RegisterService.cs`
- [Ban and appeals](https://github.com/s2ggolge/fitnes-pro/blob/main/Backend/Gym-Pro-Api/Gym-Pro-Api/Services/Authentication/BanStorageService.cs): `Backend/Gym-Pro-Api/Gym-Pro-Api/Services/Authentication/BanStorageService.cs`
- [Login rate limits](https://github.com/s2ggolge/fitnes-pro/blob/main/Backend/Gym-Pro-Api/Gym-Pro-Api/Services/Authentication/LoginRateLimitingService.cs): `Backend/Gym-Pro-Api/Gym-Pro-Api/Services/Authentication/LoginRateLimitingService.cs`
- [Two-factor codes](https://github.com/s2ggolge/fitnes-pro/blob/main/Backend/Gym-Pro-Api/Gym-Pro-Api/Services/TwoFactor/TwoFactorService.cs): `Backend/Gym-Pro-Api/Gym-Pro-Api/Services/TwoFactor/TwoFactorService.cs`

### Social and messaging

- [Friend endpoints](https://github.com/s2ggolge/fitnes-pro/blob/main/Backend/Gym-Pro-Api/Gym-Pro-Api/Controllers/FriendController.cs): `Backend/Gym-Pro-Api/Gym-Pro-Api/Controllers/FriendController.cs`
- [Friend service](https://github.com/s2ggolge/fitnes-pro/blob/main/Backend/Gym-Pro-Api/Gym-Pro-Api/Services/FriendService/FriendService.cs): `Backend/Gym-Pro-Api/Gym-Pro-Api/Services/FriendService/FriendService.cs`
- [Message endpoints](https://github.com/s2ggolge/fitnes-pro/blob/main/Backend/Gym-Pro-Api/Gym-Pro-Api/Controllers/Message/MessageController.cs): `Backend/Gym-Pro-Api/Gym-Pro-Api/Controllers/Message/MessageController.cs`
- [Message engine](https://github.com/s2ggolge/fitnes-pro/blob/main/Backend/Gym-Pro-Api/Gym-Pro-Api/Services/Message/Engine/MessageService.cs): `Backend/Gym-Pro-Api/Gym-Pro-Api/Services/Message/Engine/MessageService.cs`
- [Message request endpoints](https://github.com/s2ggolge/fitnes-pro/blob/main/Backend/Gym-Pro-Api/Gym-Pro-Api/Controllers/Message/MessageRequestsController.cs): `Backend/Gym-Pro-Api/Gym-Pro-Api/Controllers/Message/MessageRequestsController.cs`
- [Message request service](https://github.com/s2ggolge/fitnes-pro/blob/main/Backend/Gym-Pro-Api/Gym-Pro-Api/Services/Message/MessageRequests/MessageRequestService.cs): `Backend/Gym-Pro-Api/Gym-Pro-Api/Services/Message/MessageRequests/MessageRequestService.cs`
- [Messaging privacy](https://github.com/s2ggolge/fitnes-pro/blob/main/Backend/Gym-Pro-Api/Gym-Pro-Api/Services/Message/Security/UpdatePrivacySettingsAsync.cs): `Backend/Gym-Pro-Api/Gym-Pro-Api/Services/Message/Security/UpdatePrivacySettingsAsync.cs`

### Fitness and location

- [Map and location](https://github.com/s2ggolge/fitnes-pro/blob/main/Backend/Gym-Pro-Api/Gym-Pro-Api/Services/Maps/MapService.cs): `Backend/Gym-Pro-Api/Gym-Pro-Api/Services/Maps/MapService.cs`

### Administration

- [Admin endpoints](https://github.com/s2ggolge/fitnes-pro/blob/main/Backend/Gym-Pro-Api/Gym-Pro-Api/Controllers/AdminConttroller.cs): `Backend/Gym-Pro-Api/Gym-Pro-Api/Controllers/AdminConttroller.cs`
- [Admin appeal review](https://github.com/s2ggolge/fitnes-pro/blob/main/Backend/Gym-Pro-Api/Gym-Pro-Api/Controllers/AdminBanAppealController.cs): `Backend/Gym-Pro-Api/Gym-Pro-Api/Controllers/AdminBanAppealController.cs`
- [Application logs](https://github.com/s2ggolge/fitnes-pro/blob/main/Backend/Gym-Pro-Api/Gym-Pro-Api/Services/Log/LogService.cs): `Backend/Gym-Pro-Api/Gym-Pro-Api/Services/Log/LogService.cs`

### Other components

- **App user**
- [ASP.NET API](https://github.com/s2ggolge/fitnes-pro/blob/main/Backend/Gym-Pro-Api/Gym-Pro-Api/Program.cs): `Backend/Gym-Pro-Api/Gym-Pro-Api/Program.cs`
- [SQL database](https://github.com/s2ggolge/fitnes-pro/blob/main/Backend/Gym-Pro-Api/Gym-Pro-Api/Data/ApplicationDbContext.cs): `Backend/Gym-Pro-Api/Gym-Pro-Api/Data/ApplicationDbContext.cs`

## Connections

- App user → Authentication UI: uses
- App user → Fitness UI: uses
- Authentication UI → Login endpoint: requests login
- Login endpoint → Login and onboarding: calls (evidence: `Backend/Gym-Pro-Api/Gym-Pro-Api/Controllers/Authentication/LoginControllers.cs`)
- Registration endpoint → Registration service: calls (evidence: `Backend/Gym-Pro-Api/Gym-Pro-Api/Controllers/Authentication/RegisterControllers.cs`)
- Login and onboarding → Ban and appeals: checks ban (evidence: `Backend/Gym-Pro-Api/Gym-Pro-Api/Services/Authentication/LoginService.cs`)
- Login and onboarding → Application logs: records events (evidence: `Backend/Gym-Pro-Api/Gym-Pro-Api/Services/Authentication/LoginService.cs`)
- ASP.NET API → Login and onboarding: registers service (evidence: `Backend/Gym-Pro-Api/Gym-Pro-Api/Program.cs`)
- ASP.NET API → Registration service: registers service (evidence: `Backend/Gym-Pro-Api/Gym-Pro-Api/Program.cs`)
- ASP.NET API → Ban and appeals: registers service (evidence: `Backend/Gym-Pro-Api/Gym-Pro-Api/Program.cs`)
- ASP.NET API → Login rate limits: registers service (evidence: `Backend/Gym-Pro-Api/Gym-Pro-Api/Program.cs`)
- ASP.NET API → Two-factor codes: registers service (evidence: `Backend/Gym-Pro-Api/Gym-Pro-Api/Program.cs`)
- Friend endpoints → Friend service: calls (evidence: `Backend/Gym-Pro-Api/Gym-Pro-Api/Controllers/FriendController.cs`)
- Message endpoints → Message engine: calls (evidence: `Backend/Gym-Pro-Api/Gym-Pro-Api/Controllers/Message/MessageController.cs`)
- Message request endpoints → Message request service: calls (evidence: `Backend/Gym-Pro-Api/Gym-Pro-Api/Controllers/Message/MessageRequestsController.cs`)
- Admin appeal review → Ban and appeals: decides appeals (evidence: `Backend/Gym-Pro-Api/Gym-Pro-Api/Controllers/AdminBanAppealController.cs`)
- Admin appeal review → Login rate limits: clears lock (evidence: `Backend/Gym-Pro-Api/Gym-Pro-Api/Controllers/AdminBanAppealController.cs`)
- Admin appeal review → Application logs: records decision (evidence: `Backend/Gym-Pro-Api/Gym-Pro-Api/Controllers/AdminBanAppealController.cs`)
- ASP.NET API → Admin endpoints: serves controllers
- Maps UI → Map and location: requests locations
- Fitness UI → Workout UI: offers fitness features
- Ban and appeals → SQL database: reads and writes (evidence: `Backend/Gym-Pro-Api/Gym-Pro-Api/Services/Authentication/BanStorageService.cs`)
- Friend service → SQL database: reads and writes (evidence: `Backend/Gym-Pro-Api/Gym-Pro-Api/Services/FriendService/FriendService.cs`)
- Map and location → SQL database: uses persistence
