# riteshpandey2024-cyber/sukritihealth architecture

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

- Interactive diagram: https://gitdiagram.com/riteshpandey2024-cyber/sukritihealth
- Repository: https://github.com/riteshpandey2024-cyber/sukritihealth

## Overview

SukritiHealth is a multi-panel doctor appointment platform: patients discover doctors, book and pay for appointments, while doctors manage their schedules and admins oversee the platform. Three React applications share an Express API, which dispatches role-specific requests to controllers and persists domain records in MongoDB. The graph retains the documented careers and image-hosting capabilities. Some page and integration internals were not sampled, so those links are based on README documentation rather than inspected implementations.

Main entry points: [`backend/server.js`](https://github.com/riteshpandey2024-cyber/sukritihealth/blob/main/backend/server.js) (Express API), [`frontend/src/App.jsx`](https://github.com/riteshpandey2024-cyber/sukritihealth/blob/main/frontend/src/App.jsx) (Patient website), [`backend/controllers/userController.js`](https://github.com/riteshpandey2024-cyber/sukritihealth/blob/main/backend/controllers/userController.js) (Patient services), [`backend/controllers/adminController.js`](https://github.com/riteshpandey2024-cyber/sukritihealth/blob/main/backend/controllers/adminController.js) (Admin services)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_patient["Patient portal"]
  node_patient_app["Patient website<br/>[App.jsx]"]
  node_patient_context["Patient state<br/>[AppContext.jsx]"]
  node_discovery["Doctor discovery<br/>[Doctors.jsx]"]
  node_booking["Booking and payment<br/>[Appointment.jsx]"]
  node_patient_records["Profile and appointments<br/>[MyAppointments.jsx]"]
  node_careers["Careers<br/>[Careers.jsx]"]
end

subgraph group_staff["Staff dashboards"]
  node_admin_panel["Admin panel<br/>[App.jsx]"]
  node_admin_state["Admin state<br/>[AdminContext.jsx]"]
  node_admin_ops["Doctor and platform oversight<br/>[AddDoctor.jsx]"]
  node_doctor_panel["Doctor dashboard<br/>[App.jsx]"]
  node_doctor_state["Doctor state<br/>[DoctorContext.jsx]"]
  node_doctor_ops["Clinical operations"]
end

subgraph group_api["API and domain"]
  node_server["Express API<br/>[server.js]"]
  node_user_routes["Patient routes<br/>[userRoute.js]"]
  node_doctor_routes["Doctor routes<br/>[doctorRoute.js]"]
  node_admin_routes["Admin routes<br/>[adminRoute.js]"]
  node_career_routes["Career routes<br/>[careerRoute.js]"]
  node_user_controller["Patient services<br/>[userController.js]"]
  node_doctor_controller["Doctor services"]
  node_admin_controller["Admin services<br/>[adminController.js]"]
  node_career_controller["Career services"]
end

subgraph group_infra["Persistence and integrations"]
  node_users[("Patient records<br/>[userModel.js]")]
  node_doctors[("Doctor records<br/>[doctorModel.js]")]
  node_appointments[("Appointment records")]
  node_mongodb[("MongoDB<br/>[mongodb.js]")]
  node_razorpay["Razorpay"]
  node_cloudinary["Cloudinary<br/>[cloudinary.js]"]
end

node_patient_user(("Patient"))
node_admin_user(("Administrator"))
node_doctor_user(("Doctor"))

node_patient_user -->|"uses"| node_patient_app
node_patient_app -->|"routes to"| node_discovery
node_patient_app -->|"routes to"| node_booking
node_patient_app -->|"routes to"| node_patient_records
node_patient_app -->|"routes to"| node_careers
node_patient_context -.->|"requests"| node_server
node_discovery -.->|"uses data"| node_patient_context
node_booking -->|"requests"| node_patient_context
node_patient_records -->|"requests"| node_patient_context
node_admin_user -->|"uses"| node_admin_panel
node_admin_panel -->|"routes to"| node_admin_ops
node_admin_panel -->|"provides state"| node_admin_state
node_admin_state -->|"requests"| node_server
node_admin_ops -->|"uses actions"| node_admin_state
node_doctor_user -->|"uses"| node_doctor_panel
node_doctor_panel -->|"routes to"| node_doctor_ops
node_doctor_panel -->|"provides state"| node_doctor_state
node_doctor_state -->|"requests"| node_server
node_doctor_ops -->|"uses actions"| node_doctor_state
node_server -->|"mounts"| node_user_routes
node_server -->|"mounts"| node_doctor_routes
node_server -->|"mounts"| node_admin_routes
node_server -->|"mounts"| node_career_routes
node_user_routes -->|"dispatches"| node_user_controller
node_doctor_routes -->|"dispatches"| node_doctor_controller
node_admin_routes -->|"dispatches"| node_admin_controller
node_career_routes -.->|"dispatches"| node_career_controller
node_user_controller -->|"reads and writes"| node_users
node_user_controller -->|"reads and writes"| node_doctors
node_user_controller -->|"reads and writes"| node_appointments
node_user_controller -->|"creates and verifies orders"| node_razorpay
node_doctor_controller -->|"reads and writes"| node_doctors
node_doctor_controller -->|"reads and writes"| node_appointments
node_admin_controller -->|"reads and writes"| node_doctors
node_admin_controller -->|"reads and writes"| node_appointments
node_admin_controller -->|"reads"| node_users
node_admin_controller -->|"uploads images"| node_cloudinary
node_career_controller -.->|"serves content"| node_careers
node_server -->|"connects"| node_mongodb
node_users -.->|"persists in"| node_mongodb
node_doctors -.->|"persists in"| node_mongodb
node_appointments -.->|"persists in"| node_mongodb

click node_patient_app "https://github.com/riteshpandey2024-cyber/sukritihealth/blob/main/frontend/src/App.jsx"
click node_patient_context "https://github.com/riteshpandey2024-cyber/sukritihealth/blob/main/frontend/src/context/AppContext.jsx"
click node_discovery "https://github.com/riteshpandey2024-cyber/sukritihealth/blob/main/frontend/src/pages/Doctors.jsx"
click node_booking "https://github.com/riteshpandey2024-cyber/sukritihealth/blob/main/frontend/src/pages/Appointment.jsx"
click node_patient_records "https://github.com/riteshpandey2024-cyber/sukritihealth/blob/main/frontend/src/pages/MyAppointments.jsx"
click node_careers "https://github.com/riteshpandey2024-cyber/sukritihealth/blob/main/frontend/src/pages/Careers.jsx"
click node_admin_panel "https://github.com/riteshpandey2024-cyber/sukritihealth/blob/main/admin/src/App.jsx"
click node_admin_state "https://github.com/riteshpandey2024-cyber/sukritihealth/blob/main/admin/src/context/AdminContext.jsx"
click node_admin_ops "https://github.com/riteshpandey2024-cyber/sukritihealth/blob/main/admin/src/pages/AddDoctor.jsx"
click node_doctor_panel "https://github.com/riteshpandey2024-cyber/sukritihealth/blob/main/doctor/src/App.jsx"
click node_doctor_state "https://github.com/riteshpandey2024-cyber/sukritihealth/blob/main/doctor/src/context/DoctorContext.jsx"
click node_doctor_ops "https://github.com/riteshpandey2024-cyber/sukritihealth/blob/main/doctor/src/pages/DoctorDashboard.jsx"
click node_server "https://github.com/riteshpandey2024-cyber/sukritihealth/blob/main/backend/server.js"
click node_user_routes "https://github.com/riteshpandey2024-cyber/sukritihealth/blob/main/backend/routes/userRoute.js"
click node_doctor_routes "https://github.com/riteshpandey2024-cyber/sukritihealth/blob/main/backend/routes/doctorRoute.js"
click node_admin_routes "https://github.com/riteshpandey2024-cyber/sukritihealth/blob/main/backend/routes/adminRoute.js"
click node_career_routes "https://github.com/riteshpandey2024-cyber/sukritihealth/blob/main/backend/routes/careerRoute.js"
click node_user_controller "https://github.com/riteshpandey2024-cyber/sukritihealth/blob/main/backend/controllers/userController.js"
click node_doctor_controller "https://github.com/riteshpandey2024-cyber/sukritihealth/blob/main/backend/controllers/doctorController.js"
click node_admin_controller "https://github.com/riteshpandey2024-cyber/sukritihealth/blob/main/backend/controllers/adminController.js"
click node_career_controller "https://github.com/riteshpandey2024-cyber/sukritihealth/blob/main/backend/controllers/careerController.js"
click node_users "https://github.com/riteshpandey2024-cyber/sukritihealth/blob/main/backend/models/userModel.js"
click node_doctors "https://github.com/riteshpandey2024-cyber/sukritihealth/blob/main/backend/models/doctorModel.js"
click node_appointments "https://github.com/riteshpandey2024-cyber/sukritihealth/blob/main/backend/models/appointmentModel.js"
click node_mongodb "https://github.com/riteshpandey2024-cyber/sukritihealth/blob/main/backend/config/mongodb.js"
click node_cloudinary "https://github.com/riteshpandey2024-cyber/sukritihealth/blob/main/backend/config/cloudinary.js"

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_patient_app,node_patient_context,node_discovery,node_booking,node_patient_records,node_careers toneBlue
class node_admin_panel,node_admin_state,node_admin_ops,node_doctor_panel,node_doctor_state,node_doctor_ops toneAmber
class node_server,node_user_routes,node_doctor_routes,node_admin_routes,node_career_routes,node_user_controller,node_doctor_controller,node_admin_controller,node_career_controller toneMint
class node_users,node_doctors,node_appointments,node_mongodb,node_razorpay,node_cloudinary toneRose
class node_patient_user,node_admin_user,node_doctor_user toneIndigo
```

## Components

### Patient portal

- [Patient website](https://github.com/riteshpandey2024-cyber/sukritihealth/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Patient state](https://github.com/riteshpandey2024-cyber/sukritihealth/blob/main/frontend/src/context/AppContext.jsx): `frontend/src/context/AppContext.jsx`
- [Doctor discovery](https://github.com/riteshpandey2024-cyber/sukritihealth/blob/main/frontend/src/pages/Doctors.jsx): `frontend/src/pages/Doctors.jsx`
- [Booking and payment](https://github.com/riteshpandey2024-cyber/sukritihealth/blob/main/frontend/src/pages/Appointment.jsx): `frontend/src/pages/Appointment.jsx`
- [Profile and appointments](https://github.com/riteshpandey2024-cyber/sukritihealth/blob/main/frontend/src/pages/MyAppointments.jsx): `frontend/src/pages/MyAppointments.jsx`
- [Careers](https://github.com/riteshpandey2024-cyber/sukritihealth/blob/main/frontend/src/pages/Careers.jsx): `frontend/src/pages/Careers.jsx`

### Staff dashboards

- [Admin panel](https://github.com/riteshpandey2024-cyber/sukritihealth/blob/main/admin/src/App.jsx): `admin/src/App.jsx`
- [Admin state](https://github.com/riteshpandey2024-cyber/sukritihealth/blob/main/admin/src/context/AdminContext.jsx): `admin/src/context/AdminContext.jsx`
- [Doctor and platform oversight](https://github.com/riteshpandey2024-cyber/sukritihealth/blob/main/admin/src/pages/AddDoctor.jsx): `admin/src/pages/AddDoctor.jsx`
- [Doctor dashboard](https://github.com/riteshpandey2024-cyber/sukritihealth/blob/main/doctor/src/App.jsx): `doctor/src/App.jsx`
- [Doctor state](https://github.com/riteshpandey2024-cyber/sukritihealth/blob/main/doctor/src/context/DoctorContext.jsx): `doctor/src/context/DoctorContext.jsx`
- [Clinical operations](https://github.com/riteshpandey2024-cyber/sukritihealth/blob/main/doctor/src/pages/DoctorDashboard.jsx): `doctor/src/pages/DoctorDashboard.jsx`

### API and domain

- [Express API](https://github.com/riteshpandey2024-cyber/sukritihealth/blob/main/backend/server.js): `backend/server.js`
- [Patient routes](https://github.com/riteshpandey2024-cyber/sukritihealth/blob/main/backend/routes/userRoute.js): `backend/routes/userRoute.js`
- [Doctor routes](https://github.com/riteshpandey2024-cyber/sukritihealth/blob/main/backend/routes/doctorRoute.js): `backend/routes/doctorRoute.js`
- [Admin routes](https://github.com/riteshpandey2024-cyber/sukritihealth/blob/main/backend/routes/adminRoute.js): `backend/routes/adminRoute.js`
- [Career routes](https://github.com/riteshpandey2024-cyber/sukritihealth/blob/main/backend/routes/careerRoute.js): `backend/routes/careerRoute.js`
- [Patient services](https://github.com/riteshpandey2024-cyber/sukritihealth/blob/main/backend/controllers/userController.js): `backend/controllers/userController.js`
- [Doctor services](https://github.com/riteshpandey2024-cyber/sukritihealth/blob/main/backend/controllers/doctorController.js): `backend/controllers/doctorController.js`
- [Admin services](https://github.com/riteshpandey2024-cyber/sukritihealth/blob/main/backend/controllers/adminController.js): `backend/controllers/adminController.js`
- [Career services](https://github.com/riteshpandey2024-cyber/sukritihealth/blob/main/backend/controllers/careerController.js): `backend/controllers/careerController.js`

### Persistence and integrations

- [Patient records](https://github.com/riteshpandey2024-cyber/sukritihealth/blob/main/backend/models/userModel.js): `backend/models/userModel.js`
- [Doctor records](https://github.com/riteshpandey2024-cyber/sukritihealth/blob/main/backend/models/doctorModel.js): `backend/models/doctorModel.js`
- [Appointment records](https://github.com/riteshpandey2024-cyber/sukritihealth/blob/main/backend/models/appointmentModel.js): `backend/models/appointmentModel.js`
- [MongoDB](https://github.com/riteshpandey2024-cyber/sukritihealth/blob/main/backend/config/mongodb.js): `backend/config/mongodb.js`
- **Razorpay**
- [Cloudinary](https://github.com/riteshpandey2024-cyber/sukritihealth/blob/main/backend/config/cloudinary.js): `backend/config/cloudinary.js`

### Other components

- **Patient**
- **Administrator**
- **Doctor**

## Connections

- Patient → Patient website: uses (evidence: `README.md`)
- Patient website → Doctor discovery: routes to (evidence: `frontend/src/App.jsx`)
- Patient website → Booking and payment: routes to (evidence: `frontend/src/App.jsx`)
- Patient website → Profile and appointments: routes to (evidence: `frontend/src/App.jsx`)
- Patient website → Careers: routes to (evidence: `frontend/src/App.jsx`)
- Patient state → Express API: requests
- Doctor discovery → Patient state: uses data
- Booking and payment → Patient state: requests (evidence: `README.md`)
- Profile and appointments → Patient state: requests (evidence: `README.md`)
- Administrator → Admin panel: uses (evidence: `README.md`)
- Admin panel → Doctor and platform oversight: routes to (evidence: `admin/src/App.jsx`)
- Admin panel → Admin state: provides state (evidence: `admin/src/App.jsx`)
- Admin state → Express API: requests (evidence: `admin/src/context/AdminContext.jsx`)
- Doctor and platform oversight → Admin state: uses actions (evidence: `admin/src/pages/AddDoctor.jsx`)
- Doctor → Doctor dashboard: uses (evidence: `README.md`)
- Doctor dashboard → Clinical operations: routes to (evidence: `doctor/src/App.jsx`)
- Doctor dashboard → Doctor state: provides state (evidence: `doctor/src/App.jsx`)
- Doctor state → Express API: requests (evidence: `doctor/src/context/DoctorContext.jsx`)
- Clinical operations → Doctor state: uses actions (evidence: `doctor/src/pages/DoctorDashboard.jsx`)
- Express API → Patient routes: mounts (evidence: `backend/server.js`)
- Express API → Doctor routes: mounts (evidence: `backend/server.js`)
- Express API → Admin routes: mounts (evidence: `backend/server.js`)
- Express API → Career routes: mounts (evidence: `backend/server.js`)
- Patient routes → Patient services: dispatches (evidence: `backend/routes/userRoute.js`)
- Doctor routes → Doctor services: dispatches (evidence: `backend/routes/doctorRoute.js`)
- Admin routes → Admin services: dispatches (evidence: `backend/routes/adminRoute.js`)
- Career routes → Career services: dispatches
- Patient services → Patient records: reads and writes (evidence: `backend/controllers/userController.js`)
- Patient services → Doctor records: reads and writes (evidence: `backend/controllers/userController.js`)
- Patient services → Appointment records: reads and writes (evidence: `backend/controllers/userController.js`)
- Patient services → Razorpay: creates and verifies orders (evidence: `backend/controllers/userController.js`)
- Doctor services → Doctor records: reads and writes (evidence: `backend/controllers/doctorController.js`)
- Doctor services → Appointment records: reads and writes (evidence: `backend/controllers/doctorController.js`)
- Admin services → Doctor records: reads and writes (evidence: `backend/controllers/adminController.js`)
- Admin services → Appointment records: reads and writes (evidence: `backend/controllers/adminController.js`)
- Admin services → Patient records: reads (evidence: `backend/controllers/adminController.js`)
- Admin services → Cloudinary: uploads images (evidence: `backend/controllers/adminController.js`)
- Career services → Careers: serves content
- Express API → MongoDB: connects (evidence: `backend/server.js`)
- Patient records → MongoDB: persists in
- Doctor records → MongoDB: persists in
- Appointment records → MongoDB: persists in
