How ruchiranagre/medichoice works
MediChoice is a healthcare discovery and planning platform: users browse hospitals, doctors, and treatment information, compare options and estimate costs, then can register and book appointments. Its React frontend routes these experiences; an Express/MongoDB backend serves hospital, doctor, authentication, and appointment APIs, while a separate chatbot service uses curated datasets and Groq. README capabilities such as cost insights and treatment duration are represented, but unsampled frontend-to-backend wiring is omitted unless shown by an excerpt or index.
Main entry points: App.jsx Frontend router · app.js Express API router · showHospitalRoutes.js Hospital detail and reviews · appointmentRoutes.js Appointment endpoints
Components 30
Discovery and planning
- Frontend router
frontend/src/App.jsx - Hospital discovery
frontend/src/pages/HospitalsAll/HospitalsAll.jsx - Hospital profile
frontend/src/pages/ShowHospital/ShowHospital.jsx - Doctor profile
frontend/src/pages/ShowDoctor/ShowDoctor.jsx - Treatment information
frontend/src/pages/TreatmentInfo/TreatmentInfo.jsx - Treatment catalog
frontend/src/pages/AllTreatments/AllTreatments.jsx - Option comparison
frontend/src/pages/Comparison/Comparison.jsx - Cost estimator
frontend/src/pages/Estimator/Estimator.jsx
Accounts and care
- Registration
frontend/src/components/SignUp/SignUp.jsx - Login
frontend/src/components/Login/Login.jsx - Appointment booking
frontend/src/pages/BookAppointment/BookAppointment.jsx - Patient dashboard
frontend/src/pages/Dashboards/PatientDashboard.jsx - Doctor dashboard
frontend/src/pages/DoctorDashboard/Dashboard.jsx
Healthcare API
- Express API router
backend/app.js - Hospital endpoints
backend/routes/hospitalRoutes.js - Hospital detail and reviews
backend/routes/showHospitalRoutes.js - Doctor endpoints
backend/routes/doctorRoutes.js - Comparison endpoint
backend/routes/comparisonRoutes.js - Appointment endpoints
backend/routes/appointmentRoutes.js - Authentication endpoints
backend/routes/authRoutes.js - Token protection
backend/middleware/authMiddleware.js - Hospital records
backend/models/Hospitals.js - Doctor records
backend/models/Doctors.js - User records
backend/models/User.js - Appointment records
backend/models/Appointment.js
Chat assistant
- Chat widget
frontend/src/components/ChatWidget.jsx - Chat service
chatbot-service/server.js - Curated doctor and hospital data
chatbot-service/dData.js
Other components
- Healthcare seeker
- Groq language model
Connections 33
- Healthcare seeker → Frontend router: browses
frontend/src/App.jsx - Frontend router → Hospital discovery: routes to
frontend/src/App.jsx - Frontend router → Hospital profile: routes to
frontend/src/App.jsx - Frontend router → Doctor profile: routes to
frontend/src/App.jsx - Frontend router → Treatment information: routes to
frontend/src/App.jsx - Frontend router → Treatment catalog: routes to
frontend/src/App.jsx - Frontend router → Option comparison: routes to
frontend/src/App.jsx - Frontend router → Cost estimator: routes to
frontend/src/App.jsx - Frontend router → Registration: routes to
frontend/src/App.jsx - Frontend router → Login: routes to
frontend/src/App.jsx - Frontend router → Appointment booking: routes to
frontend/src/App.jsx - Frontend router → Patient dashboard: routes to
frontend/src/App.jsx - Frontend router → Doctor dashboard: routes to
frontend/src/App.jsx - Frontend router → Chat widget: renders
frontend/src/App.jsx - Express API router → Hospital endpoints: mounts
backend/app.js - Express API router → Hospital detail and reviews: mounts
backend/app.js - Express API router → Doctor endpoints: mounts
backend/app.js - Express API router → Comparison endpoint: mounts
backend/app.js - Express API router → Appointment endpoints: mounts
backend/app.js - Express API router → Authentication endpoints: mounts
backend/app.js - Hospital endpoints → Hospital records: queries
backend/routes/hospitalRoutes.js - Hospital detail and reviews → Hospital records: reads and updates
backend/routes/showHospitalRoutes.js - Doctor endpoints → Doctor records: queries
backend/routes/doctorRoutes.js - Comparison endpoint → Hospital records: queries
backend/routes/comparisonRoutes.js - Appointment endpoints → Appointment records: reads and writes
backend/routes/appointmentRoutes.js - Appointment endpoints → Token protection: protects routes
backend/routes/appointmentRoutes.js - Hospital detail and reviews → Token protection: protects reviews
backend/routes/showHospitalRoutes.js - Token protection → User records: loads user
backend/middleware/authMiddleware.js - Authentication endpoints → User records: registers and authenticates
backend/routes/authRoutes.js - Authentication endpoints → Doctor records: creates doctor profile
backend/routes/authRoutes.js - Hospital profile → Hospital detail and reviews: fetches and submits reviews
frontend/src/pages/ShowHospital/ShowHospital.jsx - Chat service → Curated doctor and hospital data: loads datasets
chatbot-service/server.js - Chat service → Groq language model: requests completion
chatbot-service/server.js