A full-stack Doctor Appointment Booking Application built using the MERN Stack (MongoDB, Express.js, React.js, Node.js).
The application provides separate dashboards and functionalities for Patients, Doctors, and Administrators. Users can book appointments, doctors can manage appointments and earnings, and admins can manage doctors and appointments. The application also supports secure online payments using Razorpay and image uploads using Cloudinary.
https://go-doctor-one.vercel.app
https://go-doctor-faht.vercel.app
https://go-doctor-server.vercel.app
Email: admin@example.com
Password: ********
- User Registration & Login
- JWT Authentication
- Browse Doctors by Speciality
- View Doctor Details
- Book Appointments
- Cancel Appointments
- View Appointment History
- Update Profile Information
- Upload Profile Image
- Online Payment using Razorpay
- Doctor Login
- Manage Appointments
- Mark Appointments as Completed
- Cancel Appointments
- View Dashboard Statistics
- View Earnings
- Manage Availability Status
- Update Profile Information
- Admin Login
- Add New Doctors
- Upload Doctor Images
- Manage Doctor Availability
- View All Doctors
- View All Appointments
- Cancel Appointments
- Dashboard Analytics
- Razorpay Payment Gateway
- Secure Payment Verification
- Payment Status Tracking
- Automatic Appointment Payment Updates
- MongoDB Atlas
- Cloudinary Image Storage
- React.js
- React Router DOM
- Tailwind CSS
- Axios
- React Toastify
- Vite
- Node.js
- Express.js
- MongoDB Atlas
- Mongoose
- JWT Authentication
- Bcrypt.js
- Multer
- Cloudinary
- Razorpay
Doctor-Appointment-System/
β
βββ frontend/ # User Frontend
β βββ src/
β βββ public/
β βββ package.json
β
βββ admin/ # Admin + Doctor Panel
β βββ src/
β βββ public/
β βββ package.json
β
βββ backend/
β βββ config/
β βββ controllers/
β βββ middleware/
β βββ models/
β βββ routes/
β βββ uploads/
β βββ server.js
β βββ package.json
β
βββ README.mdBefore running the project, make sure you have:
- Node.js (v18+ recommended)
- npm
- MongoDB Atlas Account
- Cloudinary Account
- Razorpay Account
- Git
Verify installation:
node -v
npm -v
git --versiongit clone https://github.com/YOUR_USERNAME/doctor-appointment-booking.git
cd doctor-appointment-bookingCreate a .env file inside the backend folder.
PORT=4000
MONGODB_URI=YOUR_MONGODB_CONNECTION_STRING
JWT_SECRET=YOUR_SECRET_KEY
ADMIN_EMAIL=admin@gmail.com
ADMIN_PASSWORD=admin123
CLOUDINARY_CLOUD_NAME=YOUR_CLOUD_NAME
CLOUDINARY_API_KEY=YOUR_API_KEY
CLOUDINARY_SECRET_KEY=YOUR_SECRET_KEY
RAZORPAY_KEY_ID=YOUR_RAZORPAY_KEY_ID
RAZORPAY_KEY_SECRET=YOUR_RAZORPAY_SECRET
CURRENCY=INRcd backend
npm installcd frontend
npm installcd admin
npm installOpen three terminals.
cd backend
npm run serveror
npm startServer:
http://localhost:4000cd frontend
npm run devFrontend:
http://localhost:5173cd admin
npm run devAdmin Panel:
http://localhost:5174- Create MongoDB Atlas Account.
- Create a Cluster.
- Create Database User.
- Whitelist IP Address.
- Copy Connection String.
- Add Connection String in:
MONGODB_URI=- Create Cloudinary Account.
- Go to Dashboard.
- Copy:
Cloud Name
API Key
API Secret
- Add them to
.env.
- Create Razorpay Account.
- Open Dashboard.
- Generate API Keys.
- Add keys to
.env.
RAZORPAY_KEY_ID=
RAZORPAY_KEY_SECRET=The project uses:
- JWT Authentication
- Password Hashing with Bcrypt
- Role-Based Authorization
| Role | Access |
|---|---|
| User | Book Appointments |
| Doctor | Manage Appointments |
| Admin | Manage Entire Platform |
POST /api/admin/login
POST /api/admin/addDoctor
GET /api/admin/allDoctors
POST /api/admin/changeAvailability
GET /api/admin/dashboard
GET /api/admin/appointmentsPOST /api/user/register
POST /api/user/login
GET /api/user/getProfile
POST /api/user/updateProfile
POST /api/user/bookAppointment
GET /api/user/appointments
POST /api/user/cancelAppointment
POST /api/user/paymentRazorpay
POST /api/user/verifyRazorpayPOST /api/doctor/login
GET /api/doctor/appointments
POST /api/doctor/completeAppointment
POST /api/doctor/cancelAppointment
GET /api/doctor/dashboard
GET /api/doctor/profile
POST /api/doctor/updateProfileRegister
β
Login
β
Select Doctor
β
Book Appointment
β
Pay Online
β
View Appointment
Login
β
View Appointments
β
Complete Appointment
β
Check Earnings
Login
β
Add Doctor
β
Manage Doctors
β
View Appointments
β
Dashboard Analytics
- Stripe Integration
- Email Notifications
- SMS Reminders
- Video Consultation
- Prescription Management
- Patient Medical Records
- Doctor Ratings & Reviews
- Real-Time Chat
- Appointment Rescheduling
- Fork the repository
- Create a feature branch
git checkout -b feature-name- Commit changes
git commit -m "Added feature"- Push branch
git push origin feature-name- Create Pull Request
This project is licensed under the MIT License.
Vaibhav Patil
GitHub: https://github.com/VPatil3155
β If you found this project useful, please give it a star on GitHub.