# jay26072/doctor-appointment-system architecture

> Architecture diagram of the GitHub repository jay26072/doctor-appointment-system, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-05). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/jay26072/doctor-appointment-system
- Repository: https://github.com/jay26072/doctor-appointment-system

## Overview

This is a Flask/MySQL clinic appointment management system. Patients register, browse clinics and doctors, request appointments, then view clinic decisions and scheduled visits; clinic staff manage appointments and continue care through cases and prescriptions. Admins manage clinics, cities, patients and fees. The README documents these capabilities and the workflow, while the sampled app.py excerpts confirm database-backed profile and city/patient operations. The application is a monolith, so domain nodes share app.py; templates are described but absent from the supplied tree. Most frontend libraries are bundled assets, with their use by templates unverified.

Main entry points: [`app.py`](https://github.com/jay26072/doctor-appointment-system/blob/main/app.py) (Patient cases), [`static/uploads`](https://github.com/jay26072/doctor-appointment-system/tree/main/static/uploads) (Uploaded images)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Access and discovery"]
  node_registration["Patient registration<br/>[app.py]"]
  node_authentication["Role login<br/>[app.py]"]
  node_clinic_discovery["Clinic discovery<br/>[app.py]"]
end

subgraph group_admin["Administration"]
  node_admin_operations["Admin management<br/>[app.py]"]
  node_clinic_management["Clinic management<br/>[app.py]"]
  node_doctor_fees["Doctors and fees<br/>[app.py]"]
end

subgraph group_appointments["Appointments"]
  node_appointment_request["Appointment request<br/>[app.py]"]
  node_clinic_decision["Clinic decision<br/>[app.py]"]
  node_appointment_view["Appointment view<br/>[app.py]"]
end

subgraph group_care["Clinical records"]
  node_case_management["Patient cases<br/>[app.py]"]
  node_prescriptions["Prescriptions<br/>[app.py]"]
end

subgraph group_platform["Persistence and assets"]
  node_mysql[("MySQL doctor DB")]
  node_uploads["Uploaded images"]
  node_smtp["Gmail SMTP"]
  node_admin_ui_assets["Admin UI libraries"]
  node_browser_assets["Browser scripts"]
end

node_patient(("Patient"))
node_clinic_staff(("Clinic staff"))
node_admin_user(("Administrator"))

node_patient -->|"registers"| node_registration
node_patient -->|"logs in"| node_authentication
node_clinic_staff -->|"logs in"| node_authentication
node_admin_user -->|"logs in"| node_authentication
node_patient -->|"browses"| node_clinic_discovery
node_admin_user -->|"manages"| node_admin_operations
node_admin_user -->|"manages"| node_clinic_management
node_clinic_staff -->|"manages"| node_doctor_fees
node_patient -->|"requests"| node_appointment_request
node_clinic_staff -->|"accepts or rejects"| node_clinic_decision
node_patient -->|"views"| node_appointment_view
node_clinic_staff -->|"manages"| node_case_management
node_clinic_staff -->|"adds"| node_prescriptions
node_patient -->|"views"| node_case_management
node_patient -->|"views"| node_prescriptions
node_registration -.->|"stores records"| node_mysql
node_admin_operations -->|"reads and writes"| node_mysql
node_clinic_management -.->|"stores records"| node_mysql
node_doctor_fees -.->|"stores records"| node_mysql
node_appointment_request -.->|"stores request"| node_mysql
node_clinic_decision -.->|"updates status"| node_mysql
node_appointment_view -.->|"reads appointments"| node_mysql
node_case_management -.->|"stores cases"| node_mysql
node_prescriptions -.->|"stores prescriptions"| node_mysql
node_registration -.->|"emails credentials"| node_smtp
node_clinic_management -.->|"saves clinic images"| node_uploads
node_case_management -.->|"saves prescription images"| node_uploads

click node_registration "https://github.com/jay26072/doctor-appointment-system/blob/main/app.py"
click node_authentication "https://github.com/jay26072/doctor-appointment-system/blob/main/app.py"
click node_clinic_discovery "https://github.com/jay26072/doctor-appointment-system/blob/main/app.py"
click node_admin_operations "https://github.com/jay26072/doctor-appointment-system/blob/main/app.py"
click node_clinic_management "https://github.com/jay26072/doctor-appointment-system/blob/main/app.py"
click node_doctor_fees "https://github.com/jay26072/doctor-appointment-system/blob/main/app.py"
click node_appointment_request "https://github.com/jay26072/doctor-appointment-system/blob/main/app.py"
click node_clinic_decision "https://github.com/jay26072/doctor-appointment-system/blob/main/app.py"
click node_appointment_view "https://github.com/jay26072/doctor-appointment-system/blob/main/app.py"
click node_case_management "https://github.com/jay26072/doctor-appointment-system/blob/main/app.py"
click node_prescriptions "https://github.com/jay26072/doctor-appointment-system/blob/main/app.py"
click node_uploads "https://github.com/jay26072/doctor-appointment-system/tree/main/static/uploads"
click node_admin_ui_assets "https://github.com/jay26072/doctor-appointment-system/tree/main/static/adminpanel/plugins"
click node_browser_assets "https://github.com/jay26072/doctor-appointment-system/tree/main/static/js"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_registration,node_authentication,node_clinic_discovery toneBlue
class node_admin_operations,node_clinic_management,node_doctor_fees toneAmber
class node_appointment_request,node_clinic_decision,node_appointment_view toneMint
class node_case_management,node_prescriptions toneRose
class node_mysql,node_uploads,node_smtp,node_admin_ui_assets,node_browser_assets,node_patient,node_clinic_staff,node_admin_user toneIndigo
```

## Components

### Access and discovery

- [Patient registration](https://github.com/jay26072/doctor-appointment-system/blob/main/app.py): `app.py`
- [Role login](https://github.com/jay26072/doctor-appointment-system/blob/main/app.py): `app.py`
- [Clinic discovery](https://github.com/jay26072/doctor-appointment-system/blob/main/app.py): `app.py`

### Administration

- [Admin management](https://github.com/jay26072/doctor-appointment-system/blob/main/app.py): `app.py`
- [Clinic management](https://github.com/jay26072/doctor-appointment-system/blob/main/app.py): `app.py`
- [Doctors and fees](https://github.com/jay26072/doctor-appointment-system/blob/main/app.py): `app.py`

### Appointments

- [Appointment request](https://github.com/jay26072/doctor-appointment-system/blob/main/app.py): `app.py`
- [Clinic decision](https://github.com/jay26072/doctor-appointment-system/blob/main/app.py): `app.py`
- [Appointment view](https://github.com/jay26072/doctor-appointment-system/blob/main/app.py): `app.py`

### Clinical records

- [Patient cases](https://github.com/jay26072/doctor-appointment-system/blob/main/app.py): `app.py`
- [Prescriptions](https://github.com/jay26072/doctor-appointment-system/blob/main/app.py): `app.py`

### Persistence and assets

- **MySQL doctor DB**
- [Uploaded images](https://github.com/jay26072/doctor-appointment-system/tree/main/static/uploads): `static/uploads`
- **Gmail SMTP**
- [Admin UI libraries](https://github.com/jay26072/doctor-appointment-system/tree/main/static/adminpanel/plugins): `static/adminpanel/plugins`
- [Browser scripts](https://github.com/jay26072/doctor-appointment-system/tree/main/static/js): `static/js`

### Other components

- **Patient**
- **Clinic staff**
- **Administrator**

## Connections

- Patient → Patient registration: registers
- Patient → Role login: logs in
- Clinic staff → Role login: logs in
- Administrator → Role login: logs in
- Patient → Clinic discovery: browses
- Administrator → Admin management: manages
- Administrator → Clinic management: manages
- Clinic staff → Doctors and fees: manages
- Patient → Appointment request: requests
- Clinic staff → Clinic decision: accepts or rejects
- Patient → Appointment view: views
- Clinic staff → Patient cases: manages
- Clinic staff → Prescriptions: adds
- Patient → Patient cases: views
- Patient → Prescriptions: views
- Patient registration → MySQL doctor DB: stores records
- Admin management → MySQL doctor DB: reads and writes (evidence: `app.py`)
- Clinic management → MySQL doctor DB: stores records
- Doctors and fees → MySQL doctor DB: stores records
- Appointment request → MySQL doctor DB: stores request
- Clinic decision → MySQL doctor DB: updates status
- Appointment view → MySQL doctor DB: reads appointments
- Patient cases → MySQL doctor DB: stores cases
- Prescriptions → MySQL doctor DB: stores prescriptions
- Patient registration → Gmail SMTP: emails credentials
- Clinic management → Uploaded images: saves clinic images
- Patient cases → Uploaded images: saves prescription images
