# aahabib187/frontend-backend-demo architecture

> Architecture diagram of the GitHub repository aahabib187/frontend-backend-demo, 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/aahabib187/frontend-backend-demo
- Repository: https://github.com/aahabib187/frontend-backend-demo

## Overview

DOC APPOINTER is a web app for patient appointment booking and doctor care workflows, with administrative management of medicines, lab tests, and beds. Patients browse doctors, check availability, book appointments, and view appointment or prescription history; doctors manage profiles and schedules, handle appointments, and create prescriptions. The backend is an Express API backed by Oracle. The tree and excerpts show route wiring and several database operations; frontend-to-API calls are not evidenced in the sampled files, so those links are omitted.

Main entry points: [`frontend/src/App.jsx`](https://github.com/aahabib187/frontend-backend-demo/blob/main/frontend/src/App.jsx) (Page routing), [`backend/db/connection.js`](https://github.com/aahabib187/frontend-backend-demo/blob/main/backend/db/connection.js) (Oracle connection), [`backend/server.js`](https://github.com/aahabib187/frontend-backend-demo/blob/main/backend/server.js) (Express server), [`backend/routes/auth.js`](https://github.com/aahabib187/frontend-backend-demo/blob/main/backend/routes/auth.js) (Authentication routes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Web application"]
  node_patient["Patient portal"]
  node_booking["Doctor booking"]
  node_patientbooking["Book appointment"]
  node_doctorportal["Doctor workspace"]
  node_prescriptionui["Prescription views"]
  node_adminui["Admin management<br/>[BedManagement.jsx]"]
  node_app["Page routing<br/>[App.jsx]"]
end

subgraph group_api["API and workflows"]
  node_server["Express server<br/>[server.js]"]
  node_authroutes["Authentication routes<br/>[auth.js]"]
  node_doctorroutes["Doctor routes<br/>[doctorRoutes.js]"]
  node_appointmentroutes["Appointment routes"]
  node_adminroutes["Admin routes<br/>[adminRoutes.js]"]
  node_profiles["User profiles"]
  node_availability["Doctor availability"]
  node_appointments["Appointment handling"]
  node_prescriptions["Prescription handling"]
end

subgraph group_admin["Administration"]
  node_medicines["Medicine catalog"]
  node_labtests["Lab test catalog"]
  node_beds["Bed management<br/>[bedController.js]"]
end

subgraph group_data["Persistence"]
  node_dbconn["Oracle connection<br/>[connection.js]"]
  node_oracle[("Oracle database")]
end

node_user(("Patient or staff"))

node_user -->|"uses"| node_app
node_app -->|"routes to"| node_patient
node_app -->|"routes to"| node_booking
node_app -->|"routes to"| node_patientbooking
node_app -->|"routes to"| node_doctorportal
node_app -->|"routes to"| node_prescriptionui
node_app -->|"routes to"| node_adminui
node_server -->|"mounts"| node_authroutes
node_server -->|"mounts"| node_doctorroutes
node_server -->|"mounts"| node_appointmentroutes
node_server -->|"mounts"| node_adminroutes
node_authroutes -->|"dispatches"| node_appointments
node_authroutes -->|"dispatches"| node_profiles
node_authroutes -->|"dispatches"| node_availability
node_appointmentroutes -->|"dispatches"| node_appointments
node_doctorroutes -->|"dispatches"| node_profiles
node_doctorroutes -->|"dispatches"| node_availability
node_doctorroutes -->|"dispatches"| node_prescriptions
node_adminroutes -->|"dispatches"| node_medicines
node_adminroutes -->|"dispatches"| node_labtests
node_adminroutes -->|"dispatches"| node_beds
node_appointments -->|"opens connection"| node_dbconn
node_prescriptions -->|"opens connection"| node_dbconn
node_medicines -->|"opens connection"| node_dbconn
node_labtests -->|"opens connection"| node_dbconn
node_dbconn -->|"connects"| node_oracle

click node_patient "https://github.com/aahabib187/frontend-backend-demo/blob/main/frontend/src/pages/PatientDashboard.jsx"
click node_booking "https://github.com/aahabib187/frontend-backend-demo/blob/main/frontend/src/pages/AppointmentDoctorDetail.jsx"
click node_patientbooking "https://github.com/aahabib187/frontend-backend-demo/blob/main/frontend/src/pages/PatientBookAppointment.jsx"
click node_doctorportal "https://github.com/aahabib187/frontend-backend-demo/blob/main/frontend/src/pages/DoctorDashboard.jsx"
click node_prescriptionui "https://github.com/aahabib187/frontend-backend-demo/blob/main/frontend/src/pages/CreatePrescription.jsx"
click node_adminui "https://github.com/aahabib187/frontend-backend-demo/blob/main/frontend/src/pages/BedManagement.jsx"
click node_app "https://github.com/aahabib187/frontend-backend-demo/blob/main/frontend/src/App.jsx"
click node_server "https://github.com/aahabib187/frontend-backend-demo/blob/main/backend/server.js"
click node_authroutes "https://github.com/aahabib187/frontend-backend-demo/blob/main/backend/routes/auth.js"
click node_doctorroutes "https://github.com/aahabib187/frontend-backend-demo/blob/main/backend/routes/doctorRoutes.js"
click node_appointmentroutes "https://github.com/aahabib187/frontend-backend-demo/blob/main/backend/routes/appointmentRoutes.js"
click node_adminroutes "https://github.com/aahabib187/frontend-backend-demo/blob/main/backend/routes/adminRoutes.js"
click node_profiles "https://github.com/aahabib187/frontend-backend-demo/blob/main/backend/controllers/doctorProfileUpdate.js"
click node_availability "https://github.com/aahabib187/frontend-backend-demo/blob/main/backend/controllers/doctorSpecialization.js"
click node_appointments "https://github.com/aahabib187/frontend-backend-demo/blob/main/backend/controllers/appointmentController.js"
click node_prescriptions "https://github.com/aahabib187/frontend-backend-demo/blob/main/backend/controllers/prescriptionController.js"
click node_medicines "https://github.com/aahabib187/frontend-backend-demo/blob/main/backend/controllers/medicineController.js"
click node_labtests "https://github.com/aahabib187/frontend-backend-demo/blob/main/backend/controllers/labTestController.js"
click node_beds "https://github.com/aahabib187/frontend-backend-demo/blob/main/backend/controllers/bedController.js"
click node_dbconn "https://github.com/aahabib187/frontend-backend-demo/blob/main/backend/db/connection.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,node_booking,node_patientbooking,node_doctorportal,node_prescriptionui,node_adminui,node_app toneBlue
class node_server,node_authroutes,node_doctorroutes,node_appointmentroutes,node_adminroutes,node_profiles,node_availability,node_appointments,node_prescriptions toneAmber
class node_medicines,node_labtests,node_beds toneMint
class node_dbconn,node_oracle toneRose
class node_user toneIndigo
```

## Components

### Web application

- [Patient portal](https://github.com/aahabib187/frontend-backend-demo/blob/main/frontend/src/pages/PatientDashboard.jsx): `frontend/src/pages/PatientDashboard.jsx`
- [Doctor booking](https://github.com/aahabib187/frontend-backend-demo/blob/main/frontend/src/pages/AppointmentDoctorDetail.jsx): `frontend/src/pages/AppointmentDoctorDetail.jsx`
- [Book appointment](https://github.com/aahabib187/frontend-backend-demo/blob/main/frontend/src/pages/PatientBookAppointment.jsx): `frontend/src/pages/PatientBookAppointment.jsx`
- [Doctor workspace](https://github.com/aahabib187/frontend-backend-demo/blob/main/frontend/src/pages/DoctorDashboard.jsx): `frontend/src/pages/DoctorDashboard.jsx`
- [Prescription views](https://github.com/aahabib187/frontend-backend-demo/blob/main/frontend/src/pages/CreatePrescription.jsx): `frontend/src/pages/CreatePrescription.jsx`
- [Admin management](https://github.com/aahabib187/frontend-backend-demo/blob/main/frontend/src/pages/BedManagement.jsx): `frontend/src/pages/BedManagement.jsx`
- [Page routing](https://github.com/aahabib187/frontend-backend-demo/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`

### API and workflows

- [Express server](https://github.com/aahabib187/frontend-backend-demo/blob/main/backend/server.js): `backend/server.js`
- [Authentication routes](https://github.com/aahabib187/frontend-backend-demo/blob/main/backend/routes/auth.js): `backend/routes/auth.js`
- [Doctor routes](https://github.com/aahabib187/frontend-backend-demo/blob/main/backend/routes/doctorRoutes.js): `backend/routes/doctorRoutes.js`
- [Appointment routes](https://github.com/aahabib187/frontend-backend-demo/blob/main/backend/routes/appointmentRoutes.js): `backend/routes/appointmentRoutes.js`
- [Admin routes](https://github.com/aahabib187/frontend-backend-demo/blob/main/backend/routes/adminRoutes.js): `backend/routes/adminRoutes.js`
- [User profiles](https://github.com/aahabib187/frontend-backend-demo/blob/main/backend/controllers/doctorProfileUpdate.js): `backend/controllers/doctorProfileUpdate.js`
- [Doctor availability](https://github.com/aahabib187/frontend-backend-demo/blob/main/backend/controllers/doctorSpecialization.js): `backend/controllers/doctorSpecialization.js`
- [Appointment handling](https://github.com/aahabib187/frontend-backend-demo/blob/main/backend/controllers/appointmentController.js): `backend/controllers/appointmentController.js`
- [Prescription handling](https://github.com/aahabib187/frontend-backend-demo/blob/main/backend/controllers/prescriptionController.js): `backend/controllers/prescriptionController.js`

### Administration

- [Medicine catalog](https://github.com/aahabib187/frontend-backend-demo/blob/main/backend/controllers/medicineController.js): `backend/controllers/medicineController.js`
- [Lab test catalog](https://github.com/aahabib187/frontend-backend-demo/blob/main/backend/controllers/labTestController.js): `backend/controllers/labTestController.js`
- [Bed management](https://github.com/aahabib187/frontend-backend-demo/blob/main/backend/controllers/bedController.js): `backend/controllers/bedController.js`

### Persistence

- [Oracle connection](https://github.com/aahabib187/frontend-backend-demo/blob/main/backend/db/connection.js): `backend/db/connection.js`
- **Oracle database**

### Other components

- **Patient or staff**

## Connections

- Patient or staff → Page routing: uses (evidence: `frontend/src/App.jsx`)
- Page routing → Patient portal: routes to (evidence: `frontend/src/App.jsx`)
- Page routing → Doctor booking: routes to (evidence: `frontend/src/App.jsx`)
- Page routing → Book appointment: routes to (evidence: `frontend/src/App.jsx`)
- Page routing → Doctor workspace: routes to (evidence: `frontend/src/App.jsx`)
- Page routing → Prescription views: routes to (evidence: `frontend/src/App.jsx`)
- Page routing → Admin management: routes to (evidence: `frontend/src/App.jsx`)
- Express server → Authentication routes: mounts (evidence: `backend/server.js`)
- Express server → Doctor routes: mounts (evidence: `backend/server.js`)
- Express server → Appointment routes: mounts (evidence: `backend/server.js`)
- Express server → Admin routes: mounts (evidence: `backend/server.js`)
- Authentication routes → Appointment handling: dispatches (evidence: `backend/routes/auth.js`)
- Authentication routes → User profiles: dispatches (evidence: `backend/routes/auth.js`)
- Authentication routes → Doctor availability: dispatches (evidence: `backend/routes/auth.js`)
- Appointment routes → Appointment handling: dispatches (evidence: `backend/routes/appointmentRoutes.js`)
- Doctor routes → User profiles: dispatches (evidence: `backend/routes/doctorRoutes.js`)
- Doctor routes → Doctor availability: dispatches (evidence: `backend/routes/doctorRoutes.js`)
- Doctor routes → Prescription handling: dispatches (evidence: `backend/routes/doctorRoutes.js`)
- Admin routes → Medicine catalog: dispatches (evidence: `backend/routes/adminRoutes.js`)
- Admin routes → Lab test catalog: dispatches (evidence: `backend/routes/adminRoutes.js`)
- Admin routes → Bed management: dispatches (evidence: `backend/routes/adminRoutes.js`)
- Appointment handling → Oracle connection: opens connection (evidence: `backend/controllers/appointmentController.js`)
- Prescription handling → Oracle connection: opens connection (evidence: `backend/controllers/prescriptionController.js`)
- Medicine catalog → Oracle connection: opens connection (evidence: `backend/controllers/medicineController.js`)
- Lab test catalog → Oracle connection: opens connection (evidence: `backend/controllers/labTestController.js`)
- Oracle connection → Oracle database: connects (evidence: `backend/db/connection.js`)
