A comprehensive full-stack web application for managing doctor appointments with separate interfaces for patients, doctors, and administrators. Built with modern web technologies including React, Node.js, and MongoDB.
The Doctor Appointment System is designed to streamline the process of booking, managing, and tracking medical appointments. It provides a seamless experience for patients to find and book appointments with healthcare providers while giving administrators and doctors powerful tools to manage their practice.
- User Registration & Authentication: Secure login and signup functionality
- Doctor Discovery: Browse and search for doctors by specialty
- Appointment Booking: Schedule appointments with available doctors
- Appointment Management: View, reschedule, or cancel existing appointments
- Profile Management: Update personal information and preferences
- Payment Integration: Secure payment processing with Stripe and Razorpay
- Responsive Design: Mobile-friendly interface built with Tailwind CSS
- Dashboard: Overview of system statistics and key metrics
- Doctor Management: Add, edit, and manage doctor profiles
- Appointment Oversight: Monitor and manage all appointments
- User Management: Oversee patient registrations and accounts
- Analytics: Track system usage and performance metrics
- RESTful API: Well-structured API endpoints for all operations
- Authentication & Authorization: JWT-based secure authentication
- Database Management: MongoDB integration with Mongoose ODM
- File Upload: Image handling with Cloudinary integration
- Payment Processing: Integration with multiple payment gateways
- Email Verification: Account verification system
- React 18: Modern React with hooks and functional components
- Vite: Fast build tool and development server
- React Router DOM: Client-side routing
- Axios: HTTP client for API communications
- React Toastify: User notifications and alerts
- Tailwind CSS: Utility-first CSS framework
- ESLint: Code linting and quality assurance
- Node.js: JavaScript runtime environment
- Express.js: Web application framework
- MongoDB: NoSQL database
- Mongoose: MongoDB object modeling
- JWT: JSON Web Tokens for authentication
- Bcrypt: Password hashing
- Multer: File upload handling
- Cloudinary: Cloud-based image management
- CORS: Cross-origin resource sharing
- Nodemon: Development server with auto-restart
- Stripe: International payment processing
- Razorpay: Indian payment gateway
Doctor_Appointment_System/
βββ frontend/ # Patient-facing React application
β βββ src/
β β βββ components/ # Reusable UI components
β β β βββ Banner.jsx
β β β βββ Footer.jsx
β β β βββ Header.jsx
β β β βββ Navbar.jsx
β β β βββ RelatedDoctors.jsx
β β β βββ SpecialityMenu.jsx
β β β βββ TopDoctors.jsx
β β βββ pages/ # Application pages
β β β βββ About.jsx
β β β βββ Appointment.jsx
β β β βββ Contact.jsx
β β β βββ Doctors.jsx
β β β βββ Home.jsx
β β β βββ Login.jsx
β β β βββ MyAppointments.jsx
β β β βββ MyProfile.jsx
β β β βββ Verify.jsx
β β βββ context/ # React context for state management
β β βββ assets/ # Static assets
β β βββ App.jsx # Main application component
β β βββ main.jsx # Application entry point
β βββ package.json
β βββ vite.config.js
β
βββ admin/ # Admin panel React application
β βββ src/
β β βββ components/ # Admin UI components
β β β βββ Navbar.jsx
β β β βββ Sidebar.jsx
β β βββ pages/ # Admin pages
β β β βββ Admin/
β β β βββ Doctor/
β β β βββ Login.jsx
β β βββ context/ # Admin context management
β β βββ assets/ # Admin assets
β β βββ App.jsx
β β βββ main.jsx
β βββ package.json
β βββ vite.config.js
β
βββ backend/ # Node.js Express API
βββ config/ # Database and service configurations
βββ controllers/ # Business logic controllers
βββ middleware/ # Custom middleware functions
βββ models/ # Database models
β βββ appointmentModel.js
β βββ doctorModel.js
β βββ userModel.js
βββ routes/ # API route definitions
βββ server.js # Main server file
βββ package.json
- Node.js (v14 or higher)
- MongoDB database
- Cloudinary account (for image storage)
- Stripe account (for payments)
- Razorpay account (for Indian payments)
-
Clone the repository
git clone https://github.com/Gauravdub-git/Doctor_Appointment_System.git cd Doctor_Appointment_System -
Backend Setup
cd backend npm installCreate a
.envfile in the backend directory:PORT=5000 MONGODB_URI=your_mongodb_connection_string JWT_SECRET=your_jwt_secret_key CLOUDINARY_CLOUD_NAME=your_cloudinary_cloud_name CLOUDINARY_API_KEY=your_cloudinary_api_key CLOUDINARY_API_SECRET=your_cloudinary_api_secret STRIPE_SECRET_KEY=your_stripe_secret_key RAZORPAY_KEY_ID=your_razorpay_key_id RAZORPAY_KEY_SECRET=your_razorpay_key_secret
-
Frontend Setup
cd ../frontend npm installCreate a
.envfile in the frontend directory:VITE_BACKEND_URL=http://localhost:5000
-
Admin Panel Setup
cd ../admin npm installCreate a
.envfile in the admin directory:VITE_BACKEND_URL=http://localhost:5000
-
Start the Backend Server
cd backend npm run server # For development with nodemon # or npm start # For production
-
Start the Frontend Application
cd frontend npm run dev -
Start the Admin Panel
cd admin npm run dev
The applications will be available at:
- Frontend:
http://localhost:5173 - Admin Panel:
http://localhost:5174 - Backend API:
http://localhost:5000
- Register or log in to your account
- Browse available doctors by specialty
- Select a doctor and available time slot
- Complete the booking with secure payment
- Manage your appointments from the dashboard
- Access the admin panel with admin credentials
- Manage doctor profiles and availability
- Monitor appointment bookings and cancellations
- Handle user accounts and system settings
- View analytics and system reports
POST /api/auth/register- User registrationPOST /api/auth/login- User loginPOST /api/auth/verify- Email verification
GET /api/appointments- Get user appointmentsPOST /api/appointments/book- Book new appointmentPUT /api/appointments/:id- Update appointmentDELETE /api/appointments/:id- Cancel appointment
GET /api/doctors- Get all doctorsGET /api/doctors/:id- Get doctor detailsPOST /api/doctors- Add new doctor (admin only)
GET /api/users/profile- Get user profilePUT /api/users/profile- Update user profile
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the ISC License.
Gaurav - Gauravdub-git
- React and Vite communities for excellent development tools
- MongoDB for reliable database solutions
- Tailwind CSS for beautiful, responsive designs
- All contributors and users of this system
If you encounter any issues or have questions, please:
- Check the existing issues on GitHub
- Create a new issue with detailed information
- Contact the maintainers
Note: Make sure to configure all environment variables properly before running the application. Refer to the .env.example files in each directory for required variables.