# andrew05049487/trianing-system architecture

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

- Interactive diagram: https://gitdiagram.com/andrew05049487/trianing-system
- Repository: https://github.com/andrew05049487/trianing-system

## Overview

This repository appears to be a Spring-based training and rehabilitation platform with account management, therapist-patient workflows, exercise plans, training records, realtime chat, and research-data governance. The file tree supports these capability areas, but the README is empty and the only indexed source excerpt is an empty static file. Consequently, the connections below are dashed and unverified; they describe likely runtime flow, not inspected call sites.

Main entry points: [`src/main/java/com/example/trainingsystems/TrainingSystemApplication.java`](https://github.com/andrew05049487/trianing-system/blob/main/src/main/java/com/example/trainingsystems/TrainingSystemApplication.java) (Spring application), [`src/main/resources/application.properties`](https://github.com/andrew05049487/trianing-system/blob/main/src/main/resources/application.properties) (Relational database), [`src/main/java/com/example/trainingsystems/controller/TrainingHistoryController.java`](https://github.com/andrew05049487/trianing-system/blob/main/src/main/java/com/example/trainingsystems/controller/TrainingHistoryController.java) (Training history), [`src/main/java/com/example/trainingsystems/service/ChatService.java`](https://github.com/andrew05049487/trianing-system/blob/main/src/main/java/com/example/trainingsystems/service/ChatService.java) (Chat messaging)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Application entry"]
  node_app["Spring application"]
end

subgraph group_identity["Identity and relationships"]
  node_auth["Authentication"]
  node_authsvc["Auth services<br/>[AuthService.java]"]
  node_account["Account management"]
  node_relationships["Patient relationships"]
end

subgraph group_rehab["Training and rehabilitation"]
  node_plans["Rehabilitation plans"]
  node_assignments["Exercise assignments"]
  node_exercises["Exercise catalog"]
  node_history["Training history"]
  node_results["Session results"]
  node_videos["History videos"]
end

subgraph group_communication["Realtime communication"]
  node_chat["Chat messaging<br/>[ChatService.java]"]
  node_realtime["Realtime delivery"]
end

subgraph group_research["Research governance"]
  node_researchdata["Research data"]
  node_authority["Research authority"]
  node_management["Research management"]
  node_retention["Data retention"]
end

node_user(("User"))
node_database[("Relational database")]

node_user -.->|"uses"| node_app
node_app -.->|"routes to"| node_auth
node_auth -.->|"delegates to"| node_authsvc
node_app -.->|"routes to"| node_account
node_app -.->|"routes to"| node_relationships
node_app -.->|"routes to"| node_plans
node_app -.->|"routes to"| node_assignments
node_app -.->|"routes to"| node_exercises
node_app -.->|"routes to"| node_history
node_history -.->|"records"| node_results
node_history -.->|"manages"| node_videos
node_app -.->|"routes to"| node_chat
node_chat -.->|"notifies"| node_realtime
node_app -.->|"routes to"| node_researchdata
node_app -.->|"routes to"| node_authority
node_app -.->|"routes to"| node_management
node_app -.->|"routes to"| node_retention
node_authsvc -.->|"persists"| node_database
node_account -.->|"updates"| node_database
node_relationships -.->|"persists"| node_database
node_plans -.->|"persists"| node_database
node_assignments -.->|"persists"| node_database
node_history -.->|"reads and writes"| node_database
node_chat -.->|"persists"| node_database
node_researchdata -.->|"persists"| node_database
node_authority -.->|"persists"| node_database
node_management -.->|"persists"| node_database
node_retention -.->|"updates"| node_database

click node_app "https://github.com/andrew05049487/trianing-system/blob/main/src/main/java/com/example/trainingsystems/TrainingSystemApplication.java"
click node_auth "https://github.com/andrew05049487/trianing-system/blob/main/src/main/java/com/example/trainingsystems/controller/AuthController.java"
click node_authsvc "https://github.com/andrew05049487/trianing-system/blob/main/src/main/java/com/example/trainingsystems/service/AuthService.java"
click node_account "https://github.com/andrew05049487/trianing-system/blob/main/src/main/java/com/example/trainingsystems/controller/AccountController.java"
click node_relationships "https://github.com/andrew05049487/trianing-system/blob/main/src/main/java/com/example/trainingsystems/service/TherapistPatientBindingService.java"
click node_plans "https://github.com/andrew05049487/trianing-system/blob/main/src/main/java/com/example/trainingsystems/service/RehabPlanService.java"
click node_assignments "https://github.com/andrew05049487/trianing-system/blob/main/src/main/java/com/example/trainingsystems/service/UnifiedExerciseAssignmentService.java"
click node_exercises "https://github.com/andrew05049487/trianing-system/blob/main/src/main/java/com/example/trainingsystems/service/ExerciseService.java"
click node_history "https://github.com/andrew05049487/trianing-system/blob/main/src/main/java/com/example/trainingsystems/controller/TrainingHistoryController.java"
click node_results "https://github.com/andrew05049487/trianing-system/blob/main/src/main/java/com/example/trainingsystems/service/TrainingSessionResultService.java"
click node_videos "https://github.com/andrew05049487/trianing-system/blob/main/src/main/java/com/example/trainingsystems/service/TrainingHistoryVideoService.java"
click node_chat "https://github.com/andrew05049487/trianing-system/blob/main/src/main/java/com/example/trainingsystems/service/ChatService.java"
click node_realtime "https://github.com/andrew05049487/trianing-system/blob/main/src/main/java/com/example/trainingsystems/chat/ChatRealtimeNotifier.java"
click node_researchdata "https://github.com/andrew05049487/trianing-system/blob/main/src/main/java/com/example/trainingsystems/service/ResearchDataService.java"
click node_authority "https://github.com/andrew05049487/trianing-system/blob/main/src/main/java/com/example/trainingsystems/service/ResearchAuthorityService.java"
click node_management "https://github.com/andrew05049487/trianing-system/blob/main/src/main/java/com/example/trainingsystems/service/ResearchManagementService.java"
click node_retention "https://github.com/andrew05049487/trianing-system/blob/main/src/main/java/com/example/trainingsystems/service/ResearchRetentionService.java"
click node_database "https://github.com/andrew05049487/trianing-system/blob/main/src/main/resources/application.properties"

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_user toneBlue
class node_auth,node_authsvc,node_account,node_relationships,node_database toneAmber
class node_plans,node_assignments,node_exercises,node_history,node_results,node_videos toneMint
class node_chat,node_realtime toneRose
class node_researchdata,node_authority,node_management,node_retention toneIndigo
```

## Components

### Application entry

- [Spring application](https://github.com/andrew05049487/trianing-system/blob/main/src/main/java/com/example/trainingsystems/TrainingSystemApplication.java): `src/main/java/com/example/trainingsystems/TrainingSystemApplication.java`

### Identity and relationships

- [Authentication](https://github.com/andrew05049487/trianing-system/blob/main/src/main/java/com/example/trainingsystems/controller/AuthController.java): `src/main/java/com/example/trainingsystems/controller/AuthController.java`
- [Auth services](https://github.com/andrew05049487/trianing-system/blob/main/src/main/java/com/example/trainingsystems/service/AuthService.java): `src/main/java/com/example/trainingsystems/service/AuthService.java`
- [Account management](https://github.com/andrew05049487/trianing-system/blob/main/src/main/java/com/example/trainingsystems/controller/AccountController.java): `src/main/java/com/example/trainingsystems/controller/AccountController.java`
- [Patient relationships](https://github.com/andrew05049487/trianing-system/blob/main/src/main/java/com/example/trainingsystems/service/TherapistPatientBindingService.java): `src/main/java/com/example/trainingsystems/service/TherapistPatientBindingService.java`

### Training and rehabilitation

- [Rehabilitation plans](https://github.com/andrew05049487/trianing-system/blob/main/src/main/java/com/example/trainingsystems/service/RehabPlanService.java): `src/main/java/com/example/trainingsystems/service/RehabPlanService.java`
- [Exercise assignments](https://github.com/andrew05049487/trianing-system/blob/main/src/main/java/com/example/trainingsystems/service/UnifiedExerciseAssignmentService.java): `src/main/java/com/example/trainingsystems/service/UnifiedExerciseAssignmentService.java`
- [Exercise catalog](https://github.com/andrew05049487/trianing-system/blob/main/src/main/java/com/example/trainingsystems/service/ExerciseService.java): `src/main/java/com/example/trainingsystems/service/ExerciseService.java`
- [Training history](https://github.com/andrew05049487/trianing-system/blob/main/src/main/java/com/example/trainingsystems/controller/TrainingHistoryController.java): `src/main/java/com/example/trainingsystems/controller/TrainingHistoryController.java`
- [Session results](https://github.com/andrew05049487/trianing-system/blob/main/src/main/java/com/example/trainingsystems/service/TrainingSessionResultService.java): `src/main/java/com/example/trainingsystems/service/TrainingSessionResultService.java`
- [History videos](https://github.com/andrew05049487/trianing-system/blob/main/src/main/java/com/example/trainingsystems/service/TrainingHistoryVideoService.java): `src/main/java/com/example/trainingsystems/service/TrainingHistoryVideoService.java`

### Realtime communication

- [Chat messaging](https://github.com/andrew05049487/trianing-system/blob/main/src/main/java/com/example/trainingsystems/service/ChatService.java): `src/main/java/com/example/trainingsystems/service/ChatService.java`
- [Realtime delivery](https://github.com/andrew05049487/trianing-system/blob/main/src/main/java/com/example/trainingsystems/chat/ChatRealtimeNotifier.java): `src/main/java/com/example/trainingsystems/chat/ChatRealtimeNotifier.java`

### Research governance

- [Research data](https://github.com/andrew05049487/trianing-system/blob/main/src/main/java/com/example/trainingsystems/service/ResearchDataService.java): `src/main/java/com/example/trainingsystems/service/ResearchDataService.java`
- [Research authority](https://github.com/andrew05049487/trianing-system/blob/main/src/main/java/com/example/trainingsystems/service/ResearchAuthorityService.java): `src/main/java/com/example/trainingsystems/service/ResearchAuthorityService.java`
- [Research management](https://github.com/andrew05049487/trianing-system/blob/main/src/main/java/com/example/trainingsystems/service/ResearchManagementService.java): `src/main/java/com/example/trainingsystems/service/ResearchManagementService.java`
- [Data retention](https://github.com/andrew05049487/trianing-system/blob/main/src/main/java/com/example/trainingsystems/service/ResearchRetentionService.java): `src/main/java/com/example/trainingsystems/service/ResearchRetentionService.java`

### Other components

- **User**
- [Relational database](https://github.com/andrew05049487/trianing-system/blob/main/src/main/resources/application.properties): `src/main/resources/application.properties`

## Connections

- User → Spring application: uses
- Spring application → Authentication: routes to
- Authentication → Auth services: delegates to
- Spring application → Account management: routes to
- Spring application → Patient relationships: routes to
- Spring application → Rehabilitation plans: routes to
- Spring application → Exercise assignments: routes to
- Spring application → Exercise catalog: routes to
- Spring application → Training history: routes to
- Training history → Session results: records
- Training history → History videos: manages
- Spring application → Chat messaging: routes to
- Chat messaging → Realtime delivery: notifies
- Spring application → Research data: routes to
- Spring application → Research authority: routes to
- Spring application → Research management: routes to
- Spring application → Data retention: routes to
- Auth services → Relational database: persists
- Account management → Relational database: updates
- Patient relationships → Relational database: persists
- Rehabilitation plans → Relational database: persists
- Exercise assignments → Relational database: persists
- Training history → Relational database: reads and writes
- Chat messaging → Relational database: persists
- Research data → Relational database: persists
- Research authority → Relational database: persists
- Research management → Relational database: persists
- Data retention → Relational database: updates
