Skip to content

Gauravdub-git/Doctor_Appointment_System

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Doctor Appointment System

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.

πŸ₯ Overview

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.

πŸš€ Features

Patient Portal (Frontend)

  • 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

Admin Panel

  • 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

Backend API

  • 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

πŸ› οΈ Technology Stack

Frontend & Admin Panel

  • 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

Backend

  • 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

Payment Integration

  • Stripe: International payment processing
  • Razorpay: Indian payment gateway

πŸ“ Project Structure

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

🚦 Getting Started

Prerequisites

  • Node.js (v14 or higher)
  • MongoDB database
  • Cloudinary account (for image storage)
  • Stripe account (for payments)
  • Razorpay account (for Indian payments)

Installation

  1. Clone the repository

    git clone https://github.com/Gauravdub-git/Doctor_Appointment_System.git
    cd Doctor_Appointment_System
  2. Backend Setup

    cd backend
    npm install

    Create a .env file 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
  3. Frontend Setup

    cd ../frontend
    npm install

    Create a .env file in the frontend directory:

    VITE_BACKEND_URL=http://localhost:5000
  4. Admin Panel Setup

    cd ../admin
    npm install

    Create a .env file in the admin directory:

    VITE_BACKEND_URL=http://localhost:5000

Running the Application

  1. Start the Backend Server

    cd backend
    npm run server  # For development with nodemon
    # or
    npm start      # For production
  2. Start the Frontend Application

    cd frontend
    npm run dev
  3. 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

πŸ“± Usage

For Patients

  1. Register or log in to your account
  2. Browse available doctors by specialty
  3. Select a doctor and available time slot
  4. Complete the booking with secure payment
  5. Manage your appointments from the dashboard

For Administrators

  1. Access the admin panel with admin credentials
  2. Manage doctor profiles and availability
  3. Monitor appointment bookings and cancellations
  4. Handle user accounts and system settings
  5. View analytics and system reports

πŸ”§ API Endpoints

Authentication

  • POST /api/auth/register - User registration
  • POST /api/auth/login - User login
  • POST /api/auth/verify - Email verification

Appointments

  • GET /api/appointments - Get user appointments
  • POST /api/appointments/book - Book new appointment
  • PUT /api/appointments/:id - Update appointment
  • DELETE /api/appointments/:id - Cancel appointment

Doctors

  • GET /api/doctors - Get all doctors
  • GET /api/doctors/:id - Get doctor details
  • POST /api/doctors - Add new doctor (admin only)

Users

  • GET /api/users/profile - Get user profile
  • PUT /api/users/profile - Update user profile

🀝 Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

πŸ“„ License

This project is licensed under the ISC License.

πŸ‘¨β€πŸ’» Author

Gaurav - Gauravdub-git

πŸ™ Acknowledgments

  • 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

πŸ“ž Support

If you encounter any issues or have questions, please:

  1. Check the existing issues on GitHub
  2. Create a new issue with detailed information
  3. 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.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages