Welcome to the BookMyDoc repository! This is a full-stack project developed using React, Bootstrap, Node.js, Express, MongoDB, Mongoose, Bcrypt.js, and JSON Web Tokens (JWT). The application provides functionalities for both doctors and patients to book and manage appointments. Below, you'll find detailed information on setting up and running this application.
BookMyDoc is a responsive doctor appointment booking app that handles both doctor and patient functionalities. Users can sign up as either a doctor or a patient, create their profiles, and book appointments with available doctors. Doctors need to enter a purchase code to create their profiles. The app includes the following features:
- User registration as a doctor or patient.
- Doctor profile creation with a purchase code.
- Common sign-in page for both doctors and patients.
- Patient appointment booking with date and time selection.
- Patient appointment management, including rescheduling and cancellation.
- Doctor availability setup.
- Doctor appointment management with remarks and status updates.
- Session management using JSON Web Tokens (JWT).
- Responsive design for various screen sizes.
- Users can sign up as doctors or patients.
- Passwords are securely encrypted and stored in the MongoDB database.
- Doctors need to enter a purchase code (e.g., 1111-2222-3333-4444) to create their profiles.
- A common sign-in page checks user credentials and redirects them to their respective dashboards.
-
Patients can book appointments with available doctors.
-
Date picker displays available dates for selected doctors.
-
Time slots are shown for selected dates.
-
Patients provide required details and book appointments.
-
Patients can view and manage their booked appointments in their dashboard.
-
Options to reschedule or cancel appointments are available.
- Doctors are prompted to enter their availability dates and times during their first sign-in.
- Doctors can check their appointments by selecting dates.
- They can open appointments to view details, add remarks, and mark them as complete.
- JSON Web Tokens (JWT) are used to monitor user sessions.
- Tokens expire, and users are automatically logged out when expired.
- Middleware ensures route protection, redirecting unauthorized users to the login page.
-
Frontend:
- React
- Bootstrap
-
Backend:
- Node.js
- Express
- MongoDB
- Mongoose
- Bcrypt.js
- JSON Web Tokens (JWT)
To run this application locally, follow these steps:
-
Clone the repository:
git clone https://github.com/renish47/BookMyDoc.git cd BookMyDoc -
Install dependencies for the client and server:
# Install client-side dependencies cd appointment-booking-fe npm install # Install server-side dependencies cd ../appointment-booking-be npm install
-
Create a
.envfile in theserverdirectory and configure your environment variables:PORT=3001 MONGODB_URI=your-mongodb-uri JWT_SECRET=your-jwt-secret
-
Start the server:
# From the 'appointment-booking-be' directory npm start -
Start the client:
# From the 'client' directory npm start
Now, the application should be running locally on http://localhost:3000.
- Sign up as a doctor or a patient.
- Use the purchase code (1111-2222-3333-4444) for doctor registration (demo purpose only).
- Sign in with your credentials.
- Doctors should set their availability to appear in the patient's list.
- Patients can book appointments with available doctors.
- Manage appointments in your dashboard.
- Ensure secure session management with JWT.
- Enjoy the responsive design on various screen sizes.
- Implement functionality for doctors to cancel appointments or block specific time slots or dates.
- Refine the logic for managing dates and time slots on the client and server sides.




