# alexcrazy42/fithub architecture

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

- Interactive diagram: https://gitdiagram.com/alexcrazy42/fithub
- Repository: https://github.com/alexcrazy42/fithub

## Overview

FitHub is a fitness-industry SaaS platform combining gym operations (ERP), visitor-facing messaging (CRM), and marketplace features; a separate BankManager handles payment intents. The main user journey is using the React app to access platform capabilities through its API, with domain services and persistence behind that API. Groups preserve documented capabilities even where source was not sampled. Relationships between unsampled subsystems are omitted; dashed links mark the unverified app-to-API entry path.

Main entry points: [`frontend/src`](https://github.com/alexcrazy42/fithub/tree/dev/frontend/src) (React app), [`backend/Platform/src/Web`](https://github.com/alexcrazy42/fithub/tree/dev/backend/Platform/src/Web) (Platform API), [`backend/Platform/src/Application/Messaging`](https://github.com/alexcrazy42/fithub/tree/dev/backend/Platform/src/Application/Messaging) (Messaging and chat), [`backend/Platform/src/Domain/Messaging/Message.cs`](https://github.com/alexcrazy42/fithub/blob/dev/backend/Platform/src/Domain/Messaging/Message.cs) (Message domain)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["User experience"]
  node_frontend["React app"]
end

subgraph group_platform["Fitness platform"]
  node_platform_api["Platform API"]
  node_accounts["Users and access"]
  node_gyms["Gyms and equipment"]
  node_training["Training management"]
  node_messaging["Messaging and chat"]
  node_message_domain["Message domain<br/>[Message.cs]"]
  node_files["File services"]
  node_video["Video services"]
end

subgraph group_commerce["Commerce and payments"]
  node_marketplace["Marketplace"]
  node_bank_api["BankManager API"]
  node_payment_service["Payment intents"]
  node_payment_domain["Payment domain<br/>[PaymentIntent.cs]"]
  node_bank_jobs["Payment workers"]
end

subgraph group_foundation["Shared infrastructure"]
  node_platform_data[("Platform data layer")]
  node_bank_data[("BankManager data")]
  node_rabbitmq["RabbitMQ messaging"]
end

subgraph group_experiments["Technology sandbox"]
  node_sandbox["Technology experiments"]
end

node_user(("Platform user"))
node_s3[("S3 object storage")]

node_user -.->|"uses"| node_frontend
node_frontend -.->|"calls API"| node_platform_api
node_platform_api -->|"uses sticker service"| node_messaging
node_message_domain -.->|"persists"| node_platform_data
node_marketplace -.->|"requests payments"| node_bank_api
node_payment_service -.->|"updates intent"| node_payment_domain
node_payment_domain -.->|"persists"| node_bank_data
node_bank_jobs -.->|"processes intents"| node_payment_service
node_files -.->|"stores files"| node_s3
node_video -.->|"stores video"| node_s3
node_messaging -.->|"uses messages"| node_message_domain

click node_frontend "https://github.com/alexcrazy42/fithub/tree/dev/frontend/src"
click node_platform_api "https://github.com/alexcrazy42/fithub/tree/dev/backend/Platform/src/Web"
click node_accounts "https://github.com/alexcrazy42/fithub/tree/dev/backend/Platform/src/Application/Users"
click node_gyms "https://github.com/alexcrazy42/fithub/tree/dev/backend/Platform/src/Application/Equipments"
click node_training "https://github.com/alexcrazy42/fithub/tree/dev/backend/Platform/src/Application/Trainings"
click node_messaging "https://github.com/alexcrazy42/fithub/tree/dev/backend/Platform/src/Application/Messaging"
click node_message_domain "https://github.com/alexcrazy42/fithub/blob/dev/backend/Platform/src/Domain/Messaging/Message.cs"
click node_files "https://github.com/alexcrazy42/fithub/tree/dev/backend/Platform/src/Application/Files"
click node_video "https://github.com/alexcrazy42/fithub/tree/dev/backend/Platform/src/Application/Videos"
click node_marketplace "https://github.com/alexcrazy42/fithub/tree/dev/backend/Platform/src/Application/Marketplace"
click node_bank_api "https://github.com/alexcrazy42/fithub/tree/dev/backend/BankManager/src/Web"
click node_payment_service "https://github.com/alexcrazy42/fithub/blob/dev/backend/BankManager/src/Application/Payments/PaymentIntentService.cs"
click node_payment_domain "https://github.com/alexcrazy42/fithub/blob/dev/backend/BankManager/src/Domain/PaymentIntent.cs"
click node_bank_jobs "https://github.com/alexcrazy42/fithub/tree/dev/backend/BankManager/src/Jobs"
click node_platform_data "https://github.com/alexcrazy42/fithub/tree/dev/backend/Platform/src/Data"
click node_bank_data "https://github.com/alexcrazy42/fithub/blob/dev/backend/BankManager/src/Data/BankManagerDataContext.cs"
click node_rabbitmq "https://github.com/alexcrazy42/fithub/tree/dev/backend/Common/RabbitMQ"
click node_sandbox "https://github.com/alexcrazy42/fithub/tree/dev/sandbox"

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_frontend,node_user toneBlue
class node_platform_api,node_accounts,node_gyms,node_training,node_messaging,node_message_domain,node_files,node_video,node_s3 toneAmber
class node_marketplace,node_bank_api,node_payment_service,node_payment_domain,node_bank_jobs toneMint
class node_platform_data,node_bank_data,node_rabbitmq toneRose
class node_sandbox toneIndigo
```

## Components

### User experience

- [React app](https://github.com/alexcrazy42/fithub/tree/dev/frontend/src): `frontend/src`

### Fitness platform

- [Platform API](https://github.com/alexcrazy42/fithub/tree/dev/backend/Platform/src/Web): `backend/Platform/src/Web`
- [Users and access](https://github.com/alexcrazy42/fithub/tree/dev/backend/Platform/src/Application/Users): `backend/Platform/src/Application/Users`
- [Gyms and equipment](https://github.com/alexcrazy42/fithub/tree/dev/backend/Platform/src/Application/Equipments): `backend/Platform/src/Application/Equipments`
- [Training management](https://github.com/alexcrazy42/fithub/tree/dev/backend/Platform/src/Application/Trainings): `backend/Platform/src/Application/Trainings`
- [Messaging and chat](https://github.com/alexcrazy42/fithub/tree/dev/backend/Platform/src/Application/Messaging): `backend/Platform/src/Application/Messaging`
- [Message domain](https://github.com/alexcrazy42/fithub/blob/dev/backend/Platform/src/Domain/Messaging/Message.cs): `backend/Platform/src/Domain/Messaging/Message.cs`
- [File services](https://github.com/alexcrazy42/fithub/tree/dev/backend/Platform/src/Application/Files): `backend/Platform/src/Application/Files`
- [Video services](https://github.com/alexcrazy42/fithub/tree/dev/backend/Platform/src/Application/Videos): `backend/Platform/src/Application/Videos`

### Commerce and payments

- [Marketplace](https://github.com/alexcrazy42/fithub/tree/dev/backend/Platform/src/Application/Marketplace): `backend/Platform/src/Application/Marketplace`
- [BankManager API](https://github.com/alexcrazy42/fithub/tree/dev/backend/BankManager/src/Web): `backend/BankManager/src/Web`
- [Payment intents](https://github.com/alexcrazy42/fithub/blob/dev/backend/BankManager/src/Application/Payments/PaymentIntentService.cs): `backend/BankManager/src/Application/Payments/PaymentIntentService.cs`
- [Payment domain](https://github.com/alexcrazy42/fithub/blob/dev/backend/BankManager/src/Domain/PaymentIntent.cs): `backend/BankManager/src/Domain/PaymentIntent.cs`
- [Payment workers](https://github.com/alexcrazy42/fithub/tree/dev/backend/BankManager/src/Jobs): `backend/BankManager/src/Jobs`

### Shared infrastructure

- [Platform data layer](https://github.com/alexcrazy42/fithub/tree/dev/backend/Platform/src/Data): `backend/Platform/src/Data`
- [BankManager data](https://github.com/alexcrazy42/fithub/blob/dev/backend/BankManager/src/Data/BankManagerDataContext.cs): `backend/BankManager/src/Data/BankManagerDataContext.cs`
- [RabbitMQ messaging](https://github.com/alexcrazy42/fithub/tree/dev/backend/Common/RabbitMQ): `backend/Common/RabbitMQ`

### Technology sandbox

- [Technology experiments](https://github.com/alexcrazy42/fithub/tree/dev/sandbox): `sandbox`

### Other components

- **Platform user**
- **S3 object storage**

## Connections

- Platform user → React app: uses
- React app → Platform API: calls API
- Platform API → Messaging and chat: uses sticker service (evidence: `backend/Platform/src/Web/V1/Messaging/StickerController.cs`)
- Message domain → Platform data layer: persists
- Marketplace → BankManager API: requests payments
- Payment intents → Payment domain: updates intent
- Payment domain → BankManager data: persists (evidence: `backend/BankManager/src/Data/BankManagerDataContext.cs`)
- Payment workers → Payment intents: processes intents
- File services → S3 object storage: stores files
- Video services → S3 object storage: stores video
- Messaging and chat → Message domain: uses messages
