A full-stack Doctor Appointment Management System built with the MERN Stack as part of the Advanced Database Management System (ADBMS) Mini Project.
HealthDesk is a web-based Doctor Appointment Management System that allows patients to book appointments with doctors, doctors to manage their schedules, and admins to oversee the entire system.
This project was built as a Mini Project for the Advanced Database Management System (ADBMS) lab, demonstrating core database concepts like CRUD operations, relationships, aggregation pipelines, and multi-document transactions.
- Register and login securely
- Browse available doctors
- Book appointment slots
- View and cancel appointments
- Login to personal dashboard
- View assigned appointments
- Update appointment status
- Add, update, delete doctors
- Manage all appointments
- View system statistics
| Technology | Purpose |
|---|---|
| React.js | UI Framework |
| Tailwind CSS | Styling |
| React Router | Navigation |
| Axios | API calls |
| Context API | State Management |
| Technology | Purpose |
|---|---|
| Node.js | Runtime Environment |
| Express.js | Web Framework |
| MongoDB Atlas | Cloud Database |
| Mongoose | ODM |
| JWT | Authentication |
| bcryptjs | Password Hashing |
healthdesk/
├── server/
│ ├── config/
│ │ └── db.js
│ ├── controllers/
│ │ ├── authController.js
│ │ ├── doctorController.js
│ │ ├── appointmentController.js
│ │ └── slotController.js
│ ├── middleware/
│ │ └── authMiddleware.js
│ ├── models/
│ │ ├── User.js
│ │ ├── Appointment.js
│ │ └── Slot.js
│ ├── routes/
│ │ ├── authRoutes.js
│ │ ├── doctorRoutes.js
│ │ ├── appointmentRoutes.js
│ │ └── slotRoutes.js
│ └── server.js
├── client/
│ └── src/
│ ├── components/
│ ├── context/
│ ├── pages/
│ └── App.jsx
└── README.md- Node.js v18+
- MongoDB Atlas account
- npm or yarn
1. Clone the repository
git clone https://github.com/YOUR_USERNAME/healthdesk.git
cd healthdesk2. Setup Backend
cd server
npm install3. Create .env file in /server
PORT=5000
MONGO_URI=mongodb+srv://username:password@cluster.mongodb.net/healthdesk
JWT_SECRET=your_jwt_secret_key4. Run Backend
npm run dev5. Setup Frontend
cd ../client
npm install
npm start| Method | Route | Description | Access |
|---|---|---|---|
| POST | /api/auth/register |
Register user | Public |
| POST | /api/auth/login |
Login user | Public |
| Method | Route | Description | Access |
|---|---|---|---|
| GET | /api/doctors |
Get all doctors | Public |
| POST | /api/doctors |
Add a doctor | Admin |
| PUT | /api/doctors/:id |
Update doctor | Admin |
| DELETE | /api/doctors/:id |
Delete doctor | Admin |
| Method | Route | Description | Access |
|---|---|---|---|
| GET | /api/slots/:doctorId |
Get doctor slots | Public |
| POST | /api/slots |
Add a slot | Admin |
| Method | Route | Description | Access |
|---|---|---|---|
| GET | /api/appointments |
Get appointments | Private |
| POST | /api/appointments/book |
Book appointment | Patient |
| PUT | /api/appointments/:id |
Update status | Doctor/Admin |
| DELETE | /api/appointments/:id |
Cancel appointment | Patient |
{
"name": "String",
"email": "String",
"password": "String (hashed)",
"role": "admin | doctor | patient",
"phone": "String",
"gender": "male | female | other",
"specialization": "String (doctor only)",
"experience": "Number (doctor only)",
"fees": "Number (doctor only)"
}{
"patientId": "ObjectId → User",
"doctorId": "ObjectId → User",
"slotId": "ObjectId → Slot",
"status": "pending | confirmed | completed | cancelled",
"notes": "String"
}{
"doctorId": "ObjectId → User",
"date": "Date",
"time": "String",
"isBooked": "Boolean"
}This project is for educational purposes as part of ADBMS Mini Project.