Skip to content

Mishra-coder/Appointment-Booking-System

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

20 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ₯ Smart Appointment Booking System

React Node.js Express.js Prisma MySQL

College Group Project - A comprehensive web-based healthcare platform for managing medical appointments between patients, doctors, and administrators.

πŸ“‹ Table of Contents

🎯 Project Overview

The Smart Appointment Booking System is a modern, full-stack web application designed to revolutionize healthcare appointment management. This system provides a seamless experience for patients to book appointments, doctors to manage their schedules, and administrators to oversee the entire platform.

🎯 Problem Statement

Traditional appointment booking systems are often inefficient, leading to:

  • Long waiting times for patients
  • Poor communication between patients and doctors
  • Difficulty in managing schedules
  • Lack of digital prescription management

πŸ’‘ Our Solution

A comprehensive digital platform that:

  • Streamlines the appointment booking process
  • Provides role-based access for different user types
  • Enables digital prescription management
  • Offers real-time appointment tracking
  • Ensures secure user authentication

πŸ‘₯ College Project Information

πŸŽ“ Academic Details

  • Course: B.tech CSE & AI-ML
  • Project Type: Group Project (Full Stack Development)
  • Duration: 3 Months
  • Academic Year: 2025

πŸ‘¨β€πŸ’» Team Members

Name Role Responsibilities
Pratik Kumar Pan Frontend Developer React.js, UI/UX Design
Adarsh Priydarshi & Ayush Kumar Jha Backend Developer Node.js, API Development
Devendra Mishra Database Designer Prisma, MySQL Schema
Ayush Kumar Jha & Adarsh Priydarshi Project Manager Documentation, Testing

🎯 Learning Objectives

  • Master full-stack web development
  • Understand database design and relationships
  • Implement secure authentication systems
  • Learn API development and integration
  • Practice collaborative development using Git

✨ Key Features

πŸ” Authentication & Security

  • JWT-based secure authentication
  • Role-based access control (RBAC)
  • Password encryption using bcrypt
  • Protected routes and middleware

πŸ‘¨β€βš•οΈ Doctor Management

  • Personal dashboard with appointment overview
  • Availability slot management
  • Patient history access
  • Digital prescription creation
  • Appointment confirmation/rejection

πŸ‘€ Patient Management

  • Browse available doctors by specialization
  • Real-time slot availability checking
  • Easy appointment booking interface
  • Appointment history tracking
  • Prescription download functionality

πŸ§‘β€πŸ’Ό Admin Panel

  • User management (approve/suspend accounts)
  • System analytics and reporting
  • Doctor and patient oversight
  • Platform configuration settings

πŸ“… Appointment System

  • Three-stage appointment lifecycle:
    • 🟑 Pending - Newly booked appointments
    • 🟒 Confirmed - Doctor-approved appointments
    • βœ… Completed - Finished consultations with prescriptions
  • Automatic email notifications
  • Cancellation management

πŸ’Š Prescription Management

  • Digital prescription creation by doctors
  • Secure prescription storage
  • PDF download functionality for patients
  • Prescription history tracking

πŸ—οΈ Project Structure

πŸ“ Appointment-Booking-System/
β”œβ”€β”€ πŸ“ backend/                    # Node.js Backend Server
β”‚   β”œβ”€β”€ πŸ“ src/
β”‚   β”‚   β”œβ”€β”€ πŸ“ config/            # Database & app configuration
β”‚   β”‚   β”œβ”€β”€ πŸ“ controllers/       # Route handlers & business logic
β”‚   β”‚   β”œβ”€β”€ πŸ“ middlewares/       # Authentication & validation
β”‚   β”‚   β”œβ”€β”€ πŸ“ routes/           # API route definitions
β”‚   β”‚   β”œβ”€β”€ πŸ“ services/         # Business logic services
β”‚   β”‚   β”œβ”€β”€ πŸ“ utils/            # Utility functions
β”‚   β”‚   β”œβ”€β”€ πŸ“„ app.js            # Express app configuration
β”‚   β”‚   └── πŸ“„ server.js         # Server entry point
β”‚   β”œβ”€β”€ πŸ“ prisma/
β”‚   β”‚   β”œβ”€β”€ πŸ“ migrations/       # Database migrations
β”‚   β”‚   └── πŸ“„ schema.prisma     # Database schema definition
β”‚   β”œβ”€β”€ πŸ“„ package.json         # Backend dependencies
β”‚   β”œβ”€β”€ πŸ“„ .env                 # Environment variables
β”‚   └── πŸ“„ .env.example         # Environment template
β”‚
β”œβ”€β”€ πŸ“ frontend/                  # React.js Frontend Application
β”‚   β”œβ”€β”€ πŸ“ src/
β”‚   β”‚   β”œβ”€β”€ πŸ“ components/       # Reusable React components
β”‚   β”‚   β”œβ”€β”€ πŸ“ pages/           # Page components
β”‚   β”‚   β”œβ”€β”€ πŸ“ hooks/           # Custom React hooks
β”‚   β”‚   β”œβ”€β”€ πŸ“ context/         # React context providers
β”‚   β”‚   β”œβ”€β”€ πŸ“ utils/           # Frontend utilities
β”‚   β”‚   β”œβ”€β”€ πŸ“ assets/          # Images, icons, styles
β”‚   β”‚   └── πŸ“„ main.jsx         # React app entry point
β”‚   β”œβ”€β”€ πŸ“„ package.json         # Frontend dependencies
β”‚   β”œβ”€β”€ πŸ“„ vite.config.js       # Vite configuration
β”‚   └── πŸ“„ index.html           # HTML template
β”‚
β”œβ”€β”€ πŸ“„ README.md                 # Project documentation (this file)
β”œβ”€β”€ πŸ“„ idea.md                   # Project planning & ideas
└── πŸ“ .git/                    # Git version control

