# dtstimdjumaniyazov/gym architecture

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

## Overview

FitEvolution is a course and training platform with web and mobile clients backed by a Django API. Learners can discover courses, view lessons, enroll, and manage their profiles; trainers have course-creation and trainer-facing pages. The mobile client additionally implements login, registration, social sign-in, and Telegram login. The graph includes documented client routing and sampled client/API-layer relationships; backend feature areas are represented from the source tree, but their internal call paths are not shown in the excerpts.

Main entry points: [`frontend/src/App.jsx`](https://github.com/dtstimdjumaniyazov/gym/blob/master/frontend/src/App.jsx) (Web routes), [`mobile/src/services/api.js`](https://github.com/dtstimdjumaniyazov/gym/blob/master/mobile/src/services/api.js) (Mobile API client), [`frontend/src/app/api/baseQuery.js`](https://github.com/dtstimdjumaniyazov/gym/blob/master/frontend/src/app/api/baseQuery.js) (Web API layer), [`backend/courses/models.py`](https://github.com/dtstimdjumaniyazov/gym/blob/master/backend/courses/models.py) (Courses and catalog)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web client"]
  node_webapp["Web routes<br/>[App.jsx]"]
  node_webshell["Main layout<br/>[MainLayout.jsx]"]
  node_webcourse["Course pages<br/>[CourseDetail.jsx]"]
  node_webcreate["Course creation<br/>[CourseCreate.jsx]"]
  node_webprofile["Profile<br/>[Profile.jsx]"]
  node_webapi["Web API layer<br/>[baseQuery.js]"]
end

subgraph group_mobile["Mobile client"]
  node_mobileapp["Mobile screens<br/>[index.jsx]"]
  node_mobileauth["Mobile authentication<br/>[authSlice.js]"]
  node_mobilehooks["Course and category hooks<br/>[useCourses.js]"]
  node_mobileapi["Mobile API client<br/>[api.js]"]
  node_mobilestorage[("Token storage<br/>[storage.js]")]
end

subgraph group_learning["Learning platform"]
  node_courses[("Courses and catalog<br/>[models.py]")]
  node_training[("Training schedules<br/>[models.py]")]
  node_enrollments[("Enrollments and progress<br/>[models.py]")]
  node_payments["Payments<br/>[views.py]"]
  node_storage["Course media<br/>[views.py]"]
end

subgraph group_identity["Identity and support"]
  node_users[("Accounts and trainers<br/>[models.py]")]
  node_notifications["Notifications<br/>[services.py]"]
end

node_user(("Learner or trainer"))
node_telegram["Telegram"]

node_user -->|"uses"| node_webapp
node_webapp -->|"routes through"| node_webshell
node_webapp -->|"routes to"| node_webcourse
node_webapp -->|"routes to"| node_webcreate
node_webapp -->|"routes to"| node_webprofile
node_webcreate -->|"uses"| node_webapi
node_webcourse -.->|"requests data"| node_webapi
node_webprofile -.->|"requests data"| node_webapi
node_user -.->|"uses"| node_mobileapp
node_mobileapp -->|"loads catalog"| node_mobilehooks
node_mobilehooks -->|"requests data"| node_mobileapi
node_mobileapi -->|"reads tokens"| node_mobilestorage
node_mobileauth -->|"authenticates via"| node_mobileapi
node_mobileauth -->|"stores tokens"| node_mobilestorage
node_mobileapi -.->|"HTTP API"| node_courses
node_webapi -.->|"HTTP API"| node_courses
node_courses -.->|"signals reference"| node_training
node_enrollments -.->|"signals reference"| node_courses
node_notifications -->|"selects staff users"| node_users
node_notifications -->|"sends messages"| node_telegram

click node_webapp "https://github.com/dtstimdjumaniyazov/gym/blob/master/frontend/src/App.jsx"
click node_webshell "https://github.com/dtstimdjumaniyazov/gym/blob/master/frontend/src/layouts/MainLayout.jsx"
click node_webcourse "https://github.com/dtstimdjumaniyazov/gym/blob/master/frontend/src/pages/CourseDetail.jsx"
click node_webcreate "https://github.com/dtstimdjumaniyazov/gym/blob/master/frontend/src/pages/CourseCreate.jsx"
click node_webprofile "https://github.com/dtstimdjumaniyazov/gym/blob/master/frontend/src/pages/Profile.jsx"
click node_webapi "https://github.com/dtstimdjumaniyazov/gym/blob/master/frontend/src/app/api/baseQuery.js"
click node_mobileapp "https://github.com/dtstimdjumaniyazov/gym/blob/master/mobile/app/(tabs)/index.jsx"
click node_mobileauth "https://github.com/dtstimdjumaniyazov/gym/blob/master/mobile/src/store/authSlice.js"
click node_mobilehooks "https://github.com/dtstimdjumaniyazov/gym/blob/master/mobile/src/hooks/useCourses.js"
click node_mobileapi "https://github.com/dtstimdjumaniyazov/gym/blob/master/mobile/src/services/api.js"
click node_mobilestorage "https://github.com/dtstimdjumaniyazov/gym/blob/master/mobile/src/services/storage.js"
click node_courses "https://github.com/dtstimdjumaniyazov/gym/blob/master/backend/courses/models.py"
click node_training "https://github.com/dtstimdjumaniyazov/gym/blob/master/backend/training/models.py"
click node_enrollments "https://github.com/dtstimdjumaniyazov/gym/blob/master/backend/enrollments/models.py"
click node_payments "https://github.com/dtstimdjumaniyazov/gym/blob/master/backend/payments/views.py"
click node_storage "https://github.com/dtstimdjumaniyazov/gym/blob/master/backend/storage/views.py"
click node_users "https://github.com/dtstimdjumaniyazov/gym/blob/master/backend/users/models.py"
click node_notifications "https://github.com/dtstimdjumaniyazov/gym/blob/master/backend/notifications/services.py"

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_webapp,node_webshell,node_webcourse,node_webcreate,node_webprofile,node_webapi toneBlue
class node_mobileapp,node_mobileauth,node_mobilehooks,node_mobileapi,node_mobilestorage toneAmber
class node_courses,node_training,node_enrollments,node_payments,node_storage toneMint
class node_users,node_notifications toneRose
class node_user,node_telegram toneIndigo
```

## Components

### Web client

- [Web routes](https://github.com/dtstimdjumaniyazov/gym/blob/master/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Main layout](https://github.com/dtstimdjumaniyazov/gym/blob/master/frontend/src/layouts/MainLayout.jsx): `frontend/src/layouts/MainLayout.jsx`
- [Course pages](https://github.com/dtstimdjumaniyazov/gym/blob/master/frontend/src/pages/CourseDetail.jsx): `frontend/src/pages/CourseDetail.jsx`
- [Course creation](https://github.com/dtstimdjumaniyazov/gym/blob/master/frontend/src/pages/CourseCreate.jsx): `frontend/src/pages/CourseCreate.jsx`
- [Profile](https://github.com/dtstimdjumaniyazov/gym/blob/master/frontend/src/pages/Profile.jsx): `frontend/src/pages/Profile.jsx`
- [Web API layer](https://github.com/dtstimdjumaniyazov/gym/blob/master/frontend/src/app/api/baseQuery.js): `frontend/src/app/api/baseQuery.js`

### Mobile client

- [Mobile screens](https://github.com/dtstimdjumaniyazov/gym/blob/master/mobile/app/(tabs)/index.jsx): `mobile/app/(tabs)/index.jsx`
- [Mobile authentication](https://github.com/dtstimdjumaniyazov/gym/blob/master/mobile/src/store/authSlice.js): `mobile/src/store/authSlice.js`
- [Course and category hooks](https://github.com/dtstimdjumaniyazov/gym/blob/master/mobile/src/hooks/useCourses.js): `mobile/src/hooks/useCourses.js`
- [Mobile API client](https://github.com/dtstimdjumaniyazov/gym/blob/master/mobile/src/services/api.js): `mobile/src/services/api.js`
- [Token storage](https://github.com/dtstimdjumaniyazov/gym/blob/master/mobile/src/services/storage.js): `mobile/src/services/storage.js`

### Learning platform

- [Courses and catalog](https://github.com/dtstimdjumaniyazov/gym/blob/master/backend/courses/models.py): `backend/courses/models.py`
- [Training schedules](https://github.com/dtstimdjumaniyazov/gym/blob/master/backend/training/models.py): `backend/training/models.py`
- [Enrollments and progress](https://github.com/dtstimdjumaniyazov/gym/blob/master/backend/enrollments/models.py): `backend/enrollments/models.py`
- [Payments](https://github.com/dtstimdjumaniyazov/gym/blob/master/backend/payments/views.py): `backend/payments/views.py`
- [Course media](https://github.com/dtstimdjumaniyazov/gym/blob/master/backend/storage/views.py): `backend/storage/views.py`

### Identity and support

- [Accounts and trainers](https://github.com/dtstimdjumaniyazov/gym/blob/master/backend/users/models.py): `backend/users/models.py`
- [Notifications](https://github.com/dtstimdjumaniyazov/gym/blob/master/backend/notifications/services.py): `backend/notifications/services.py`

### Other components

- **Learner or trainer**
- **Telegram**

## Connections

- Learner or trainer → Web routes: uses
- Web routes → Main layout: routes through (evidence: `frontend/src/App.jsx`)
- Web routes → Course pages: routes to (evidence: `frontend/src/App.jsx`)
- Web routes → Course creation: routes to (evidence: `frontend/src/App.jsx`)
- Web routes → Profile: routes to (evidence: `frontend/src/App.jsx`)
- Course creation → Web API layer: uses (evidence: `frontend/src/pages/CourseCreate.jsx`)
- Course pages → Web API layer: requests data
- Profile → Web API layer: requests data
- Learner or trainer → Mobile screens: uses
- Mobile screens → Course and category hooks: loads catalog (evidence: `mobile/app/(tabs)/index.jsx`)
- Course and category hooks → Mobile API client: requests data (evidence: `mobile/src/hooks/useCourses.js`)
- Mobile API client → Token storage: reads tokens (evidence: `mobile/src/services/api.js`)
- Mobile authentication → Mobile API client: authenticates via (evidence: `mobile/src/store/authSlice.js`)
- Mobile authentication → Token storage: stores tokens (evidence: `mobile/src/store/authSlice.js`)
- Mobile API client → Courses and catalog: HTTP API
- Web API layer → Courses and catalog: HTTP API
- Courses and catalog → Training schedules: signals reference (evidence: `backend/courses/signals.py`)
- Enrollments and progress → Courses and catalog: signals reference (evidence: `backend/enrollments/signals.py`)
- Notifications → Accounts and trainers: selects staff users (evidence: `backend/notifications/services.py`)
- Notifications → Telegram: sends messages (evidence: `backend/notifications/services.py`)
