# marcisebestyen/exammanager architecture

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

- Interactive diagram: https://gitdiagram.com/marcisebestyen/exammanager
- Repository: https://github.com/marcisebestyen/exammanager

## Overview

ExamManager is a React/TypeScript SPA backed by an ASP.NET Core REST API for examination administration. Users navigate the client, which calls API endpoints for exam and related-entity management; exam services validate and persist domain data, while import/export and backup provide portability and reporting workflows. The README documents RBAC, localized Excel integration, PDF reports, and Google Drive backups. Some capabilities are represented by their source directories because their implementations were not sampled; those uncertain connections are omitted or marked unverified.

Main entry points: [`ExamManager/ExamManager/Program.cs`](https://github.com/marcisebestyen/exammanager/blob/main/ExamManager/ExamManager/Program.cs) (API host and auth), [`ExamManager/ExamManager/Services/ExamService.cs`](https://github.com/marcisebestyen/exammanager/blob/main/ExamManager/ExamManager/Services/ExamService.cs) (Exam operations), [`ExamManager/ExamManager/Services/ImportService.cs`](https://github.com/marcisebestyen/exammanager/blob/main/ExamManager/ExamManager/Services/ImportService.cs) (Excel import/templates), [`exam-manager-frontend/src/api/api.ts`](https://github.com/marcisebestyen/exammanager/blob/main/exam-manager-frontend/src/api/api.ts) (API client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Web client"]
  node_router["SPA routes<br/>[Router.tsx]"]
  node_exam_page["Exam workspace<br/>[Exam.page.tsx]"]
  node_api_client["API client<br/>[api.ts]"]
  node_auth_hook["Authentication state<br/>[useAuth.tsx]"]
end

subgraph group_api["API and identity"]
  node_api_host["API host and auth<br/>[Program.cs]"]
  node_exam_endpoint["Exam endpoints<br/>[ExamController.cs]"]
  node_operator_endpoint["Operator endpoints"]
end

subgraph group_domain["Exam workflows"]
  node_exam_service["Exam operations<br/>[ExamService.cs]"]
  node_examiner_service["Examiner management<br/>[ExaminerService.cs]"]
  node_entity_services["Reference data"]
  node_operator_service["Operator accounts<br/>[OperatorService.cs]"]
  node_import_service["Excel import/templates<br/>[ImportService.cs]"]
  node_export_service["PDF reports<br/>[ExportService.cs]"]
  node_backup_service["Database backups<br/>[BackupService.cs]"]
  node_file_history["File history"]
end

subgraph group_persistence["Persistence and portability"]
  node_repository["Unit of work and repositories<br/>[UnitOfWork.cs]"]
  node_exam_model["Exam records<br/>[Exam.cs]"]
  node_db[("Exam database<br/>[ExamDbContext.cs]")]
end

node_user(("Institution staff"))
node_google_drive[("Google Drive")]
node_excel["Excel files"]
node_pdf["PDF report"]

node_user -->|"uses"| node_router
node_router -->|"routes to"| node_exam_page
node_exam_page -->|"requests data"| node_api_client
node_api_client -->|"calls REST API"| node_exam_endpoint
node_api_client -->|"calls REST API"| node_api_host
node_auth_hook -.->|"authenticates"| node_api_host
node_api_host -->|"maps controllers"| node_exam_endpoint
node_api_host -->|"maps controllers"| node_operator_endpoint
node_exam_endpoint -->|"invokes"| node_exam_service
node_operator_endpoint -->|"invokes"| node_operator_service
node_api_host -->|"registers"| node_exam_service
node_api_host -->|"registers"| node_import_service
node_api_host -->|"registers"| node_export_service
node_api_host -->|"registers"| node_backup_service
node_exam_service -->|"reads and writes"| node_repository
node_exam_service -->|"records reports"| node_file_history
node_exam_service -->|"creates and updates"| node_exam_model
node_repository -->|"queries"| node_db
node_import_service -->|"imports records"| node_repository
node_import_service -->|"records import files"| node_file_history
node_excel -.->|"provides workbook"| node_import_service
node_export_service -.->|"generates report"| node_pdf
node_backup_service -.->|"backs up"| node_google_drive
node_api_host -->|"registers"| node_entity_services
node_api_host -->|"registers"| node_examiner_service

click node_router "https://github.com/marcisebestyen/exammanager/blob/main/exam-manager-frontend/src/Router.tsx"
click node_exam_page "https://github.com/marcisebestyen/exammanager/blob/main/exam-manager-frontend/src/pages/Exam.page.tsx"
click node_api_client "https://github.com/marcisebestyen/exammanager/blob/main/exam-manager-frontend/src/api/api.ts"
click node_auth_hook "https://github.com/marcisebestyen/exammanager/blob/main/exam-manager-frontend/src/hooks/useAuth.tsx"
click node_api_host "https://github.com/marcisebestyen/exammanager/blob/main/ExamManager/ExamManager/Program.cs"
click node_exam_endpoint "https://github.com/marcisebestyen/exammanager/blob/main/ExamManager/ExamManager/Controllers/ExamController.cs"
click node_operator_endpoint "https://github.com/marcisebestyen/exammanager/blob/main/ExamManager/ExamManager/Controllers/OperatorController.cs"
click node_exam_service "https://github.com/marcisebestyen/exammanager/blob/main/ExamManager/ExamManager/Services/ExamService.cs"
click node_examiner_service "https://github.com/marcisebestyen/exammanager/blob/main/ExamManager/ExamManager/Services/ExaminerService.cs"
click node_entity_services "https://github.com/marcisebestyen/exammanager/tree/main/ExamManager/ExamManager/Services"
click node_operator_service "https://github.com/marcisebestyen/exammanager/blob/main/ExamManager/ExamManager/Services/OperatorService.cs"
click node_import_service "https://github.com/marcisebestyen/exammanager/blob/main/ExamManager/ExamManager/Services/ImportService.cs"
click node_export_service "https://github.com/marcisebestyen/exammanager/blob/main/ExamManager/ExamManager/Services/ExportService.cs"
click node_backup_service "https://github.com/marcisebestyen/exammanager/blob/main/ExamManager/ExamManager/Services/BackupService.cs"
click node_file_history "https://github.com/marcisebestyen/exammanager/blob/main/ExamManager/ExamManager/Services/FileHistoryService.cs"
click node_repository "https://github.com/marcisebestyen/exammanager/blob/main/ExamManager/ExamManager/Repositories/UnitOfWork.cs"
click node_exam_model "https://github.com/marcisebestyen/exammanager/blob/main/ExamManager/ExamManager/Models/Exam.cs"
click node_db "https://github.com/marcisebestyen/exammanager/blob/main/ExamManager/ExamManager/Data/ExamDbContext.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_router,node_exam_page,node_api_client,node_auth_hook toneBlue
class node_api_host,node_exam_endpoint,node_operator_endpoint,node_google_drive toneAmber
class node_exam_service,node_examiner_service,node_entity_services,node_operator_service,node_import_service,node_export_service,node_backup_service,node_file_history toneMint
class node_repository,node_exam_model,node_db toneRose
class node_user,node_excel,node_pdf toneIndigo
```

## Components

### Web client

- [SPA routes](https://github.com/marcisebestyen/exammanager/blob/main/exam-manager-frontend/src/Router.tsx): `exam-manager-frontend/src/Router.tsx`
- [Exam workspace](https://github.com/marcisebestyen/exammanager/blob/main/exam-manager-frontend/src/pages/Exam.page.tsx): `exam-manager-frontend/src/pages/Exam.page.tsx`
- [API client](https://github.com/marcisebestyen/exammanager/blob/main/exam-manager-frontend/src/api/api.ts): `exam-manager-frontend/src/api/api.ts`
- [Authentication state](https://github.com/marcisebestyen/exammanager/blob/main/exam-manager-frontend/src/hooks/useAuth.tsx): `exam-manager-frontend/src/hooks/useAuth.tsx`

### API and identity

- [API host and auth](https://github.com/marcisebestyen/exammanager/blob/main/ExamManager/ExamManager/Program.cs): `ExamManager/ExamManager/Program.cs`
- [Exam endpoints](https://github.com/marcisebestyen/exammanager/blob/main/ExamManager/ExamManager/Controllers/ExamController.cs): `ExamManager/ExamManager/Controllers/ExamController.cs`
- [Operator endpoints](https://github.com/marcisebestyen/exammanager/blob/main/ExamManager/ExamManager/Controllers/OperatorController.cs): `ExamManager/ExamManager/Controllers/OperatorController.cs`

### Exam workflows

- [Exam operations](https://github.com/marcisebestyen/exammanager/blob/main/ExamManager/ExamManager/Services/ExamService.cs): `ExamManager/ExamManager/Services/ExamService.cs`
- [Examiner management](https://github.com/marcisebestyen/exammanager/blob/main/ExamManager/ExamManager/Services/ExaminerService.cs): `ExamManager/ExamManager/Services/ExaminerService.cs`
- [Reference data](https://github.com/marcisebestyen/exammanager/tree/main/ExamManager/ExamManager/Services): `ExamManager/ExamManager/Services`
- [Operator accounts](https://github.com/marcisebestyen/exammanager/blob/main/ExamManager/ExamManager/Services/OperatorService.cs): `ExamManager/ExamManager/Services/OperatorService.cs`
- [Excel import/templates](https://github.com/marcisebestyen/exammanager/blob/main/ExamManager/ExamManager/Services/ImportService.cs): `ExamManager/ExamManager/Services/ImportService.cs`
- [PDF reports](https://github.com/marcisebestyen/exammanager/blob/main/ExamManager/ExamManager/Services/ExportService.cs): `ExamManager/ExamManager/Services/ExportService.cs`
- [Database backups](https://github.com/marcisebestyen/exammanager/blob/main/ExamManager/ExamManager/Services/BackupService.cs): `ExamManager/ExamManager/Services/BackupService.cs`
- [File history](https://github.com/marcisebestyen/exammanager/blob/main/ExamManager/ExamManager/Services/FileHistoryService.cs): `ExamManager/ExamManager/Services/FileHistoryService.cs`

### Persistence and portability

- [Unit of work and repositories](https://github.com/marcisebestyen/exammanager/blob/main/ExamManager/ExamManager/Repositories/UnitOfWork.cs): `ExamManager/ExamManager/Repositories/UnitOfWork.cs`
- [Exam records](https://github.com/marcisebestyen/exammanager/blob/main/ExamManager/ExamManager/Models/Exam.cs): `ExamManager/ExamManager/Models/Exam.cs`
- [Exam database](https://github.com/marcisebestyen/exammanager/blob/main/ExamManager/ExamManager/Data/ExamDbContext.cs): `ExamManager/ExamManager/Data/ExamDbContext.cs`

### Other components

- **Institution staff**
- **Google Drive**
- **Excel files**
- **PDF report**

## Connections

- Institution staff → SPA routes: uses (evidence: `exam-manager-frontend/src/Router.tsx`)
- SPA routes → Exam workspace: routes to (evidence: `exam-manager-frontend/src/Router.tsx`)
- Exam workspace → API client: requests data (evidence: `exam-manager-frontend/src/pages/Exam.page.tsx`)
- API client → Exam endpoints: calls REST API
- API client → API host and auth: calls REST API
- Authentication state → API host and auth: authenticates
- API host and auth → Exam endpoints: maps controllers (evidence: `ExamManager/ExamManager/Program.cs`)
- API host and auth → Operator endpoints: maps controllers (evidence: `ExamManager/ExamManager/Program.cs`)
- Exam endpoints → Exam operations: invokes (evidence: `ExamManager/ExamManager/Controllers/ExamController.cs`)
- Operator endpoints → Operator accounts: invokes (evidence: `ExamManager/ExamManager/Controllers/OperatorController.cs`)
- API host and auth → Exam operations: registers (evidence: `ExamManager/ExamManager/Program.cs`)
- API host and auth → Excel import/templates: registers (evidence: `ExamManager/ExamManager/Program.cs`)
- API host and auth → PDF reports: registers (evidence: `ExamManager/ExamManager/Program.cs`)
- API host and auth → Database backups: registers (evidence: `ExamManager/ExamManager/Program.cs`)
- Exam operations → Unit of work and repositories: reads and writes (evidence: `ExamManager/ExamManager/Services/ExamService.cs`)
- Exam operations → File history: records reports (evidence: `ExamManager/ExamManager/Services/ExamService.cs`)
- Exam operations → Exam records: creates and updates (evidence: `ExamManager/ExamManager/Services/ExamService.cs`)
- Unit of work and repositories → Exam database: queries
- Excel import/templates → Unit of work and repositories: imports records (evidence: `ExamManager/ExamManager/Services/ImportService.cs`)
- Excel import/templates → File history: records import files (evidence: `ExamManager/ExamManager/Services/ImportService.cs`)
- Excel files → Excel import/templates: provides workbook
- PDF reports → PDF report: generates report
- Database backups → Google Drive: backs up
- API host and auth → Reference data: registers (evidence: `ExamManager/ExamManager/Program.cs`)
- API host and auth → Examiner management: registers (evidence: `ExamManager/ExamManager/Program.cs`)