πŸ’» Tech Stack

🎨 Frontend

Technology Purpose Version
React UI Framework ^19.1.1
Vite Build Tool ^7.1.2
Axios HTTP Client ^1.12.2
React Router Routing ^7.9.1

βš™οΈ Backend

Technology Purpose Version
Node.js Runtime Environment Latest
Express Web Framework Latest
Prisma ORM ^6.16.3
JWT Authentication ^9.0.2
bcrypt Password Hashing ^6.0.0

πŸ—„οΈ Database

Technology Purpose
MySQL Primary Database
Prisma Database ORM

πŸ› οΈ Development Tools

Tool Purpose
Git Version Control
ESLint Code Linting
Nodemon Development Server

βš™οΈ Installation & Setup

πŸ“‹ Prerequisites

Before you begin, ensure you have the following installed on your system:

  • Node.js Node.js (v18 or higher)
  • npm npm (v8 or higher)
  • MySQL MySQL (v8 or higher)
  • Git Git (latest version)

πŸ”§ Step-by-Step Installation

1️⃣ Clone the Repository

# Clone the project repository
git clone https://github.com/your-username/Appointment-Booking-System.git

# Navigate to the project directory
cd Appointment-Booking-System

2️⃣ Backend Setup

# Navigate to backend directory
cd backend

# Install backend dependencies
npm install

# Create environment file from template
cp .env.example .env

3️⃣ Configure Environment Variables

Edit the .env file in the backend directory:

# Database Configuration
DATABASE_URL="mysql://username:password@localhost:3306/appointment_booking"

# JWT Secret (use a strong, random string)
JWT_SECRET="your-super-secret-jwt-key-here"

# Server Configuration
PORT=5000
NODE_ENV=development

# Email Configuration (optional)
EMAIL_HOST="smtp.gmail.com"
EMAIL_PORT=587
EMAIL_USER="your-email@gmail.com"
EMAIL_PASS="your-app-password"

4️⃣ Database Setup

# Generate Prisma client
npx prisma generate

# Run database migrations
npx prisma migrate dev

# (Optional) Seed the database with sample data
npx prisma db seed

5️⃣ Frontend Setup

# Navigate to frontend directory (from project root)
cd frontend

# Install frontend dependencies
npm install

πŸš€ How to Run

πŸ–₯️ Development Mode

πŸ”§ Start Backend Server

# In the backend directory
cd backend
npm run dev

The backend server will start on http://localhost:3000

🎨 Start Frontend Application

# In a new terminal, navigate to frontend directory
cd frontend
npm run dev

The frontend application will start on http://localhost:5173

🌐 Access the Application

πŸ—οΈ Production Build

Backend Production

cd backend
npm start

Frontend Production

cd frontend
npm run build
npm run preview

πŸ‘€ User Roles

πŸ‘¨β€βš•οΈ Doctor Role

Login Credentials: doctor@example.com / password123

Capabilities:

  • πŸ“… View and manage daily appointments
  • ⏰ Set availability slots
  • βœ… Confirm or reject appointment requests
  • πŸ’Š Create and manage prescriptions
  • πŸ‘₯ View patient history and details
  • πŸ“Š Access appointment analytics

πŸ‘€ Patient Role

