How saagarrk/hospital-management-system works
MedPulse is a role-based hospital management system with a React SPA, Spring Boot REST API and MySQL-backed domain services. Users authenticate and receive role-gated workflows; the frontend requests operational data through service clients, and the backend exposes clinical, administrative and financial capabilities. The README documents appointments, patient records, inpatient care, labs, prescriptions, pharmacy, billing, audit and dashboards. Source excerpts confirm selected frontend routing/authentication, dashboard fallback and backend authentication/appointment/pharmacy contracts; other domain links are documented or left unasserted where source was not sampled.
Main entry points: controller Spring REST API · axiosClient.js HTTP client · App.jsx SPA routes · dashboardService.js Dashboard client
Components 26
Web application
- SPA routes
src/App.jsx - HTTP client
src/api/axiosClient.js - Role dashboards
src/components/modules/DashboardModule.jsx - Dashboard client
src/services/dashboardService.js - Hospital modules
src/components/modules - Local rule engine
src/services/mockDataService.js
Identity and access
- Auth state
src/context/AuthContext.jsx - Login and registration
src/pages/auth - Auth client
src/services/authService.js - Auth API
backend-springboot/src/main/java/com/hospital/management/controller/AuthController.java - Authentication service
backend-springboot/src/main/java/com/hospital/management/service/impl/AuthServiceImpl.java - JWT services
backend-springboot/src/main/java/com/hospital/management/security/JwtService.java - User details lookup
backend-springboot/src/main/java/com/hospital/management/security/CustomUserDetailsService.java
Clinical operations
- Appointment management
backend-springboot/src/main/java/com/hospital/management/service/AppointmentService.java - Medical records
backend-springboot/src/main/java/com/hospital/management/service/MedicalRecordService.java - Inpatient care
backend-springboot/src/main/java/com/hospital/management/service - Laboratory
backend-springboot/src/main/java/com/hospital/management/service - Prescriptions
backend-springboot/src/main/java/com/hospital/management/service - Patient and doctor records
backend-springboot/src/main/java/com/hospital/management/service
Hospital operations
- Pharmacy inventory
backend-springboot/src/main/java/com/hospital/management/controller/PharmacyController.java - Billing and payments
backend-springboot/src/main/java/com/hospital/management/service - Audit logs
backend-springboot/src/main/java/com/hospital/management/service - Dashboard aggregation
backend-springboot/src/main/java/com/hospital/management/service
Backend platform
- Spring REST API
backend-springboot/src/main/java/com/hospital/management/controller
Persistence
- MySQL database
Other components
- Hospital user
Connections 37
- Hospital user → SPA routes: uses
src/App.jsx - SPA routes → Auth state: provides auth
src/App.jsx - SPA routes → Login and registration: routes to
src/App.jsx - SPA routes → Hospital modules: routes to
src/App.jsx - Login and registration → Auth state: submits credentials
src/pages/auth/RegisterPage.jsx - Auth state → Auth client: authenticates via
src/context/AuthContext.jsx - Auth client → HTTP client: sends requests
src/services/authService.js - HTTP client → Auth API: calls REST API
- HTTP client → Spring REST API: calls REST API
- Role dashboards → Dashboard client: loads dashboard
src/components/modules/DashboardModule.jsx - Dashboard client → HTTP client: requests metrics
src/services/dashboardService.js - Dashboard client → Local rule engine: falls back
src/services/dashboardService.js - HTTP client → Spring REST API: sends REST requests
- Auth API → Authentication service: delegates auth
- Authentication service → JWT services: issues tokens
backend-springboot/src/main/java/com/hospital/management/service/impl/AuthServiceImpl.java - Authentication service → User details lookup: authenticates user
- Spring REST API → Appointment management: routes requests
- Spring REST API → Medical records: routes requests
- Spring REST API → Inpatient care: routes requests
backend-springboot/src/main/java/com/hospital/management/controller/PharmacyController.java - Spring REST API → Laboratory: routes requests
backend-springboot/src/main/java/com/hospital/management/controller/PharmacyController.java - Spring REST API → Prescriptions: routes requests
backend-springboot/src/main/java/com/hospital/management/controller/PharmacyController.java - Spring REST API → Patient and doctor records: routes requests
backend-springboot/src/main/java/com/hospital/management/controller/PharmacyController.java - Spring REST API → Pharmacy inventory: routes requests
backend-springboot/src/main/java/com/hospital/management/controller/PharmacyController.java - Spring REST API → Billing and payments: routes requests
backend-springboot/src/main/java/com/hospital/management/controller/PharmacyController.java - Spring REST API → Audit logs: routes requests
backend-springboot/src/main/java/com/hospital/management/controller/PharmacyController.java - Spring REST API → Dashboard aggregation: routes requests
backend-springboot/src/main/java/com/hospital/management/controller/PharmacyController.java - User details lookup → MySQL database: reads user
- Appointment management → MySQL database: reads and writes
- Medical records → MySQL database: reads and writes
- Inpatient care → MySQL database: reads and writes
- Laboratory → MySQL database: reads and writes
- Prescriptions → MySQL database: reads and writes
- Patient and doctor records → MySQL database: reads and writes
- Pharmacy inventory → MySQL database: reads and writes
- Billing and payments → MySQL database: reads and writes
- Audit logs → MySQL database: reads and writes
- Dashboard aggregation → MySQL database: aggregates data