# asm-hanif/carebridge architecture

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

- Interactive diagram: https://gitdiagram.com/asm-hanif/carebridge
- Repository: https://github.com/asm-hanif/carebridge

## Overview

CareBridge is an ASP.NET MVC healthcare-management application. Patients and clinicians use role-specific workflows to manage profiles, discover care providers, book and track appointments, and handle clinical follow-up; administration manages hospitals, staff, and platform operations. The tree also identifies medical tests, bed bookings, queues, payments, notifications, and reviews as product capabilities. Sampled controllers show direct database access for several workflows, while sampled services show a separate service layer; wiring for unsampled features is not established by the excerpts.

Main entry points: [`Data/ApplicationDbContext.cs`](https://github.com/asm-hanif/carebridge/blob/master/Data/ApplicationDbContext.cs) (Application data), [`Controllers/AppointmentController.cs`](https://github.com/asm-hanif/carebridge/blob/master/Controllers/AppointmentController.cs) (Appointment booking), [`Controllers/PrescriptionController.cs`](https://github.com/asm-hanif/carebridge/blob/master/Controllers/PrescriptionController.cs) (Prescriptions), [`Controllers/ReviewController.cs`](https://github.com/asm-hanif/carebridge/blob/master/Controllers/ReviewController.cs) (Doctor reviews)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Access and Administration"]
  node_account["Account and identity"]
  node_hospitaladmin["Hospital administration"]
  node_superadmin["Platform administration"]
  node_reports["Reports"]
end

subgraph group_care["Care Coordination"]
  node_patient["Patient workflows"]
  node_appointments["Appointment booking"]
  node_doctor["Doctor workflows"]
  node_schedule["Doctor schedules"]
  node_assistants["Doctor assistants"]
  node_hospital["Hospital directory"]
  node_beds["Bed booking"]
  node_bedadmin["Bed inventory<br/>[BedController.cs]"]
  node_queue["Queue service<br/>[QueueService.cs]"]
end

subgraph group_clinical["Clinical Services"]
  node_prescriptions["Prescriptions"]
  node_records["Medical records"]
  node_tests["Medical tests"]
  node_medicines["Medicine catalog"]
  node_reviews["Doctor reviews"]
  node_notifications["Notifications"]
  node_payments["Payment service<br/>[PaymentService.cs]"]
  node_email["Email service<br/>[EmailService.cs]"]
end

subgraph group_platform["Application and Data"]
  node_doctorservice["Doctor service<br/>[DoctorService.cs]"]
  node_hospitalservice["Hospital service<br/>[HospitalService.cs]"]
  node_superadminservice["Administration service"]
  node_context[("Application data")]
end

node_user(("CareBridge user"))
node_sql[("SQL Server")]

node_user -->|"signs in"| node_account
node_user -->|"manages care"| node_patient
node_user -->|"books visits"| node_appointments
node_user -->|"manages practice"| node_doctor
node_user -->|"handles prescriptions"| node_prescriptions
node_user -->|"finds hospitals"| node_hospital
node_user -->|"requests bed"| node_beds
node_user -->|"manages tests"| node_tests
node_user -->|"reviews doctor"| node_reviews
node_user -->|"administers hospital"| node_hospitaladmin
node_user -->|"administers platform"| node_superadmin
node_appointments -->|"reads and writes"| node_context
node_prescriptions -->|"reads and writes"| node_context
node_reviews -->|"reads and writes"| node_context
node_doctorservice -->|"reads and writes"| node_context
node_hospitalservice -->|"reads and writes"| node_context
node_superadminservice -->|"counts records"| node_context
node_context -->|"persists data"| node_sql

click node_patient "https://github.com/asm-hanif/carebridge/blob/master/Controllers/PatientController.cs"
click node_appointments "https://github.com/asm-hanif/carebridge/blob/master/Controllers/AppointmentController.cs"
click node_doctor "https://github.com/asm-hanif/carebridge/blob/master/Controllers/DoctorController.cs"
click node_schedule "https://github.com/asm-hanif/carebridge/blob/master/Controllers/DoctorScheduleController.cs"
click node_assistants "https://github.com/asm-hanif/carebridge/blob/master/Controllers/DoctorAssistantController.cs"
click node_hospital "https://github.com/asm-hanif/carebridge/blob/master/Controllers/HospitalController.cs"
click node_beds "https://github.com/asm-hanif/carebridge/blob/master/Controllers/BedBookingController.cs"
click node_bedadmin "https://github.com/asm-hanif/carebridge/blob/master/Controllers/BedController.cs"
click node_prescriptions "https://github.com/asm-hanif/carebridge/blob/master/Controllers/PrescriptionController.cs"
click node_records "https://github.com/asm-hanif/carebridge/blob/master/Controllers/MedicalRecordController.cs"
click node_tests "https://github.com/asm-hanif/carebridge/blob/master/Controllers/MedicalTestController.cs"
click node_medicines "https://github.com/asm-hanif/carebridge/blob/master/Controllers/MedicineController.cs"
click node_reviews "https://github.com/asm-hanif/carebridge/blob/master/Controllers/ReviewController.cs"
click node_notifications "https://github.com/asm-hanif/carebridge/blob/master/Controllers/NotificationController.cs"
click node_account "https://github.com/asm-hanif/carebridge/blob/master/Controllers/AccountController.cs"
click node_hospitaladmin "https://github.com/asm-hanif/carebridge/blob/master/Controllers/HospitalAdminController.cs"
click node_superadmin "https://github.com/asm-hanif/carebridge/blob/master/Controllers/SuperAdminController.cs"
click node_reports "https://github.com/asm-hanif/carebridge/blob/master/Controllers/ReportController.cs"
click node_queue "https://github.com/asm-hanif/carebridge/blob/master/Services/Implementations/QueueService.cs"
click node_payments "https://github.com/asm-hanif/carebridge/blob/master/Services/Implementations/PaymentService.cs"
click node_email "https://github.com/asm-hanif/carebridge/blob/master/Services/Implementations/EmailService.cs"
click node_doctorservice "https://github.com/asm-hanif/carebridge/blob/master/Services/Implementations/DoctorService.cs"
click node_hospitalservice "https://github.com/asm-hanif/carebridge/blob/master/Services/Implementations/HospitalService.cs"
click node_superadminservice "https://github.com/asm-hanif/carebridge/blob/master/Services/Implementations/SuperAdminService.cs"
click node_context "https://github.com/asm-hanif/carebridge/blob/master/Data/ApplicationDbContext.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,node_hospitaladmin,node_superadmin,node_reports,node_user toneBlue
class node_patient,node_appointments,node_doctor,node_schedule,node_assistants,node_hospital,node_beds,node_bedadmin,node_queue,node_sql toneAmber
class node_prescriptions,node_records,node_tests,node_medicines,node_reviews,node_notifications,node_payments,node_email toneMint
class node_doctorservice,node_hospitalservice,node_superadminservice,node_context toneRose
```

## Components

### Access and Administration

- [Account and identity](https://github.com/asm-hanif/carebridge/blob/master/Controllers/AccountController.cs): `Controllers/AccountController.cs`
- [Hospital administration](https://github.com/asm-hanif/carebridge/blob/master/Controllers/HospitalAdminController.cs): `Controllers/HospitalAdminController.cs`
- [Platform administration](https://github.com/asm-hanif/carebridge/blob/master/Controllers/SuperAdminController.cs): `Controllers/SuperAdminController.cs`
- [Reports](https://github.com/asm-hanif/carebridge/blob/master/Controllers/ReportController.cs): `Controllers/ReportController.cs`

### Care Coordination

- [Patient workflows](https://github.com/asm-hanif/carebridge/blob/master/Controllers/PatientController.cs): `Controllers/PatientController.cs`
- [Appointment booking](https://github.com/asm-hanif/carebridge/blob/master/Controllers/AppointmentController.cs): `Controllers/AppointmentController.cs`
- [Doctor workflows](https://github.com/asm-hanif/carebridge/blob/master/Controllers/DoctorController.cs): `Controllers/DoctorController.cs`
- [Doctor schedules](https://github.com/asm-hanif/carebridge/blob/master/Controllers/DoctorScheduleController.cs): `Controllers/DoctorScheduleController.cs`
- [Doctor assistants](https://github.com/asm-hanif/carebridge/blob/master/Controllers/DoctorAssistantController.cs): `Controllers/DoctorAssistantController.cs`
- [Hospital directory](https://github.com/asm-hanif/carebridge/blob/master/Controllers/HospitalController.cs): `Controllers/HospitalController.cs`
- [Bed booking](https://github.com/asm-hanif/carebridge/blob/master/Controllers/BedBookingController.cs): `Controllers/BedBookingController.cs`
- [Bed inventory](https://github.com/asm-hanif/carebridge/blob/master/Controllers/BedController.cs): `Controllers/BedController.cs`
- [Queue service](https://github.com/asm-hanif/carebridge/blob/master/Services/Implementations/QueueService.cs): `Services/Implementations/QueueService.cs`

### Clinical Services

- [Prescriptions](https://github.com/asm-hanif/carebridge/blob/master/Controllers/PrescriptionController.cs): `Controllers/PrescriptionController.cs`
- [Medical records](https://github.com/asm-hanif/carebridge/blob/master/Controllers/MedicalRecordController.cs): `Controllers/MedicalRecordController.cs`
- [Medical tests](https://github.com/asm-hanif/carebridge/blob/master/Controllers/MedicalTestController.cs): `Controllers/MedicalTestController.cs`
- [Medicine catalog](https://github.com/asm-hanif/carebridge/blob/master/Controllers/MedicineController.cs): `Controllers/MedicineController.cs`
- [Doctor reviews](https://github.com/asm-hanif/carebridge/blob/master/Controllers/ReviewController.cs): `Controllers/ReviewController.cs`
- [Notifications](https://github.com/asm-hanif/carebridge/blob/master/Controllers/NotificationController.cs): `Controllers/NotificationController.cs`
- [Payment service](https://github.com/asm-hanif/carebridge/blob/master/Services/Implementations/PaymentService.cs): `Services/Implementations/PaymentService.cs`
- [Email service](https://github.com/asm-hanif/carebridge/blob/master/Services/Implementations/EmailService.cs): `Services/Implementations/EmailService.cs`

### Application and Data

- [Doctor service](https://github.com/asm-hanif/carebridge/blob/master/Services/Implementations/DoctorService.cs): `Services/Implementations/DoctorService.cs`
- [Hospital service](https://github.com/asm-hanif/carebridge/blob/master/Services/Implementations/HospitalService.cs): `Services/Implementations/HospitalService.cs`
- [Administration service](https://github.com/asm-hanif/carebridge/blob/master/Services/Implementations/SuperAdminService.cs): `Services/Implementations/SuperAdminService.cs`
- [Application data](https://github.com/asm-hanif/carebridge/blob/master/Data/ApplicationDbContext.cs): `Data/ApplicationDbContext.cs`

### Other components

- **CareBridge user**
- **SQL Server**

## Connections

- CareBridge user → Account and identity: signs in
- CareBridge user → Patient workflows: manages care
- CareBridge user → Appointment booking: books visits
- CareBridge user → Doctor workflows: manages practice
- CareBridge user → Prescriptions: handles prescriptions
- CareBridge user → Hospital directory: finds hospitals
- CareBridge user → Bed booking: requests bed
- CareBridge user → Medical tests: manages tests
- CareBridge user → Doctor reviews: reviews doctor
- CareBridge user → Hospital administration: administers hospital
- CareBridge user → Platform administration: administers platform
- Appointment booking → Application data: reads and writes
- Prescriptions → Application data: reads and writes
- Doctor reviews → Application data: reads and writes
- Doctor service → Application data: reads and writes
- Hospital service → Application data: reads and writes
- Administration service → Application data: counts records
- Application data → SQL Server: persists data
