Skip to content

Latest commit

Β 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🩺 Doctor Appointment System



Python Flask SQLite Email Admin Authentication License


πŸ₯ Overview

The Doctor Appointment System is a complete backend web application developed using Flask and SQLite that simplifies appointment scheduling between patients and doctors.

The system provides secure authentication, appointment management, role-based access, an administrative dashboard, and automated email notifications for every appointment lifecycle.

It demonstrates practical backend engineering concepts including database design, authentication, CRUD operations, email integration, and role-based authorization.


✨ Key Features

πŸ‘€ Authentication

  • Secure User Registration
  • User Login
  • Logout Functionality
  • Session Management
  • Password Authentication

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

  • Doctor Profiles
  • Medical Specializations
  • Doctor Availability
  • Appointment Schedule

πŸ§‘β€πŸ€β€πŸ§‘ Patient Features

  • Browse Doctors
  • Book Appointment
  • View Appointment History
  • Cancel Appointment
  • Appointment Status Tracking

πŸ“… Appointment Management

  • Create Appointment
  • View Appointment
  • Update Appointment
  • Cancel Appointment
  • Appointment Approval Workflow
  • Rejection Workflow
  • Status Management

πŸ‘¨β€πŸ’Ό Admin Dashboard

The administrator has complete control over the system.

User Management

βœ… View Users

βœ… Manage Patients

βœ… Manage Doctors

βœ… Remove Users


Appointment Management

βœ… View All Appointments

βœ… Approve Appointment

βœ… Reject Appointment

βœ… Cancel Appointment

βœ… Track Appointment Status


πŸ“§ Email Notification System

The application automatically sends email notifications for:

πŸ“© Appointment Booking

πŸ“© Appointment Approval

πŸ“© Appointment Rejection

πŸ“© Appointment Cancellation

Supports:

  • Gmail SMTP
  • Local Debug SMTP
  • Production SMTP Server

πŸ›‘ Security Features

  • User Authentication
  • Session Protection
  • Role-Based Access Control
  • Admin Authorization
  • Input Validation
  • Secure Form Handling

πŸ— Tech Stack

Category Technologies
Backend Flask
Language Python
Database SQLite
ORM SQLAlchemy
Forms Flask-WTF
Email Flask-Mail
Authentication Flask Login
Frontend HTML5, CSS3, Bootstrap
Templates Jinja2

πŸ“‚ Project Structure

doctor-appointment-system/
β”‚
β”œβ”€β”€ app.py
β”œβ”€β”€ models.py
β”œβ”€β”€ forms.py
β”œβ”€β”€ routes.py
β”œβ”€β”€ email_utils.py
β”œβ”€β”€ requirements.txt
β”‚
β”œβ”€β”€ templates/
β”‚   β”œβ”€β”€ admin/
β”‚   β”œβ”€β”€ patient/
β”‚   β”œβ”€β”€ doctor/
β”‚   └── auth/
β”‚
β”œβ”€β”€ static/
β”‚
β”œβ”€β”€ instance/
β”‚   └── database.db
β”‚
└── README.md

πŸš€ Quick Start

Create Virtual Environment

python -m venv venv

Windows

venv\Scripts\activate

Linux / macOS

source venv/bin/activate

Install Dependencies

pip install -r requirements.txt

Debug SMTP Server

python -m smtpd -c DebuggingServer -n localhost:8025

Initialize Database

flask --app app.py init-db

Run Application

flask --app app.py run

Application URL

http://127.0.0.1:5000

πŸ‘₯ Sample Accounts

πŸ‘¨β€πŸ’Ό Administrator

Email:
admin@example.com

Password:
password

πŸ§‘ Patient

Email:
patient@example.com

Password:
password

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

Email:
doc1@example.com

Password:
password

Specialization:
Cardiology

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

Email:
doc2@example.com

Password:
password

Specialization:
Dermatology

πŸ“§ Real SMTP Configuration

Configure environment variables

MAIL_SERVER=smtp.gmail.com
MAIL_PORT=587
MAIL_USE_TLS=True
MAIL_USERNAME=your@gmail.com
MAIL_PASSWORD=your_app_password
MAIL_DEFAULT_SENDER=your@gmail.com

βš™ Application Workflow

Patient Registration
        β”‚
        β–Ό
User Login
        β”‚
        β–Ό
Browse Doctors
        β”‚
        β–Ό
Book Appointment
        β”‚
        β–Ό
Appointment Stored
        β”‚
        β–Ό
Email Notification Sent
        β”‚
        β–Ό
Admin Reviews
        β”‚
        β–Ό
Approve / Reject
        β”‚
        β–Ό
Patient Receives Email

πŸ“Œ Future Enhancements

  • PostgreSQL Migration
  • REST API Integration
  • JWT Authentication
  • Doctor Availability Calendar
  • Payment Gateway Integration
  • Video Consultation
  • Prescription Upload
  • Medical Reports
  • SMS Notifications
  • Docker Deployment
  • CI/CD Pipeline
  • AWS Deployment
  • Redis Caching
  • Appointment Analytics Dashboard

🎯 Learning Outcomes

This project demonstrates practical experience with:

  • Flask Application Development
  • SQLAlchemy ORM
  • Authentication & Authorization
  • CRUD Operations
  • MVC Architecture
  • Database Design
  • Flask-Mail Integration
  • SMTP Configuration
  • Admin Dashboard Development
  • Session Management
  • Form Validation
  • Production Configuration
  • Backend System Design

πŸ’‘ What Makes This Project Stand Out?

Unlike a basic CRUD application, this project focuses on solving a real-world healthcare scheduling problem by implementing:

  • Multi-role authentication
  • Appointment lifecycle management
  • Automated email communication
  • Administrative control panel
  • Secure backend architecture
  • Clean and maintainable project structure

These features closely resemble patterns used in production-grade web applications.


πŸ‘¨β€πŸ’» About the Developer

Vishnu R

Python Backend Developer | Django Developer | Flask Developer

I enjoy designing backend systems that are clean, scalable, and practical. My primary focus is on building REST APIs, authentication systems, database-driven applications, and production-ready backend architectures using Python.

Through projects like this Doctor Appointment System, I have strengthened my understanding of backend development by implementing real-world workflows such as role-based access control, secure authentication, email automation, and complete CRUD operations.

I continuously explore better software engineering practices, modern backend technologies, and scalable system design to build applications that are reliable, maintainable, and ready for real-world deployment.


⭐ Thank You for Visiting!

If you found this project helpful or interesting, consider giving it a ⭐ on GitHub.

About

A Flask-based web application that allows patients to book appointments with doctors, while doctors can approve or reject requests. The system also includes an Admin Panel to manage users, doctors, and appointments.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages