# mizirjx/doctor-appointment-system architecture

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

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

## Overview

Edoc is a PHP/MySQL appointment-booking system for patients, doctors, and administrators. Patients register or sign in, find doctors and weekly sessions, and submit appointment requests; doctors review appointments and patient details, while administrators manage doctors, sessions, and patient records. The graph preserves these role-specific capabilities and the account-management features. Source excerpts show authentication, registration, database connection, and session creation; other role workflows are included from the README, so their internal call links are not inferred.

Main entry points: [`connection.php`](https://github.com/mizirjx/doctor-appointment-system/blob/main/connection.php) (Database Connection), [`doctor/index.php`](https://github.com/mizirjx/doctor-appointment-system/blob/main/doctor/index.php) (Doctor Dashboard), [`admin/index.php`](https://github.com/mizirjx/doctor-appointment-system/blob/main/admin/index.php) (Admin Dashboard), [`patient/index.php`](https://github.com/mizirjx/doctor-appointment-system/blob/main/patient/index.php) (Patient Dashboard)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Access and Accounts"]
  node_login["Sign In<br/>[login.php]"]
  node_signup["Create Account<br/>[create-account.php]"]
  node_logout["Sign Out<br/>[logout.php]"]
end

subgraph group_patient["Patient Booking"]
  node_patient_dashboard["Patient Dashboard<br/>[index.php]"]
  node_doctor_search["Find Doctors<br/>[doctors.php]"]
  node_patient_schedule["Browse Sessions<br/>[schedule.php]"]
  node_booking["Request Appointment<br/>[booking.php]"]
  node_booking_complete["Booking Confirmation"]
  node_patient_appointments["Patient Bookings<br/>[appointment.php]"]
  node_patient_settings["Patient Settings<br/>[settings.php]"]
end

subgraph group_care["Doctor Workspace"]
  node_doctor_dashboard["Doctor Dashboard<br/>[index.php]"]
  node_doctor_appointments["Doctor Appointments<br/>[appointment.php]"]
  node_doctor_schedule["Doctor Schedule<br/>[schedule.php]"]
  node_doctor_patients["Patient Details<br/>[patient.php]"]
  node_doctor_settings["Doctor Settings<br/>[settings.php]"]
end

subgraph group_admin["Administration"]
  node_admin_dashboard["Admin Dashboard<br/>[index.php]"]
  node_doctor_management["Manage Doctors<br/>[doctors.php]"]
  node_session_management["Manage Sessions<br/>[schedule.php]"]
  node_admin_appointments["Manage Appointments<br/>[appointment.php]"]
  node_admin_patients["View Patients<br/>[patient.php]"]
end

subgraph group_data["Data Layer"]
  node_db_connection["Database Connection<br/>[connection.php]"]
  node_mysql[("Edoc Database")]
end

node_visitor(("Visitor / User"))

node_visitor -->|"signs in"| node_login
node_visitor -->|"registers"| node_signup
node_login -->|"routes patient"| node_patient_dashboard
node_login -->|"routes doctor"| node_doctor_dashboard
node_login -->|"routes admin"| node_admin_dashboard
node_signup -->|"routes after registration"| node_patient_dashboard
node_patient_dashboard -->|"opens doctor search"| node_doctor_search
node_doctor_search -->|"browses sessions"| node_patient_schedule
node_patient_schedule -->|"selects session"| node_booking
node_booking -.->|"confirms request"| node_booking_complete
node_patient_dashboard -->|"views bookings"| node_patient_appointments
node_patient_dashboard -->|"manages account"| node_patient_settings
node_doctor_dashboard -->|"views appointments"| node_doctor_appointments
node_doctor_dashboard -->|"views sessions"| node_doctor_schedule
node_doctor_dashboard -->|"views patient details"| node_doctor_patients
node_doctor_dashboard -->|"manages account"| node_doctor_settings
node_admin_dashboard -->|"manages doctors"| node_doctor_management
node_admin_dashboard -->|"manages sessions"| node_session_management
node_admin_dashboard -->|"views bookings"| node_admin_appointments
node_admin_dashboard -->|"views patients"| node_admin_patients
node_login -->|"queries credentials"| node_db_connection
node_signup -->|"creates patient account"| node_db_connection
node_db_connection -->|"connects to"| node_mysql
node_patient_dashboard -->|"queries records"| node_db_connection
node_doctor_dashboard -->|"queries records"| node_db_connection
node_admin_dashboard -->|"queries records"| node_db_connection
node_doctor_management -->|"uses database"| node_db_connection
node_session_management -->|"uses database"| node_db_connection
node_booking -->|"uses database"| node_db_connection

click node_login "https://github.com/mizirjx/doctor-appointment-system/blob/main/login.php"
click node_signup "https://github.com/mizirjx/doctor-appointment-system/blob/main/create-account.php"
click node_logout "https://github.com/mizirjx/doctor-appointment-system/blob/main/logout.php"
click node_patient_dashboard "https://github.com/mizirjx/doctor-appointment-system/blob/main/patient/index.php"
click node_doctor_search "https://github.com/mizirjx/doctor-appointment-system/blob/main/patient/doctors.php"
click node_patient_schedule "https://github.com/mizirjx/doctor-appointment-system/blob/main/patient/schedule.php"
click node_booking "https://github.com/mizirjx/doctor-appointment-system/blob/main/patient/booking.php"
click node_booking_complete "https://github.com/mizirjx/doctor-appointment-system/blob/main/patient/booking-complete.php"
click node_patient_appointments "https://github.com/mizirjx/doctor-appointment-system/blob/main/patient/appointment.php"
click node_patient_settings "https://github.com/mizirjx/doctor-appointment-system/blob/main/patient/settings.php"
click node_doctor_dashboard "https://github.com/mizirjx/doctor-appointment-system/blob/main/doctor/index.php"
click node_doctor_appointments "https://github.com/mizirjx/doctor-appointment-system/blob/main/doctor/appointment.php"
click node_doctor_schedule "https://github.com/mizirjx/doctor-appointment-system/blob/main/doctor/schedule.php"
click node_doctor_patients "https://github.com/mizirjx/doctor-appointment-system/blob/main/doctor/patient.php"
click node_doctor_settings "https://github.com/mizirjx/doctor-appointment-system/blob/main/doctor/settings.php"
click node_admin_dashboard "https://github.com/mizirjx/doctor-appointment-system/blob/main/admin/index.php"
click node_doctor_management "https://github.com/mizirjx/doctor-appointment-system/blob/main/admin/doctors.php"
click node_session_management "https://github.com/mizirjx/doctor-appointment-system/blob/main/admin/schedule.php"
click node_admin_appointments "https://github.com/mizirjx/doctor-appointment-system/blob/main/admin/appointment.php"
click node_admin_patients "https://github.com/mizirjx/doctor-appointment-system/blob/main/admin/patient.php"
click node_db_connection "https://github.com/mizirjx/doctor-appointment-system/blob/main/connection.php"
click node_mysql "https://github.com/mizirjx/doctor-appointment-system/blob/main/SQL_Database_edoc.sql"

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_login,node_signup,node_logout,node_visitor toneBlue
class node_patient_dashboard,node_doctor_search,node_patient_schedule,node_booking,node_booking_complete,node_patient_appointments,node_patient_settings toneAmber
class node_doctor_dashboard,node_doctor_appointments,node_doctor_schedule,node_doctor_patients,node_doctor_settings toneMint
class node_admin_dashboard,node_doctor_management,node_session_management,node_admin_appointments,node_admin_patients toneRose
class node_db_connection,node_mysql toneIndigo
```

## Components

### Access and Accounts

- [Sign In](https://github.com/mizirjx/doctor-appointment-system/blob/main/login.php): `login.php`
- [Create Account](https://github.com/mizirjx/doctor-appointment-system/blob/main/create-account.php): `create-account.php`
- [Sign Out](https://github.com/mizirjx/doctor-appointment-system/blob/main/logout.php): `logout.php`

### Patient Booking

- [Patient Dashboard](https://github.com/mizirjx/doctor-appointment-system/blob/main/patient/index.php): `patient/index.php`
- [Find Doctors](https://github.com/mizirjx/doctor-appointment-system/blob/main/patient/doctors.php): `patient/doctors.php`
- [Browse Sessions](https://github.com/mizirjx/doctor-appointment-system/blob/main/patient/schedule.php): `patient/schedule.php`
- [Request Appointment](https://github.com/mizirjx/doctor-appointment-system/blob/main/patient/booking.php): `patient/booking.php`
- [Booking Confirmation](https://github.com/mizirjx/doctor-appointment-system/blob/main/patient/booking-complete.php): `patient/booking-complete.php`
- [Patient Bookings](https://github.com/mizirjx/doctor-appointment-system/blob/main/patient/appointment.php): `patient/appointment.php`
- [Patient Settings](https://github.com/mizirjx/doctor-appointment-system/blob/main/patient/settings.php): `patient/settings.php`

### Doctor Workspace

- [Doctor Dashboard](https://github.com/mizirjx/doctor-appointment-system/blob/main/doctor/index.php): `doctor/index.php`
- [Doctor Appointments](https://github.com/mizirjx/doctor-appointment-system/blob/main/doctor/appointment.php): `doctor/appointment.php`
- [Doctor Schedule](https://github.com/mizirjx/doctor-appointment-system/blob/main/doctor/schedule.php): `doctor/schedule.php`
- [Patient Details](https://github.com/mizirjx/doctor-appointment-system/blob/main/doctor/patient.php): `doctor/patient.php`
- [Doctor Settings](https://github.com/mizirjx/doctor-appointment-system/blob/main/doctor/settings.php): `doctor/settings.php`

### Administration

- [Admin Dashboard](https://github.com/mizirjx/doctor-appointment-system/blob/main/admin/index.php): `admin/index.php`
- [Manage Doctors](https://github.com/mizirjx/doctor-appointment-system/blob/main/admin/doctors.php): `admin/doctors.php`
- [Manage Sessions](https://github.com/mizirjx/doctor-appointment-system/blob/main/admin/schedule.php): `admin/schedule.php`
- [Manage Appointments](https://github.com/mizirjx/doctor-appointment-system/blob/main/admin/appointment.php): `admin/appointment.php`
- [View Patients](https://github.com/mizirjx/doctor-appointment-system/blob/main/admin/patient.php): `admin/patient.php`

### Data Layer

- [Database Connection](https://github.com/mizirjx/doctor-appointment-system/blob/main/connection.php): `connection.php`
- [Edoc Database](https://github.com/mizirjx/doctor-appointment-system/blob/main/SQL_Database_edoc.sql): `SQL_Database_edoc.sql`

### Other components

- **Visitor / User**

## Connections

- Visitor / User → Sign In: signs in (evidence: `README.md`)
- Visitor / User → Create Account: registers (evidence: `README.md`)
- Sign In → Patient Dashboard: routes patient (evidence: `login.php`)
- Sign In → Doctor Dashboard: routes doctor (evidence: `login.php`)
- Sign In → Admin Dashboard: routes admin (evidence: `login.php`)
- Create Account → Patient Dashboard: routes after registration (evidence: `create-account.php`)
- Patient Dashboard → Find Doctors: opens doctor search (evidence: `README.md`)
- Find Doctors → Browse Sessions: browses sessions (evidence: `README.md`)
- Browse Sessions → Request Appointment: selects session (evidence: `README.md`)
- Request Appointment → Booking Confirmation: confirms request
- Patient Dashboard → Patient Bookings: views bookings (evidence: `README.md`)
- Patient Dashboard → Patient Settings: manages account (evidence: `README.md`)
- Doctor Dashboard → Doctor Appointments: views appointments (evidence: `README.md`)
- Doctor Dashboard → Doctor Schedule: views sessions (evidence: `README.md`)
- Doctor Dashboard → Patient Details: views patient details (evidence: `README.md`)
- Doctor Dashboard → Doctor Settings: manages account (evidence: `README.md`)
- Admin Dashboard → Manage Doctors: manages doctors (evidence: `README.md`)
- Admin Dashboard → Manage Sessions: manages sessions (evidence: `README.md`)
- Admin Dashboard → Manage Appointments: views bookings (evidence: `README.md`)
- Admin Dashboard → View Patients: views patients (evidence: `README.md`)
- Sign In → Database Connection: queries credentials (evidence: `login.php`)
- Create Account → Database Connection: creates patient account (evidence: `create-account.php`)
- Database Connection → Edoc Database: connects to (evidence: `connection.php`)
- Patient Dashboard → Database Connection: queries records (evidence: `patient/index.php`)
- Doctor Dashboard → Database Connection: queries records (evidence: `doctor/index.php`)
- Admin Dashboard → Database Connection: queries records (evidence: `admin/index.php`)
- Manage Doctors → Database Connection: uses database (evidence: `admin/doctors.php`)
- Manage Sessions → Database Connection: uses database (evidence: `admin/schedule.php`)
- Request Appointment → Database Connection: uses database (evidence: `patient/booking.php`)
