# pankajyadav1999/medinexus_rf architecture

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

- Interactive diagram: https://gitdiagram.com/pankajyadav1999/medinexus_rf
- Repository: https://github.com/pankajyadav1999/medinexus_rf

## Overview

MediNexus is a hospital-management React frontend, with login and a dashboard leading into patient management. The tree also shows appointment, doctor, billing, pharmacy, and inventory screens, models, and services. Sampled code confirms only login/session handling, dashboard rendering, and patient routes; service implementations and most feature wiring were not sampled, so those relationships are omitted.

Main entry points: [`src/App.js`](https://github.com/pankajyadav1999/medinexus_rf/blob/Frontend-medNexus_rf/src/App.js) (Router and routes), [`src/modules/dashboard/Dashboard.jsx`](https://github.com/pankajyadav1999/medinexus_rf/blob/Frontend-medNexus_rf/src/modules/dashboard/Dashboard.jsx) (Dashboard), [`src/modules/auth/Login.jsx`](https://github.com/pankajyadav1999/medinexus_rf/blob/Frontend-medNexus_rf/src/modules/auth/Login.jsx) (Login), [`src/core/hooks/useAuth.js`](https://github.com/pankajyadav1999/medinexus_rf/blob/Frontend-medNexus_rf/src/core/hooks/useAuth.js) (Auth hook)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["App entry"]
  node_app["Router and routes<br/>[App.js]"]
  node_dashboard["Dashboard<br/>[Dashboard.jsx]"]
end

subgraph group_access["Access and layout"]
  node_login["Login<br/>[Login.jsx]"]
  node_auth["Auth hook<br/>[useAuth.js]"]
  node_session[("Browser session")]
  node_layout["Main layout<br/>[MainLayout.jsx]"]
  node_sidebar["Navigation sidebar<br/>[Sidebar.jsx]"]
end

subgraph group_care["Care management"]
  node_patient_list["Patient list<br/>[PatientList.jsx]"]
  node_patient_add["Add patient<br/>[AddPatient.jsx]"]
  node_patient_view["Patient details<br/>[ViewPatient.jsx]"]
  node_patient_service["Patient service<br/>[patientService.js]"]
  node_patient_model["Patient model<br/>[Patient.js]"]
  node_appointments["Appointments"]
  node_schedule["Schedule appointment"]
  node_appointment_service["Appointment service"]
  node_appointment_model["Appointment model<br/>[Appointment.js]"]
  node_doctors["Doctor management<br/>[DoctorList.jsx]"]
  node_doctor_add["Add doctor<br/>[AddDoctor.jsx]"]
  node_doctor_service["Doctor service<br/>[doctorService.js]"]
  node_doctor_model["Doctor model<br/>[Doctor.js]"]
end

subgraph group_operations["Hospital operations"]
  node_billing["Bill list<br/>[BillList.jsx]"]
  node_bill_create["Create bill<br/>[CreateBill.jsx]"]
  node_billing_service["Billing service<br/>[billingService.js]"]
  node_billing_model["Billing model<br/>[Billing.js]"]
  node_pharmacy["Medicine list<br/>[MedicineList.jsx]"]
  node_medicine_add["Add medicine<br/>[AddMedicine.jsx]"]
  node_pharmacy_service["Pharmacy service<br/>[pharmacyService.js]"]
  node_pharmacy_model["Pharmacy model<br/>[Pharmacy.js]"]
  node_inventory["Stock list<br/>[StockList.jsx]"]
  node_stock_add["Add stock<br/>[AddStock.jsx]"]
  node_inventory_service["Inventory service"]
  node_inventory_model["Inventory model<br/>[Inventory.js]"]
end

node_user(("Hospital user"))

node_user -->|"enters credentials"| node_login
node_login -->|"calls login"| node_auth
node_auth -->|"stores token"| node_session
node_app -->|"checks token"| node_session
node_app -->|"routes unauthenticated"| node_login
node_app -->|"routes authenticated"| node_dashboard
node_app -->|"routes patient list"| node_patient_list
node_app -->|"routes patient creation"| node_patient_add
node_dashboard -->|"renders"| node_layout
node_user -->|"views dashboard"| node_dashboard

click node_app "https://github.com/pankajyadav1999/medinexus_rf/blob/Frontend-medNexus_rf/src/App.js"
click node_login "https://github.com/pankajyadav1999/medinexus_rf/blob/Frontend-medNexus_rf/src/modules/auth/Login.jsx"
click node_auth "https://github.com/pankajyadav1999/medinexus_rf/blob/Frontend-medNexus_rf/src/core/hooks/useAuth.js"
click node_dashboard "https://github.com/pankajyadav1999/medinexus_rf/blob/Frontend-medNexus_rf/src/modules/dashboard/Dashboard.jsx"
click node_layout "https://github.com/pankajyadav1999/medinexus_rf/blob/Frontend-medNexus_rf/src/layouts/MainLayout/MainLayout.jsx"
click node_sidebar "https://github.com/pankajyadav1999/medinexus_rf/blob/Frontend-medNexus_rf/src/layouts/MainLayout/Sidebar.jsx"
click node_patient_list "https://github.com/pankajyadav1999/medinexus_rf/blob/Frontend-medNexus_rf/src/modules/patients/PatientList.jsx"
click node_patient_add "https://github.com/pankajyadav1999/medinexus_rf/blob/Frontend-medNexus_rf/src/modules/patients/AddPatient.jsx"
click node_patient_view "https://github.com/pankajyadav1999/medinexus_rf/blob/Frontend-medNexus_rf/src/modules/patients/ViewPatient.jsx"
click node_patient_service "https://github.com/pankajyadav1999/medinexus_rf/blob/Frontend-medNexus_rf/src/core/services/patientService.js"
click node_patient_model "https://github.com/pankajyadav1999/medinexus_rf/blob/Frontend-medNexus_rf/src/core/models/Patient.js"
click node_appointments "https://github.com/pankajyadav1999/medinexus_rf/blob/Frontend-medNexus_rf/src/modules/appointments/AppointmentList.jsx"
click node_schedule "https://github.com/pankajyadav1999/medinexus_rf/blob/Frontend-medNexus_rf/src/modules/appointments/ScheduleAppointment.jsx"
click node_appointment_service "https://github.com/pankajyadav1999/medinexus_rf/blob/Frontend-medNexus_rf/src/core/services/appointmentService.js"
click node_appointment_model "https://github.com/pankajyadav1999/medinexus_rf/blob/Frontend-medNexus_rf/src/core/models/Appointment.js"
click node_doctors "https://github.com/pankajyadav1999/medinexus_rf/blob/Frontend-medNexus_rf/src/modules/doctors/DoctorList.jsx"
click node_doctor_add "https://github.com/pankajyadav1999/medinexus_rf/blob/Frontend-medNexus_rf/src/modules/doctors/AddDoctor.jsx"
click node_doctor_service "https://github.com/pankajyadav1999/medinexus_rf/blob/Frontend-medNexus_rf/src/core/services/doctorService.js"
click node_doctor_model "https://github.com/pankajyadav1999/medinexus_rf/blob/Frontend-medNexus_rf/src/core/models/Doctor.js"
click node_billing "https://github.com/pankajyadav1999/medinexus_rf/blob/Frontend-medNexus_rf/src/modules/billing/BillList.jsx"
click node_bill_create "https://github.com/pankajyadav1999/medinexus_rf/blob/Frontend-medNexus_rf/src/modules/billing/CreateBill.jsx"
click node_billing_service "https://github.com/pankajyadav1999/medinexus_rf/blob/Frontend-medNexus_rf/src/core/services/billingService.js"
click node_billing_model "https://github.com/pankajyadav1999/medinexus_rf/blob/Frontend-medNexus_rf/src/core/models/Billing.js"
click node_pharmacy "https://github.com/pankajyadav1999/medinexus_rf/blob/Frontend-medNexus_rf/src/modules/pharmacy/MedicineList.jsx"
click node_medicine_add "https://github.com/pankajyadav1999/medinexus_rf/blob/Frontend-medNexus_rf/src/modules/pharmacy/AddMedicine.jsx"
click node_pharmacy_service "https://github.com/pankajyadav1999/medinexus_rf/blob/Frontend-medNexus_rf/src/core/services/pharmacyService.js"
click node_pharmacy_model "https://github.com/pankajyadav1999/medinexus_rf/blob/Frontend-medNexus_rf/src/core/models/Pharmacy.js"
click node_inventory "https://github.com/pankajyadav1999/medinexus_rf/blob/Frontend-medNexus_rf/src/modules/inventory/StockList.jsx"
click node_stock_add "https://github.com/pankajyadav1999/medinexus_rf/blob/Frontend-medNexus_rf/src/modules/inventory/AddStock.jsx"
click node_inventory_service "https://github.com/pankajyadav1999/medinexus_rf/blob/Frontend-medNexus_rf/src/core/services/inventoryService.js"
click node_inventory_model "https://github.com/pankajyadav1999/medinexus_rf/blob/Frontend-medNexus_rf/src/core/models/Inventory.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_app,node_dashboard,node_user toneBlue
class node_login,node_auth,node_session,node_layout,node_sidebar toneAmber
class node_patient_list,node_patient_add,node_patient_view,node_patient_service,node_patient_model,node_appointments,node_schedule,node_appointment_service,node_appointment_model,node_doctors,node_doctor_add,node_doctor_service,node_doctor_model toneMint
class node_billing,node_bill_create,node_billing_service,node_billing_model,node_pharmacy,node_medicine_add,node_pharmacy_service,node_pharmacy_model,node_inventory,node_stock_add,node_inventory_service,node_inventory_model toneRose
```

## Components

### App entry

- [Router and routes](https://github.com/pankajyadav1999/medinexus_rf/blob/Frontend-medNexus_rf/src/App.js): `src/App.js`
- [Dashboard](https://github.com/pankajyadav1999/medinexus_rf/blob/Frontend-medNexus_rf/src/modules/dashboard/Dashboard.jsx): `src/modules/dashboard/Dashboard.jsx`

### Access and layout

- [Login](https://github.com/pankajyadav1999/medinexus_rf/blob/Frontend-medNexus_rf/src/modules/auth/Login.jsx): `src/modules/auth/Login.jsx`
- [Auth hook](https://github.com/pankajyadav1999/medinexus_rf/blob/Frontend-medNexus_rf/src/core/hooks/useAuth.js): `src/core/hooks/useAuth.js`
- **Browser session**
- [Main layout](https://github.com/pankajyadav1999/medinexus_rf/blob/Frontend-medNexus_rf/src/layouts/MainLayout/MainLayout.jsx): `src/layouts/MainLayout/MainLayout.jsx`
- [Navigation sidebar](https://github.com/pankajyadav1999/medinexus_rf/blob/Frontend-medNexus_rf/src/layouts/MainLayout/Sidebar.jsx): `src/layouts/MainLayout/Sidebar.jsx`

### Care management

- [Patient list](https://github.com/pankajyadav1999/medinexus_rf/blob/Frontend-medNexus_rf/src/modules/patients/PatientList.jsx): `src/modules/patients/PatientList.jsx`
- [Add patient](https://github.com/pankajyadav1999/medinexus_rf/blob/Frontend-medNexus_rf/src/modules/patients/AddPatient.jsx): `src/modules/patients/AddPatient.jsx`
- [Patient details](https://github.com/pankajyadav1999/medinexus_rf/blob/Frontend-medNexus_rf/src/modules/patients/ViewPatient.jsx): `src/modules/patients/ViewPatient.jsx`
- [Patient service](https://github.com/pankajyadav1999/medinexus_rf/blob/Frontend-medNexus_rf/src/core/services/patientService.js): `src/core/services/patientService.js`
- [Patient model](https://github.com/pankajyadav1999/medinexus_rf/blob/Frontend-medNexus_rf/src/core/models/Patient.js): `src/core/models/Patient.js`
- [Appointments](https://github.com/pankajyadav1999/medinexus_rf/blob/Frontend-medNexus_rf/src/modules/appointments/AppointmentList.jsx): `src/modules/appointments/AppointmentList.jsx`
- [Schedule appointment](https://github.com/pankajyadav1999/medinexus_rf/blob/Frontend-medNexus_rf/src/modules/appointments/ScheduleAppointment.jsx): `src/modules/appointments/ScheduleAppointment.jsx`
- [Appointment service](https://github.com/pankajyadav1999/medinexus_rf/blob/Frontend-medNexus_rf/src/core/services/appointmentService.js): `src/core/services/appointmentService.js`
- [Appointment model](https://github.com/pankajyadav1999/medinexus_rf/blob/Frontend-medNexus_rf/src/core/models/Appointment.js): `src/core/models/Appointment.js`
- [Doctor management](https://github.com/pankajyadav1999/medinexus_rf/blob/Frontend-medNexus_rf/src/modules/doctors/DoctorList.jsx): `src/modules/doctors/DoctorList.jsx`
- [Add doctor](https://github.com/pankajyadav1999/medinexus_rf/blob/Frontend-medNexus_rf/src/modules/doctors/AddDoctor.jsx): `src/modules/doctors/AddDoctor.jsx`
- [Doctor service](https://github.com/pankajyadav1999/medinexus_rf/blob/Frontend-medNexus_rf/src/core/services/doctorService.js): `src/core/services/doctorService.js`
- [Doctor model](https://github.com/pankajyadav1999/medinexus_rf/blob/Frontend-medNexus_rf/src/core/models/Doctor.js): `src/core/models/Doctor.js`

### Hospital operations

- [Bill list](https://github.com/pankajyadav1999/medinexus_rf/blob/Frontend-medNexus_rf/src/modules/billing/BillList.jsx): `src/modules/billing/BillList.jsx`
- [Create bill](https://github.com/pankajyadav1999/medinexus_rf/blob/Frontend-medNexus_rf/src/modules/billing/CreateBill.jsx): `src/modules/billing/CreateBill.jsx`
- [Billing service](https://github.com/pankajyadav1999/medinexus_rf/blob/Frontend-medNexus_rf/src/core/services/billingService.js): `src/core/services/billingService.js`
- [Billing model](https://github.com/pankajyadav1999/medinexus_rf/blob/Frontend-medNexus_rf/src/core/models/Billing.js): `src/core/models/Billing.js`
- [Medicine list](https://github.com/pankajyadav1999/medinexus_rf/blob/Frontend-medNexus_rf/src/modules/pharmacy/MedicineList.jsx): `src/modules/pharmacy/MedicineList.jsx`
- [Add medicine](https://github.com/pankajyadav1999/medinexus_rf/blob/Frontend-medNexus_rf/src/modules/pharmacy/AddMedicine.jsx): `src/modules/pharmacy/AddMedicine.jsx`
- [Pharmacy service](https://github.com/pankajyadav1999/medinexus_rf/blob/Frontend-medNexus_rf/src/core/services/pharmacyService.js): `src/core/services/pharmacyService.js`
- [Pharmacy model](https://github.com/pankajyadav1999/medinexus_rf/blob/Frontend-medNexus_rf/src/core/models/Pharmacy.js): `src/core/models/Pharmacy.js`
- [Stock list](https://github.com/pankajyadav1999/medinexus_rf/blob/Frontend-medNexus_rf/src/modules/inventory/StockList.jsx): `src/modules/inventory/StockList.jsx`
- [Add stock](https://github.com/pankajyadav1999/medinexus_rf/blob/Frontend-medNexus_rf/src/modules/inventory/AddStock.jsx): `src/modules/inventory/AddStock.jsx`
- [Inventory service](https://github.com/pankajyadav1999/medinexus_rf/blob/Frontend-medNexus_rf/src/core/services/inventoryService.js): `src/core/services/inventoryService.js`
- [Inventory model](https://github.com/pankajyadav1999/medinexus_rf/blob/Frontend-medNexus_rf/src/core/models/Inventory.js): `src/core/models/Inventory.js`

### Other components

- **Hospital user**

## Connections

- Hospital user → Login: enters credentials
- Login → Auth hook: calls login
- Auth hook → Browser session: stores token
- Router and routes → Browser session: checks token
- Router and routes → Login: routes unauthenticated
- Router and routes → Dashboard: routes authenticated
- Router and routes → Patient list: routes patient list
- Router and routes → Add patient: routes patient creation
- Dashboard → Main layout: renders
- Hospital user → Dashboard: views dashboard
