Hackathon Submission Statement This project was developed in compliance with the hackathon Problem Statement. It addresses the critical issues of finding doctors, booking appointments securely under high concurrency, and centralizing medical records digitally.
- Profile Management: Build a comprehensive professional profile including clinic details, education, experience, services offered, pricing, and awards.
- Dynamic Scheduling: Create customized working schedules by setting availability for specific days and time slots.
- Slot Blocking (Leave Management): Proactively block specific dates and times with reasons to prevent bookings during leaves or emergencies.
- Digital Prescriptions: Issue detailed, structured digital prescriptions to patients, including disease diagnosis, recommended tests, specific medicines (dosage, frequency, duration), and diagnosis notes.
- Appointment Management: View and manage incoming patient appointments, track patient history, and manage follow-ups.
- Blogging Platform: Publish medical blogs and articles to educate patients and build a professional brand.
- Review Management: Track and respond to patient reviews and ratings.
- Smart Booking System: Find doctors by specialty or location and book appointments seamlessly.
- Personal Health Records: Maintain a centralized digital health profile, including blood group, known medical conditions, and current medications during the booking flow.
- Track Appointments: Real-time tracking of appointment status (pending, confirmed, etc.) with a unique tracking ID.
- Favorites List: Save and manage a list of preferred doctors for quick access in the future.
- Ratings & Reviews: Share experiences by leaving reviews, star ratings, and recommendations for doctors.
- Digital Prescriptions Access: Access and download digital prescriptions issued by doctors at any time.
- Role-Based Access Control: Distinct dashboards and access levels for Patients, Doctors, and Administrators.
- Concurrency Control: Strict backend-level concurrency protection using a composite unique constraint to eliminate race conditions and double-booking.
- Secure Authentication: Robust authentication system with JWT, user verification, and secure password recovery mechanisms.
- Payment Processing: Integrated system for handling doctor fees, booking fees, VAT, and overall transaction tracking.
- Concurrency Control: Strict backend-level concurrency protection using a composite unique constraint (
@@unique([doctorId, scheduleDate, scheduleTime])) and MongoDB's atomic index constraints. This completely eliminates race conditions and double-booking. - Personal Health Summary: Patients can log their Blood Group, Medical Conditions, and Medications seamlessly during the booking flow.
- Diagnosis Notes: Doctors can securely record unstructured diagnosis notes alongside structured prescriptions.
- Slot Management: Doctors can proactively block dates/times for leaves, dynamically filtering these out of the patient's view.
- Real Database Backend: Migrated from a mock
localStorageinterface to a production-ready Node.js, Express, and MongoDB architecture.
| Layer | Tools |
|---|---|
| Frontend | React 18, Redux Toolkit, RTK Query, Ant Design, Bootstrap |
| Backend | Node.js, Express.js |
| Database | MongoDB, Prisma ORM |
Follow these steps to run the complete platform (Backend + Frontend) locally on your machine.
- Node.js (v18+ recommended)
- MongoDB database running via a cloud provider (e.g., MongoDB Atlas).
- Navigate to the
apidirectory:cd api - Copy the example environment variables:
cp .env.example .env
- Open
.envand set yourDATABASE_URLto point to your MongoDB instance:DATABASE_URL="mongodb+srv://USER:PASSWORD@CLUSTER_URL/DATABASE?retryWrites=true&w=majority"
- Inside the
apidirectory, install dependencies:npm install
- Push the Prisma schema to your database to create the necessary tables:
npx prisma db push
- Start the Express server:
(The backend server will run on
npm start
http://localhost:5050by default)
- Open a new terminal window and navigate to the project root directory:
cd Doctor-Appointment-master - Install frontend dependencies:
npm install
- Start the React development server:
npm start
- Open http://localhost:3000 in your browser.
- Thought Process Document: Please refer to
ThoughtProcess.mdin the root directory for a deep dive into the concurrency logic and architectural decisions. - Mobile Responsive: The frontend UI is built using Bootstrap and Ant Design, ensuring the "under 2 minutes" mobile booking requirement is fully supported.
Note: This project is a hackathon submission aimed at modernizing clinic management and patient experiences.