Login Credentials: patient@example.com / password123

Capabilities:

  • πŸ” Browse doctors by specialization
  • πŸ“… View available appointment slots
  • πŸ“ Book new appointments
  • πŸ“‹ View appointment history
  • πŸ’Š Download prescriptions
  • ✏️ Update profile information

πŸ§‘β€πŸ’Ό Admin Role

Login Credentials: admin@example.com / password123

Capabilities:

  • πŸ‘₯ Manage all users (patients & doctors)
  • βœ… Approve or suspend user accounts
  • πŸ“Š View system analytics and reports
  • βš™οΈ Configure system settings
  • πŸ—„οΈ Manage database records
  • πŸ“§ Send system notifications

πŸ”— API Endpoints

πŸ” Authentication Routes

POST   /api/auth/register     # User registration
POST   /api/auth/login        # User login
POST   /api/auth/logout       # User logout
GET    /api/auth/profile      # Get user profile
PUT    /api/auth/profile      # Update user profile

πŸ‘¨β€βš•οΈ Doctor Routes

GET    /api/doctor/appointments     # Get doctor's appointments
POST   /api/doctor/slots           # Create availability slots
PUT    /api/doctor/slots/:id       # Update availability slot
DELETE /api/doctor/slots/:id       # Delete availability slot
POST   /api/doctor/prescription    # Create prescription
GET    /api/doctor/patients        # Get doctor's patients

πŸ‘€ Patient Routes

GET    /api/patient/doctors        # Get all doctors
GET    /api/patient/appointments   # Get patient's appointments
POST   /api/patient/book          # Book new appointment
PUT    /api/patient/appointments/:id # Update appointment
DELETE /api/patient/appointments/:id # Cancel appointment
GET    /api/patient/prescriptions  # Get patient's prescriptions

πŸ§‘β€πŸ’Ό Admin Routes

GET    /api/admin/users           # Get all users
PUT    /api/admin/users/:id       # Update user status
DELETE /api/admin/users/:id       # Delete user
GET    /api/admin/appointments    # Get all appointments
GET    /api/admin/analytics       # Get system analytics

πŸ“Š General Routes

GET    /api/specializations      # Get all medical specializations
GET    /api/appointments/:id     # Get specific appointment
PUT    /api/appointments/:id     # Update appointment status

πŸ“Έ Screenshots

🏠 Landing Page

Landing Page

πŸ” Login Page

Login Page

πŸ‘€ Patient Dashboard

Patient Dashboard

πŸ‘¨β€βš•οΈ Doctor Dashboard

Doctor Dashboard

πŸ§‘β€πŸ’Ό Admin Panel

Admin Panel

🀝 Contributing

We welcome contributions from all team members! Please follow these guidelines:

πŸ“ Development Workflow

  1. Create a new branch for your feature:

    git checkout -b feature/your-feature-name
  2. Make your changes and commit them:

    git add .
    git commit -m "Add: your descriptive commit message"
  3. Push to your branch:

    git push origin feature/your-feature-name
  4. Create a Pull Request on GitHub

πŸ“‹ Code Standards

  • Use meaningful variable and function names
  • Add comments for complex logic
  • Follow consistent indentation (2 spaces)
  • Test your code before committing
  • Update documentation when needed

πŸ› Bug Reports

If you find a bug, please create an issue with:

  • Clear description of the problem
  • Steps to reproduce
  • Expected vs actual behavior
  • Screenshots (if applicable)

πŸ“„ License

This project is created for educational purposes as part of our college coursework. All rights reserved to the team members.


πŸŽ“ Academic Submission Notes

πŸ“š Project Documentation

This project demonstrates our understanding of:

  • Full-stack web development principles
  • Database design and relationships
  • RESTful API development
  • User authentication and authorization
  • Frontend-backend integration
  • Version control with Git

πŸ† Key Achievements

  • βœ… Implemented secure user authentication
  • βœ… Created responsive user interfaces
  • βœ… Designed normalized database schema
  • βœ… Built RESTful API endpoints
  • βœ… Integrated frontend with backend
  • βœ… Implemented role-based access control

πŸ“ˆ Future Enhancements

  • πŸ“± Mobile application development
  • πŸ’³ Payment gateway integration
  • πŸ“§ Advanced email notification system
  • πŸ“Š Advanced analytics and reporting
  • πŸ”” Real-time notifications
  • 🌐 Multi-language support

🎯 Made with ❀️ by TheDevelopers.

⭐ If you found this project helpful, please give it a star!

GitHub stars GitHub forks

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages