How rickyharish/healthcare works
Healthcare Application is a React/Express healthcare portal. Its user journey covers account registration and OTP verification, doctor search and selection, appointment booking, then appointment review or cancellation; password recovery and administrative doctor management are additional capabilities. The backend uses MongoDB models for users and appointments, while search currently filters demonstration data in its route. Some frontend-to-API details and several advertised capabilities are not shown in source excerpts, so those connections are documented or marked unverified rather than inferred as direct calls.
Main entry points: App.js App routing · server.js Express server · authRoutes.js Auth routes · appointmentRoutes.js Appointment API
Components 27
Patient web app
- App routing
frontend/src/App.js - Auth state
frontend/src/components/AuthContext.js - Login and registration
frontend/src/pages/Login.js - OTP verification
frontend/src/services/verifyOtp.js - Password recovery
frontend/src/pages/ForgotPassword.js - Doctor search
frontend/src/pages/Home.js - Search filters
frontend/src/components/Searchbar.js - Doctor selection
frontend/src/components/DoctorSelection.js - Appointment booking
frontend/src/components/AppointmentBooking.js - Appointment review
frontend/src/components/AppointmentPreview.js - Admin panel
frontend/src/pages/AdminPanel.js
API services
- Express server
backend/server.js - Auth routes
backend/routes/authRoutes.js - Authentication
backend/controllers/authController.js - Doctor search API
backend/routes/searchRoutes.js - Appointment API
backend/routes/appointmentRoutes.js - Booking handler
backend/controllers/appointmentController.js - Admin routes
backend/routes/adminRoutes.js - Admin handlers
backend/controllers/adminController.js
Healthcare data
- Database connection
backend/config/db.js - User records
backend/models/User.js - Appointment records
backend/models/Appointment.js - Doctor records
backend/models/Doctor.js - Hospital records
backend/models/Hospital.js
External services
- MongoDB
- Email service
Other components
- Patient
Connections 37
- Patient → App routing: uses
README.md - App routing → Auth state: provides auth
frontend/src/App.js - App routing → Doctor search: routes to
frontend/src/App.js - App routing → Login and registration: routes to
frontend/src/App.js - App routing → OTP verification: routes to
frontend/src/App.js - App routing → Password recovery: routes to
frontend/src/App.js - App routing → Doctor selection: routes to
frontend/src/App.js - App routing → Appointment booking: routes to
frontend/src/App.js - App routing → Appointment review: routes to
frontend/src/App.js - App routing → Admin panel: routes to
frontend/src/App.js - Doctor search → Search filters: renders
frontend/src/pages/Home.js - Patient → Login and registration: authenticates
README.md - Login and registration → Auth routes: submits credentials
README.md - OTP verification → Auth routes: verifies OTP
README.md - Password recovery → Auth routes: requests reset
README.md - Express server → Auth routes: mounts
backend/server.js - Express server → Doctor search API: mounts
backend/server.js - Express server → Appointment API: mounts
backend/server.js - Express server → Admin routes: mounts
backend/server.js - Auth routes → Authentication: dispatches
backend/routes/authRoutes.js - Authentication → User records: reads and writes
backend/controllers/authController.js - Authentication → Email service: sends messages
backend/controllers/authController.js - Search filters → Doctor search API: searches doctors
README.md - Doctor search API → Patient: returns matches
backend/routes/searchRoutes.js - Patient → Doctor selection: selects doctor
README.md - Appointment booking → Appointment API: books appointment
README.md - Appointment API → Appointment records: reads and writes
backend/routes/appointmentRoutes.js - Booking handler → Appointment records: saves appointment
backend/controllers/appointmentController.js - Appointment review → Appointment API: lists or cancels
frontend/src/components/AppointmentPreview.js - Admin routes → Admin handlers: dispatches
backend/routes/adminRoutes.js - Admin panel → Admin routes: manages doctors
README.md - Express server → Database connection: connects database
backend/server.js - Database connection → MongoDB: connects
README.md - User records → MongoDB: stored in
README.md - Appointment records → MongoDB: stored in
README.md - Doctor records → MongoDB: stored in
README.md - Hospital records → MongoDB: stored in
README.md