Doctor booking app
Doctor booking app
Submitted by
SWETHA.V 410821104030
VARSHINI.J 410821104031
SARULATHA.G 410821104025
Of
BACHELOR OF ENGINEERING
In
NOVEMBER-2024
BONAFIDE CERTIFICATION
Certified that this project report “DOCTOR BOOKING WEB APPLICATION USING
MERN STACK BY MONGO DB” is the bonafide work of “ALGIN FARRELL.J.B,
SWETHA.V, VARSHINI.J, SARULATHA.G” who carried out the project work under my
guidance during the academic year 2024.
CHENNAI-600063
VARSHINI.J 410821104031
SARULATHA.G 410821104025
In a Doctor Booker application, one of the key features is the ability to display
and manage different types of doctors with varying specialties. This feature
allows patients to easily find and book appointments with the right medical
professionals based on their needs.
• Psychiatrists,
• Dermatologists,
• Genral surgeon,
• Cardiologist,
• Endocrinologist,
• Physiotheraphy and so on.
SCENARIO:
Let’s walk through a practical scenario for a Doctor Booking Application built
with the MERN stack (MongoDB, Express, React, Node.js). This scenario will cover
the flow of a patient booking an appointment, the interactions between different
components of the system, and the technologies used to support it.
Scenario Overview:
The admin will manage the entire system, including verifying doctor profiles,
handling patient complaints, and ensuring the platform’s smooth operation.
TECHNICAL ARCHITECTURE:
• User Sign-up and Login: Users (patients) can sign up or log in to the
platform. This can be achieved using JWT (JSON Web Token) or Passport.js
for session management.
• Role-based Access: Different roles for users (patients) and doctors (e.g.,
admin, doctor, patient) to manage access control.
2. Doctor Profiles
• Available Time Slots: Doctors can set their availability (time slots) through a
simple UI, and patients can view available slots for each doctor.
• Booking an Appointment: Patients can select a time slot and book an
appointment with a doctor.
• Booking Confirmation: After booking, the patient receives a confirmation
email/SMS with appointment details. The doctor also receives a notification
of the new appointment.
• Appointment Reminders: Automated reminders via email/SMS/Push
Notifications for upcoming appointments.
4. Admin Panel
6. Doctor Dashboard
• Manage Availability: Doctors can set their availability, modify time slots, or
mark themselves as unavailable.
• View Appointments: Doctors can see their upcoming appointments, along
with patient details (name, contact info, and reason for the visit).
• Patient History: If implemented, doctors can access the patient’s past
appointment history and medical notes (via a secure system).
8. Payment Integration
• Patient Reviews: After an appointment, patients can rate their doctor and
leave feedback (e.g., stars, comments).
• Doctor Rating: Doctors can be rated based on various factors like
professionalism, punctuality, and communication.
11.Search and Filter Options
• Sync with Google Calendar: Patients and doctors can sync their
appointments with Google Calendar or other calendar applications to track
appointments more efficiently.
PREREQUISITES:
To develop a full-stack for doctor booking using React JS, Node.js, and
MongoDB, there are several prerequisites you should consider. Here are the
key prerequisites for developing such an application:
Node.js and npm: Install Node.js, which includes npm (Node Package
Manager), on your development machine. Node.js is required to run
JavaScript on the server side.
• Download: https://nodejs.org/en/download/
HTML, CSS, and JavaScript: Basic knowledge of HTML for creating the
structure of your app, CSS for styling,and JavaScript for client-side
interactivity is essential.
Version Control: Use Git for version control, enabling collaboration and
tracking changes throughout the development process. Platforms like
GitHub or Bitbucket can host your repository.
Install Dependencies:
2. Restaurant Flow:
• Restaurants start by authenticating with their credentials.
• They need to get approval from the admin to start listing
the products. • They can add/edit the food items.
3. Admin Flow:
• Admins start by logging in with their credentials.
• Once logged in, they are directed to the Admin Dashboard.
• Admins can access the users list, products, orders, etc.
PROJECT STRUCTURE
• src/pages has the files for all the pages in the application.
PROJECT SETUP AND CONFIGURATION:
Install required tools and software:
• Node.js.
• Git.
• Client folders.
• Server folders
Referral Image:
DATABASE DEVELOPMENT:
• Install Mongoose.
Reference Image:
Schema use-case:
The User schema represents the patients who book appointments with doctors.
Patients need to have basic personal information, authentication details, and a
history of their bookings.
Use Case:
2. Doctor Schema
The Doctor schema represents the doctors available for booking. It includes their
professional information, availability, and ratings.
Use Case:
3. Appointment Schema
Use Case:
The Review schema is used for patients to rate and provide feedback about the
doctor after the appointment
Use Case:
• Define API’s
2. Database Configuration:
• Set up a MongoDB database either locally or using a cloud-based
MongoDB service like MongoDB Atlas or use locally with MongoDB
compass.
• Create a database and define the necessary collections for admin,
users, doctor profile,conformation
6. User Authentication:
• Create routes and middleware for user registration, login, and
logout.
• Set up authentication middleware to protect routes that require
user authentication.
7. Handle new products and Orders:
• Create routes and controllers to handle new product listings,
including fetching products data from the database and sending it
as a response.
• Implement functionality by creating routes and controllers
to handle requests, including validation and database
updates.
8. Admin Functionality:
• Implement routes and controllers specific to admin functionalities
such as adding doctors, managing user , etc.
• Add necessary authentication and authorization checks to ensure
only authorized admins can access these routes.
9. Error Handling:
• Implement error handling middleware to catch and handle any
errors that occur during the API requests.
• Return appropriate error responses with relevant error messages
and HTTP status codes.
FRONTEND DEVELOPMENT:
1. Setup React Application:
2.Design UI components:
• Create Components.
• Add navigation.
Reference Image:
CODE EXPLANATION
Server setup:
Let us import all the required tools/libraries and connect the database.
USER AUTHENTICATION:
Backend:
Now, here we define the functions to handle http requests from the client for
authentication.
Frontend:
LOGIN:
REGISTER:
All User:
Frontend:
In the home page, we’ll fetch all the products available in the platform along
with the filters.
Backend:
UPDATE PROFILE:
Frontend:
Here, we can add the product to the cart and later can buy them.
Backend:
LOGIN:
Frontend:
Backend:
NOTIFICATION:
Frontend:
Backend:
APPLY FOR DOCTOR:
Frontend:
Backend:
Demo UI images:
Landing page:
DOCTORS:
APPOINTMENTS:
NOTIFICATION BAR:
APPLY FOR DOCTOR:
USERPROFILE:
ADMIN DASHBOARD:
ACCEPT APPOINTMENTS:
** THANK YOU **