# shri2320/healthbridge architecture

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

- Interactive diagram: https://gitdiagram.com/shri2320/healthbridge
- Repository: https://github.com/shri2320/healthbridge

## Overview

The repository combines a React hospital portal with a Spring Boot API. Users select a patient, doctor, admin, or developer role; the frontend routes to the corresponding screens, while patient and doctor API workflows authenticate users and support appointments, medical documents, and profiles. The backend also has admin and developer management areas visible in the tree. Backend links beyond the excerpted patient and doctor services are shown only where the source index or frontend routing supports them; the README is empty.

Main entry points: [`project/src/App.jsx`](https://github.com/shri2320/healthbridge/blob/main/project/src/App.jsx) (Role router), [`Hospital_Management/hospital-management-system/src/main/java/com/hospital/service/PatientService.java`](https://github.com/shri2320/healthbridge/blob/main/Hospital_Management/hospital-management-system/src/main/java/com/hospital/service/PatientService.java) (Patient workflows), [`Hospital_Management/hospital-management-system/src/main/java/com/hospital/service/DoctorService.java`](https://github.com/shri2320/healthbridge/blob/main/Hospital_Management/hospital-management-system/src/main/java/com/hospital/service/DoctorService.java) (Doctor workflows), [`project/src/services/api.js`](https://github.com/shri2320/healthbridge/blob/main/project/src/services/api.js) (HTTP API client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web portal"]
  node_app["Role router<br/>[App.jsx]"]
  node_landing["Role selection<br/>[LandingPage.jsx]"]
  node_patientui["Patient screens<br/>[PatientAuth.jsx]"]
  node_patientdash["Patient dashboard"]
  node_doctorui["Doctor screens"]
end

subgraph group_api["API access"]
  node_api["HTTP API client<br/>[api.js]"]
  node_patientctrl["Patient endpoints"]
  node_doctorctrl["Doctor endpoints"]
end

subgraph group_care["Patient and doctor care"]
  node_patientservice["Patient workflows"]
  node_doctorservice["Doctor workflows<br/>[DoctorService.java]"]
  node_appointments["Appointment records<br/>[Appointment.java]"]
  node_documents["Medical documents"]
  node_files["File storage"]
  node_db[("Relational database")]
end

subgraph group_admin["Administration"]
  node_adminui["Admin screens<br/>[AdminDashboard.jsx]"]
  node_developerui["Developer registration"]
  node_adminctrl["Admin endpoints"]
  node_adminservice["Hospital administration<br/>[AdminService.java]"]
  node_devctrl["Developer endpoints"]
  node_devservice["Developer workflows"]
end

node_user(("Portal user"))

node_user -->|"opens"| node_app
node_app -->|"renders"| node_landing
node_app -->|"routes to"| node_patientui
node_app -->|"routes to"| node_patientdash
node_app -->|"routes to"| node_doctorui
node_app -->|"routes to"| node_adminui
node_app -->|"routes to"| node_developerui
node_patientctrl -->|"calls"| node_patientservice
node_patientservice -->|"reads and writes"| node_db
node_patientservice -->|"stores uploads"| node_files
node_patientservice -->|"creates and reads"| node_appointments
node_patientservice -->|"creates and reads"| node_documents
node_doctorservice -->|"reads and writes"| node_db
node_doctorservice -->|"updates and lists"| node_appointments
node_doctorservice -->|"loads patient files"| node_documents
node_adminctrl -.->|"delegates"| node_adminservice
node_adminservice -.->|"manages records"| node_db
node_devctrl -.->|"delegates"| node_devservice
node_patientui -.->|"uses"| node_api
node_patientdash -.->|"uses"| node_api
node_doctorui -.->|"uses"| node_api

click node_app "https://github.com/shri2320/healthbridge/blob/main/project/src/App.jsx"
click node_landing "https://github.com/shri2320/healthbridge/blob/main/project/src/pages/LandingPage.jsx"
click node_patientui "https://github.com/shri2320/healthbridge/blob/main/project/src/pages/patient/PatientAuth.jsx"
click node_patientdash "https://github.com/shri2320/healthbridge/blob/main/project/src/pages/patient/PatientDashboard.jsx"
click node_doctorui "https://github.com/shri2320/healthbridge/blob/main/project/src/pages/doctor/DoctorDashboard.jsx"
click node_adminui "https://github.com/shri2320/healthbridge/blob/main/project/src/pages/admin/AdminDashboard.jsx"
click node_developerui "https://github.com/shri2320/healthbridge/blob/main/project/src/pages/developer/DeveloperRegister.jsx"
click node_api "https://github.com/shri2320/healthbridge/blob/main/project/src/services/api.js"
click node_patientctrl "https://github.com/shri2320/healthbridge/blob/main/Hospital_Management/hospital-management-system/src/main/java/com/hospital/controller/PatientController.java"
click node_patientservice "https://github.com/shri2320/healthbridge/blob/main/Hospital_Management/hospital-management-system/src/main/java/com/hospital/service/PatientService.java"
click node_doctorctrl "https://github.com/shri2320/healthbridge/blob/main/Hospital_Management/hospital-management-system/src/main/java/com/hospital/controller/DoctorController.java"
click node_doctorservice "https://github.com/shri2320/healthbridge/blob/main/Hospital_Management/hospital-management-system/src/main/java/com/hospital/service/DoctorService.java"
click node_appointments "https://github.com/shri2320/healthbridge/blob/main/Hospital_Management/hospital-management-system/src/main/java/com/hospital/model/Appointment.java"
click node_documents "https://github.com/shri2320/healthbridge/blob/main/Hospital_Management/hospital-management-system/src/main/java/com/hospital/model/MedicalDocument.java"
click node_files "https://github.com/shri2320/healthbridge/blob/main/Hospital_Management/hospital-management-system/src/main/java/com/hospital/service/FileStorageService.java"
click node_adminctrl "https://github.com/shri2320/healthbridge/blob/main/Hospital_Management/hospital-management-system/src/main/java/com/hospital/controller/AdminController.java"
click node_adminservice "https://github.com/shri2320/healthbridge/blob/main/Hospital_Management/hospital-management-system/src/main/java/com/hospital/service/AdminService.java"
click node_devctrl "https://github.com/shri2320/healthbridge/blob/main/Hospital_Management/hospital-management-system/src/main/java/com/hospital/controller/DeveloperController.java"
click node_devservice "https://github.com/shri2320/healthbridge/blob/main/Hospital_Management/hospital-management-system/src/main/java/com/hospital/service/DeveloperService.java"

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_landing,node_patientui,node_patientdash,node_doctorui,node_user toneBlue
class node_api,node_patientctrl,node_doctorctrl toneAmber
class node_patientservice,node_doctorservice,node_appointments,node_documents,node_files,node_db toneMint
class node_adminui,node_developerui,node_adminctrl,node_adminservice,node_devctrl,node_devservice toneRose
```

## Components

### Web portal

- [Role router](https://github.com/shri2320/healthbridge/blob/main/project/src/App.jsx): `project/src/App.jsx`
- [Role selection](https://github.com/shri2320/healthbridge/blob/main/project/src/pages/LandingPage.jsx): `project/src/pages/LandingPage.jsx`
- [Patient screens](https://github.com/shri2320/healthbridge/blob/main/project/src/pages/patient/PatientAuth.jsx): `project/src/pages/patient/PatientAuth.jsx`
- [Patient dashboard](https://github.com/shri2320/healthbridge/blob/main/project/src/pages/patient/PatientDashboard.jsx): `project/src/pages/patient/PatientDashboard.jsx`
- [Doctor screens](https://github.com/shri2320/healthbridge/blob/main/project/src/pages/doctor/DoctorDashboard.jsx): `project/src/pages/doctor/DoctorDashboard.jsx`

### API access

- [HTTP API client](https://github.com/shri2320/healthbridge/blob/main/project/src/services/api.js): `project/src/services/api.js`
- [Patient endpoints](https://github.com/shri2320/healthbridge/blob/main/Hospital_Management/hospital-management-system/src/main/java/com/hospital/controller/PatientController.java): `Hospital_Management/hospital-management-system/src/main/java/com/hospital/controller/PatientController.java`
- [Doctor endpoints](https://github.com/shri2320/healthbridge/blob/main/Hospital_Management/hospital-management-system/src/main/java/com/hospital/controller/DoctorController.java): `Hospital_Management/hospital-management-system/src/main/java/com/hospital/controller/DoctorController.java`

### Patient and doctor care

- [Patient workflows](https://github.com/shri2320/healthbridge/blob/main/Hospital_Management/hospital-management-system/src/main/java/com/hospital/service/PatientService.java): `Hospital_Management/hospital-management-system/src/main/java/com/hospital/service/PatientService.java`
- [Doctor workflows](https://github.com/shri2320/healthbridge/blob/main/Hospital_Management/hospital-management-system/src/main/java/com/hospital/service/DoctorService.java): `Hospital_Management/hospital-management-system/src/main/java/com/hospital/service/DoctorService.java`
- [Appointment records](https://github.com/shri2320/healthbridge/blob/main/Hospital_Management/hospital-management-system/src/main/java/com/hospital/model/Appointment.java): `Hospital_Management/hospital-management-system/src/main/java/com/hospital/model/Appointment.java`
- [Medical documents](https://github.com/shri2320/healthbridge/blob/main/Hospital_Management/hospital-management-system/src/main/java/com/hospital/model/MedicalDocument.java): `Hospital_Management/hospital-management-system/src/main/java/com/hospital/model/MedicalDocument.java`
- [File storage](https://github.com/shri2320/healthbridge/blob/main/Hospital_Management/hospital-management-system/src/main/java/com/hospital/service/FileStorageService.java): `Hospital_Management/hospital-management-system/src/main/java/com/hospital/service/FileStorageService.java`
- **Relational database**

### Administration

- [Admin screens](https://github.com/shri2320/healthbridge/blob/main/project/src/pages/admin/AdminDashboard.jsx): `project/src/pages/admin/AdminDashboard.jsx`
- [Developer registration](https://github.com/shri2320/healthbridge/blob/main/project/src/pages/developer/DeveloperRegister.jsx): `project/src/pages/developer/DeveloperRegister.jsx`
- [Admin endpoints](https://github.com/shri2320/healthbridge/blob/main/Hospital_Management/hospital-management-system/src/main/java/com/hospital/controller/AdminController.java): `Hospital_Management/hospital-management-system/src/main/java/com/hospital/controller/AdminController.java`
- [Hospital administration](https://github.com/shri2320/healthbridge/blob/main/Hospital_Management/hospital-management-system/src/main/java/com/hospital/service/AdminService.java): `Hospital_Management/hospital-management-system/src/main/java/com/hospital/service/AdminService.java`
- [Developer endpoints](https://github.com/shri2320/healthbridge/blob/main/Hospital_Management/hospital-management-system/src/main/java/com/hospital/controller/DeveloperController.java): `Hospital_Management/hospital-management-system/src/main/java/com/hospital/controller/DeveloperController.java`
- [Developer workflows](https://github.com/shri2320/healthbridge/blob/main/Hospital_Management/hospital-management-system/src/main/java/com/hospital/service/DeveloperService.java): `Hospital_Management/hospital-management-system/src/main/java/com/hospital/service/DeveloperService.java`

### Other components

- **Portal user**

## Connections

- Portal user → Role router: opens (evidence: `project/src/App.jsx`)
- Role router → Role selection: renders (evidence: `project/src/App.jsx`)
- Role router → Patient screens: routes to (evidence: `project/src/App.jsx`)
- Role router → Patient dashboard: routes to (evidence: `project/src/App.jsx`)
- Role router → Doctor screens: routes to (evidence: `project/src/App.jsx`)
- Role router → Admin screens: routes to (evidence: `project/src/App.jsx`)
- Role router → Developer registration: routes to (evidence: `project/src/App.jsx`)
- Patient endpoints → Patient workflows: calls (evidence: `Hospital_Management/hospital-management-system/src/main/java/com/hospital/controller/PatientController.java`)
- Patient workflows → Relational database: reads and writes (evidence: `Hospital_Management/hospital-management-system/src/main/java/com/hospital/service/PatientService.java`)
- Patient workflows → File storage: stores uploads (evidence: `Hospital_Management/hospital-management-system/src/main/java/com/hospital/service/PatientService.java`)
- Patient workflows → Appointment records: creates and reads (evidence: `Hospital_Management/hospital-management-system/src/main/java/com/hospital/service/PatientService.java`)
- Patient workflows → Medical documents: creates and reads (evidence: `Hospital_Management/hospital-management-system/src/main/java/com/hospital/service/PatientService.java`)
- Doctor workflows → Relational database: reads and writes (evidence: `Hospital_Management/hospital-management-system/src/main/java/com/hospital/service/DoctorService.java`)
- Doctor workflows → Appointment records: updates and lists (evidence: `Hospital_Management/hospital-management-system/src/main/java/com/hospital/service/DoctorService.java`)
- Doctor workflows → Medical documents: loads patient files (evidence: `Hospital_Management/hospital-management-system/src/main/java/com/hospital/service/DoctorService.java`)
- Admin endpoints → Hospital administration: delegates
- Hospital administration → Relational database: manages records
- Developer endpoints → Developer workflows: delegates
- Patient screens → HTTP API client: uses
- Patient dashboard → HTTP API client: uses
- Doctor screens → HTTP API client: uses
