How yazdanhaider/hospital-management works
HealthHub is a hospital-management web app with a React interface and a separate Express patient API. The main user workflow is navigating the app to book appointments, manage patient records, and browse doctors; the API exposes patient registration, login, listing, and deletion backed by MongoDB. The README also describes administration and reporting, plus broader services such as billing and telemedicine, though their implementations are not established by the sampled code. Frontend-to-backend wiring is not shown, so no connection between them is asserted.
Main entry points: App.jsx App routing · signup.js Signup API · server.js Express server · Home.jsx Home page
Components 21
Hospital interface
- App routing
Frontend/src/App.jsx - Home page
Frontend/src/components/Home.jsx - Appointments
Frontend/src/components/Appointments.jsx - Patient records UI
Frontend/src/components/Patients.jsx - Doctor directory
Frontend/src/components/Doctors.jsx - Doctor profile
Frontend/src/components/DoctorProfile.jsx - Administration
Frontend/src/components/Admin.jsx - Review prompt
Frontend/src/components/Review.jsx - Services information
Frontend/src/pages/Services.jsx - About and contact
Frontend/src/pages/AboutUs.jsx
User authentication
- Login and signup
Frontend/src/components/Login.jsx - Signup API
Frontend/src/app/api/auth/signup.js - User DB connector
Frontend/utils/dbConnect.js - User model
Frontend/models/User.js
Patient API
- Express server
Backend/server.js - Patient routes
Backend/api/routes/PatientRoute.js - Patient operations
Backend/api/controllers/PatientController.js
Data storage
- Patient model
Backend/api/models/Patient.js - Patient database
- User database
Other components
- Hospital user
Connections 19
- Hospital user → App routing: uses
- App routing → Home page: routes to
Frontend/src/App.jsx - App routing → Appointments: routes to
Frontend/src/App.jsx - App routing → Patient records UI: routes to
Frontend/src/App.jsx - App routing → Doctor directory: routes to
Frontend/src/App.jsx - App routing → Doctor profile: routes to
Frontend/src/App.jsx - App routing → Administration: routes to
Frontend/src/App.jsx - App routing → Services information: routes to
Frontend/src/App.jsx - App routing → About and contact: routes to
Frontend/src/App.jsx - Home page → Review prompt: renders
Frontend/src/components/Home.jsx - App routing → Login and signup: routes to
Frontend/src/App.jsx - Signup API → User DB connector: connects via
Frontend/src/app/api/auth/signup.js - Signup API → User model: uses
Frontend/src/app/api/auth/signup.js - User DB connector → User database: connects
Frontend/utils/dbConnect.js - Express server → Patient routes: mounts
Backend/server.js - Express server → Patient database: connects
Backend/server.js - Patient routes → Patient operations: dispatches
Backend/api/routes/PatientRoute.js - Patient operations → Patient model: queries
Backend/api/controllers/PatientController.js - Patient model → Patient database: persists in