Skip to content

UMAR010FAROOQ/appointment-project

Repository files navigation

Medical Appointment Booking System 🏥

Python Django Channels Celery License

A full-stack medical appointment booking platform built with Django — featuring real-time booking status updates via WebSocket, Celery background tasks, JazzCash payment integration, social authentication, and dual-role dashboards for patients and doctors.


📸 Screenshots

🏠 Home Page

Home

🩺 Healthcare Listing

Healthcare

📅 Book Appointment

Booking

💳 Checkout & Payment

Checkout Checkout

✅ User Appointments Dashboard

User Appointments

👨‍⚕️ Doctor Dashboard

Doctor Dashboard

🗓️ Doctor Available Timings

Available Timings

📋 Doctor Appointment Management

Doctor Appointments

🔑 Login

Login

🔓 Register

Register

✨ Features

👤 Patient (User) Side

  • ✅ User registration & login
  • 🔐 Password reset via email
  • 🌐 Google / Social authentication
  • 🩺 Browse doctors by specialty (Healthcare, Beauty, Personal Trainer)
  • 📅 Book appointments with available time slots
  • 💳 JazzCash payment gateway integration
  • 📊 Personal appointments dashboard
  • ♻️ Cancel appointments
  • 👤 Profile settings & password change

👨‍⚕️ Doctor (Instructor) Side

  • 🔐 Separate instructor login & registration
  • 📊 Instructor dashboard
  • 🗓️ Manage available timings
  • 📋 View & manage patient appointments
  • ✅ Confirm / cancel appointments (live via WebSocket)
  • 👤 Profile info & settings management

⚙️ Technical Features

  • ⚡ Real-time booking status updates (Django Channels + WebSocket)
  • 📧 Background email notifications (Celery + Redis)
  • ⏰ Scheduled reminder tasks (Celery Beat)
  • 🔔 Django Signals for automated triggers
  • 🛡️ reCAPTCHA form protection
  • 🌐 Social auth pipeline (Google login)
  • 🎨 Bootstrap-based responsive UI

⚙️ Tech Stack

Category Technology
Backend Django 5.0
Real-time Django Channels, WebSocket, Daphne (ASGI)
Background Tasks Celery 5.4, Celery Beat
Message Broker Redis
Database SQLite (dev) / MySQL (prod)
Authentication Django Auth, SimpleJWT, Social Auth (Google)
Payment JazzCash Payment Gateway
Frontend Bootstrap 5, HTML, CSS, JavaScript
Forms Django Crispy Forms, reCAPTCHA
Email Django Email + Celery async delivery

🏗️ Project Structure

appointment-project/
│
├── appointBooking/            # Core booking logic
│   ├── consumers.py           # WebSocket consumers (real-time updates)
│   ├── routing.py             # WebSocket URL routing
│   ├── signals.py             # Django signals (auto-triggers)
│   ├── tasks.py               # Celery background tasks
│   ├── models.py              # Appointment models
│   ├── views.py               # Booking views
│   └── templates/             # Booking HTML templates
│
├── authentication/            # Auth system
│   ├── backends.py            # Custom authentication backends
│   ├── pipeline.py            # Social auth pipeline (Google)
│   ├── views.py               # Login / Register / Password reset
│   └── templates/             # Auth HTML templates
│
├── core/                      # Patient-facing app
│   ├── views.py               # Home, healthcare listing, user dashboard
│   ├── decorators.py          # Custom access decorators
│   └── templates/             # Patient UI templates
│
├── instructors/               # Doctor dashboard app
│   ├── views.py               # Doctor dashboard, timings, appointments
│   ├── decorators.py          # Doctor-only access control
│   └── templates/             # Doctor UI templates
│
├── appointment/               # Django project config
│   ├── settings.py            # Settings (dev/prod)
│   ├── celery.py              # Celery app configuration
│   ├── asgi.py                # ASGI config (WebSocket + HTTP)
│   └── urls.py                # Root URL configuration
│
├── static/                    # CSS, JS, images
├── media/                     # User uploaded files
├── templates/                 # Base templates
├── .env.example               # Environment variables template
├── requirements.txt           # Python dependencies
└── manage.py

---

## 🚀 Local Setup

### 1. Clone & Install

```bash
git clone https://github.com/UMAR010FAROOQ/appointment-project.git
cd appointment-project
pip install -r requirements.txt

2. Configure Environment

cp .env.example .env
# Edit .env with your DB, Redis, and email credentials

3. Run Migrations

python manage.py migrate
python manage.py createsuperuser

4. Start Redis (required for Celery + WebSocket)

redis-server

5. Start Celery Worker

celery -A appointment worker --loglevel=info

6. Start Celery Beat (scheduled tasks)

celery -A appointment beat --loglevel=info

7. Run Development Server

python manage.py runserver

🔄 How Real-time Updates Work

Doctor confirms appointment ↓ Django Signal fires ↓ WebSocket message sent via Django Channels ↓ Patient's browser receives live status update ↓ No page refresh needed ✅


📧 Background Task Flow

Appointment booked ↓ Celery task queued in Redis ↓ Email confirmation sent to patient (async) ↓ Celery Beat triggers reminder 24hrs before appointment


👥 User Roles

Role Access
Patient Browse doctors, book, pay, manage appointments
Doctor Manage availability, confirm/cancel appointments
Admin Full Django admin access

👨‍💻 Author

Umar Farooq — Backend Developer (Django / DRF)

LinkedIn GitHub

About

Full-stack medical appointment booking system — Django, WebSocket, Celery, JazzCash payments, social auth, real-time updates

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors