# mina-hany-dev/bubblesheet-api architecture

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

- Interactive diagram: https://gitdiagram.com/mina-hany-dev/bubblesheet-api
- Repository: https://github.com/mina-hany-dev/bubblesheet-api

## Overview

BubbleSheet is an ASP.NET Core backend for an educational assessment platform. Its main workflow is student or staff API requests to create exams and question banks, submit attempts, receive scoring, and review results; supporting branches cover accounts, payments, learning content, and platform operations. The map combines documented capabilities with sampled controller, service, worker, and persistence relationships. Several feature implementations were not excerpted, so their internal call paths are not inferred.

Main entry points: [`bubblesheet.Infrastracture/Repos`](https://github.com/mina-hany-dev/bubblesheet-api/tree/main/bubblesheet.Infrastracture/Repos) (Repositories and unit of work), [`BubleSheet/Services/Implementation/AccountService.cs`](https://github.com/mina-hany-dev/bubblesheet-api/blob/main/BubleSheet/Services/Implementation/AccountService.cs) (Account service), [`BubleSheet/Services/Implementation/ExamService.cs`](https://github.com/mina-hany-dev/bubblesheet-api/blob/main/BubleSheet/Services/Implementation/ExamService.cs) (Exam service), [`BubleSheet/Services/Implementation/QuestionBankService.cs`](https://github.com/mina-hany-dev/bubblesheet-api/blob/main/BubleSheet/Services/Implementation/QuestionBankService.cs) (Question bank service)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["API and Accounts"]
  node_account_api["Account endpoints"]
  node_account_service["Account service<br/>[AccountService.cs]"]
  node_jwt["JWT service"]
  node_code_api["Recharge code endpoints<br/>[CodeController.cs]"]
  node_code_service["Code service<br/>[CodeService.cs]"]
end

subgraph group_assessment["Assessment Workflow"]
  node_exam_api["Exam endpoints<br/>[ExamController.cs]"]
  node_exam_service["Exam service<br/>[ExamService.cs]"]
  node_bank_api["Question bank endpoints"]
  node_bank_service["Question bank service"]
  node_review["Attempt review<br/>[ReviewService.cs]"]
  node_assessment_domain["Assessment domain<br/>[Entities]"]
end

subgraph group_learning["Learning and Operations"]
  node_lesson_api["Lesson endpoints"]
  node_lesson_service["Lesson service<br/>[LessonService.cs]"]
  node_pdf_service["PDF management<br/>[PdfService.cs]"]
  node_storage["Bunny file storage"]
  node_platform_api["Platform endpoints"]
  node_platform_services["Platform services"]
end

subgraph group_runtime["Persistence and Background"]
  node_notification_service["Notification service"]
  node_notification_queue["Notification queue"]
  node_notification_worker["Notification worker"]
  node_cleanup_worker["Notification cleanup<br/>[CleanupWorker.cs]"]
  node_repos["Repositories and unit of work<br/>[Repos]"]
  node_dbcontext["EF Core context"]
  node_database[("SQL Server")]
  node_email["Brevo email"]
end

node_client(("Students and staff"))

node_client -->|"requests access"| node_account_api
node_client -->|"manages exams"| node_exam_api
node_client -->|"manages banks"| node_bank_api
node_client -->|"accesses lessons"| node_lesson_api
node_account_api -->|"delegates to"| node_account_service
node_account_service -.->|"uses tokens"| node_jwt
node_code_api -->|"delegates to"| node_code_service
node_exam_api -->|"delegates to"| node_exam_service
node_bank_api -->|"delegates to"| node_bank_service
node_exam_service -->|"uses assessment contracts"| node_assessment_domain
node_bank_service -->|"uses assessment contracts"| node_assessment_domain
node_review -->|"reads attempts and answers"| node_assessment_domain
node_lesson_api -->|"delegates to"| node_lesson_service
node_lesson_service -.->|"stores lesson files"| node_storage
node_pdf_service -.->|"stores PDF files"| node_storage
node_platform_api -.->|"routes requests"| node_platform_services
node_notification_service -.->|"queues notices"| node_notification_queue
node_notification_worker -->|"dequeues notices"| node_notification_queue
node_notification_worker -->|"creates student notices"| node_repos
node_cleanup_worker -->|"cleans old notices"| node_repos
node_account_service -.->|"uses persistence"| node_repos
node_exam_service -->|"uses persistence"| node_repos
node_bank_service -->|"uses persistence"| node_repos
node_repos -.->|"accesses data"| node_dbcontext
node_dbcontext -->|"persists entities"| node_database
node_platform_services -.->|"sends transactional email"| node_email

click node_account_api "https://github.com/mina-hany-dev/bubblesheet-api/blob/main/BubleSheet/Controllers/AccountController.cs"
click node_account_service "https://github.com/mina-hany-dev/bubblesheet-api/blob/main/BubleSheet/Services/Implementation/AccountService.cs"
click node_jwt "https://github.com/mina-hany-dev/bubblesheet-api/blob/main/BubleSheet/Services/Implementation/JwtServiceImplementation.cs"
click node_code_api "https://github.com/mina-hany-dev/bubblesheet-api/blob/main/BubleSheet/Controllers/CodeController.cs"
click node_code_service "https://github.com/mina-hany-dev/bubblesheet-api/blob/main/BubleSheet/Services/Implementation/CodeService.cs"
click node_exam_api "https://github.com/mina-hany-dev/bubblesheet-api/blob/main/BubleSheet/Controllers/ExamController.cs"
click node_exam_service "https://github.com/mina-hany-dev/bubblesheet-api/blob/main/BubleSheet/Services/Implementation/ExamService.cs"
click node_bank_api "https://github.com/mina-hany-dev/bubblesheet-api/blob/main/BubleSheet/Controllers/QuestionBankController.cs"
click node_bank_service "https://github.com/mina-hany-dev/bubblesheet-api/blob/main/BubleSheet/Services/Implementation/QuestionBankService.cs"
click node_review "https://github.com/mina-hany-dev/bubblesheet-api/blob/main/BubleSheet/Services/Implementation/ReviewService.cs"
click node_assessment_domain "https://github.com/mina-hany-dev/bubblesheet-api/tree/main/Domain.bublesheet/Entities"
click node_lesson_api "https://github.com/mina-hany-dev/bubblesheet-api/blob/main/BubleSheet/Controllers/LessonsController.cs"
click node_lesson_service "https://github.com/mina-hany-dev/bubblesheet-api/blob/main/BubleSheet/Services/Implementation/LessonService.cs"
click node_pdf_service "https://github.com/mina-hany-dev/bubblesheet-api/blob/main/BubleSheet/Services/Implementation/PdfService.cs"
click node_storage "https://github.com/mina-hany-dev/bubblesheet-api/blob/main/BubleSheet/Services/Implementation/BunnyStorageService%20.cs"
click node_platform_api "https://github.com/mina-hany-dev/bubblesheet-api/tree/main/BubleSheet/Controllers"
click node_platform_services "https://github.com/mina-hany-dev/bubblesheet-api/tree/main/BubleSheet/Services/Implementation"
click node_notification_service "https://github.com/mina-hany-dev/bubblesheet-api/blob/main/BubleSheet/Services/Implementation/NotificationService.cs"
click node_notification_queue "https://github.com/mina-hany-dev/bubblesheet-api/blob/main/BubleSheet/Services/Implementation/NotificationQueue.cs"
click node_notification_worker "https://github.com/mina-hany-dev/bubblesheet-api/blob/main/BubleSheet/Worker/NotificationWorker.cs"
click node_cleanup_worker "https://github.com/mina-hany-dev/bubblesheet-api/blob/main/BubleSheet/Worker/CleanupWorker.cs"
click node_repos "https://github.com/mina-hany-dev/bubblesheet-api/tree/main/bubblesheet.Infrastracture/Repos"
click node_dbcontext "https://github.com/mina-hany-dev/bubblesheet-api/blob/main/bubblesheet.Infrastracture/Data/bubblesheetDbContext.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_account_api,node_account_service,node_jwt,node_code_api,node_code_service toneBlue
class node_exam_api,node_exam_service,node_bank_api,node_bank_service,node_review,node_assessment_domain toneAmber
class node_lesson_api,node_lesson_service,node_pdf_service,node_storage,node_platform_api,node_platform_services toneMint
class node_notification_service,node_notification_queue,node_notification_worker,node_cleanup_worker,node_repos,node_dbcontext,node_database,node_email toneRose
class node_client toneIndigo
```

## Components

### API and Accounts

- [Account endpoints](https://github.com/mina-hany-dev/bubblesheet-api/blob/main/BubleSheet/Controllers/AccountController.cs): `BubleSheet/Controllers/AccountController.cs`
- [Account service](https://github.com/mina-hany-dev/bubblesheet-api/blob/main/BubleSheet/Services/Implementation/AccountService.cs): `BubleSheet/Services/Implementation/AccountService.cs`
- [JWT service](https://github.com/mina-hany-dev/bubblesheet-api/blob/main/BubleSheet/Services/Implementation/JwtServiceImplementation.cs): `BubleSheet/Services/Implementation/JwtServiceImplementation.cs`
- [Recharge code endpoints](https://github.com/mina-hany-dev/bubblesheet-api/blob/main/BubleSheet/Controllers/CodeController.cs): `BubleSheet/Controllers/CodeController.cs`
- [Code service](https://github.com/mina-hany-dev/bubblesheet-api/blob/main/BubleSheet/Services/Implementation/CodeService.cs): `BubleSheet/Services/Implementation/CodeService.cs`

### Assessment Workflow

- [Exam endpoints](https://github.com/mina-hany-dev/bubblesheet-api/blob/main/BubleSheet/Controllers/ExamController.cs): `BubleSheet/Controllers/ExamController.cs`
- [Exam service](https://github.com/mina-hany-dev/bubblesheet-api/blob/main/BubleSheet/Services/Implementation/ExamService.cs): `BubleSheet/Services/Implementation/ExamService.cs`
- [Question bank endpoints](https://github.com/mina-hany-dev/bubblesheet-api/blob/main/BubleSheet/Controllers/QuestionBankController.cs): `BubleSheet/Controllers/QuestionBankController.cs`
- [Question bank service](https://github.com/mina-hany-dev/bubblesheet-api/blob/main/BubleSheet/Services/Implementation/QuestionBankService.cs): `BubleSheet/Services/Implementation/QuestionBankService.cs`
- [Attempt review](https://github.com/mina-hany-dev/bubblesheet-api/blob/main/BubleSheet/Services/Implementation/ReviewService.cs): `BubleSheet/Services/Implementation/ReviewService.cs`
- [Assessment domain](https://github.com/mina-hany-dev/bubblesheet-api/tree/main/Domain.bublesheet/Entities): `Domain.bublesheet/Entities`

### Learning and Operations

- [Lesson endpoints](https://github.com/mina-hany-dev/bubblesheet-api/blob/main/BubleSheet/Controllers/LessonsController.cs): `BubleSheet/Controllers/LessonsController.cs`
- [Lesson service](https://github.com/mina-hany-dev/bubblesheet-api/blob/main/BubleSheet/Services/Implementation/LessonService.cs): `BubleSheet/Services/Implementation/LessonService.cs`
- [PDF management](https://github.com/mina-hany-dev/bubblesheet-api/blob/main/BubleSheet/Services/Implementation/PdfService.cs): `BubleSheet/Services/Implementation/PdfService.cs`
- [Bunny file storage](https://github.com/mina-hany-dev/bubblesheet-api/blob/main/BubleSheet/Services/Implementation/BunnyStorageService%20.cs): `BubleSheet/Services/Implementation/BunnyStorageService .cs`
- [Platform endpoints](https://github.com/mina-hany-dev/bubblesheet-api/tree/main/BubleSheet/Controllers): `BubleSheet/Controllers`
- [Platform services](https://github.com/mina-hany-dev/bubblesheet-api/tree/main/BubleSheet/Services/Implementation): `BubleSheet/Services/Implementation`

### Persistence and Background

- [Notification service](https://github.com/mina-hany-dev/bubblesheet-api/blob/main/BubleSheet/Services/Implementation/NotificationService.cs): `BubleSheet/Services/Implementation/NotificationService.cs`
- [Notification queue](https://github.com/mina-hany-dev/bubblesheet-api/blob/main/BubleSheet/Services/Implementation/NotificationQueue.cs): `BubleSheet/Services/Implementation/NotificationQueue.cs`
- [Notification worker](https://github.com/mina-hany-dev/bubblesheet-api/blob/main/BubleSheet/Worker/NotificationWorker.cs): `BubleSheet/Worker/NotificationWorker.cs`
- [Notification cleanup](https://github.com/mina-hany-dev/bubblesheet-api/blob/main/BubleSheet/Worker/CleanupWorker.cs): `BubleSheet/Worker/CleanupWorker.cs`
- [Repositories and unit of work](https://github.com/mina-hany-dev/bubblesheet-api/tree/main/bubblesheet.Infrastracture/Repos): `bubblesheet.Infrastracture/Repos`
- [EF Core context](https://github.com/mina-hany-dev/bubblesheet-api/blob/main/bubblesheet.Infrastracture/Data/bubblesheetDbContext.cs): `bubblesheet.Infrastracture/Data/bubblesheetDbContext.cs`
- **SQL Server**
- **Brevo email**

### Other components

- **Students and staff**

## Connections

- Students and staff → Account endpoints: requests access
- Students and staff → Exam endpoints: manages exams
- Students and staff → Question bank endpoints: manages banks
- Students and staff → Lesson endpoints: accesses lessons
- Account endpoints → Account service: delegates to (evidence: `BubleSheet/Controllers/AccountController.cs`)
- Account service → JWT service: uses tokens
- Recharge code endpoints → Code service: delegates to (evidence: `BubleSheet/Controllers/CodeController.cs`)
- Exam endpoints → Exam service: delegates to (evidence: `BubleSheet/Controllers/ExamController.cs`)
- Question bank endpoints → Question bank service: delegates to (evidence: `BubleSheet/Controllers/QuestionBankController.cs`)
- Exam service → Assessment domain: uses assessment contracts (evidence: `BubleSheet/Services/Implementation/ExamService.cs`)
- Question bank service → Assessment domain: uses assessment contracts (evidence: `BubleSheet/Services/Implementation/QuestionBankService.cs`)
- Attempt review → Assessment domain: reads attempts and answers (evidence: `BubleSheet/Services/Implementation/ReviewService.cs`)
- Lesson endpoints → Lesson service: delegates to (evidence: `BubleSheet/Controllers/LessonsController.cs`)
- Lesson service → Bunny file storage: stores lesson files
- PDF management → Bunny file storage: stores PDF files
- Platform endpoints → Platform services: routes requests
- Notification service → Notification queue: queues notices
- Notification worker → Notification queue: dequeues notices (evidence: `BubleSheet/Worker/NotificationWorker.cs`)
- Notification worker → Repositories and unit of work: creates student notices (evidence: `BubleSheet/Worker/NotificationWorker.cs`)
- Notification cleanup → Repositories and unit of work: cleans old notices (evidence: `BubleSheet/Worker/CleanupWorker.cs`)
- Account service → Repositories and unit of work: uses persistence
- Exam service → Repositories and unit of work: uses persistence (evidence: `BubleSheet/Services/Implementation/ExamService.cs`)
- Question bank service → Repositories and unit of work: uses persistence (evidence: `BubleSheet/Services/Implementation/QuestionBankService.cs`)
- Repositories and unit of work → EF Core context: accesses data
- EF Core context → SQL Server: persists entities
- Platform services → Brevo email: sends transactional email
