# nasabikram/bikram-appointment-scheduler architecture

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

- Interactive diagram: https://gitdiagram.com/nasabikram/bikram-appointment-scheduler
- Repository: https://github.com/nasabikram/bikram-appointment-scheduler

## Overview

Bikram Appointment Scheduler is a WordPress plugin for taking staff appointments and managing them in the admin. The main flow renders a shortcode booking form, checks date/staff availability, validates a submission, and saves a pending appointment; admins can manage appointment records and change status, with email notifications supported. The source excerpts establish the core booking and admin actions, but do not show all hook registrations or the JavaScript request flow, so those links are omitted or marked unverified.

Main entry points: [`includes/class-bapsc.php`](https://github.com/nasabikram/bikram-appointment-scheduler/blob/main/includes/class-bapsc.php) (Component setup), [`includes/class-bapsc-ajax.php`](https://github.com/nasabikram/bikram-appointment-scheduler/blob/main/includes/class-bapsc-ajax.php) (Booking endpoints), [`includes/class-bapsc-emails.php`](https://github.com/nasabikram/bikram-appointment-scheduler/blob/main/includes/class-bapsc-emails.php) (Email notifications), [`includes/bapsc-functions.php`](https://github.com/nasabikram/bikram-appointment-scheduler/blob/main/includes/bapsc-functions.php) (Booking data helpers)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Plugin runtime"]
  node_bootstrap["Plugin bootstrap"]
  node_core["Component setup<br/>[class-bapsc.php]"]
  node_settings["Scheduling settings"]
  node_helpers["Booking data helpers"]
end

subgraph group_booking["Booking flow"]
  node_frontend["Shortcode form"]
  node_frontend_js["Booking browser script<br/>[frontend.js]"]
  node_ajax["Booking endpoints"]
  node_availability["Slot availability"]
  node_emails["Email notifications"]
end

subgraph group_admin["Admin management"]
  node_cpt["Staff and appointments"]
  node_list_table["Appointment list"]
  node_admin_actions["Admin actions and export"]
end

subgraph group_integrations["WordPress services"]
  node_appointments[("Appointment records")]
  node_mail["WordPress mail"]
end

node_visitor(("Booking visitor"))
node_admin_user(("Admin user"))

node_bootstrap -->|"loads and starts"| node_core
node_core -->|"creates"| node_cpt
node_core -->|"creates"| node_settings
node_core -->|"creates"| node_availability
node_core -->|"creates"| node_ajax
node_core -->|"creates"| node_frontend
node_core -->|"creates"| node_emails
node_core -->|"creates"| node_list_table
node_core -->|"creates"| node_admin_actions
node_visitor -->|"uses booking form"| node_frontend
node_frontend -->|"enqueues"| node_frontend_js
node_visitor -.->|"submits requests"| node_ajax
node_ajax -->|"checks slots"| node_availability
node_availability -->|"reads appointments"| node_helpers
node_availability -->|"reads settings"| node_helpers
node_helpers -->|"gets settings"| node_settings
node_ajax -->|"creates and saves"| node_appointments
node_helpers -->|"queries records"| node_appointments
node_cpt -->|"stores metadata"| node_appointments
node_admin_user -->|"manages bookings"| node_list_table
node_list_table -->|"reads booking data"| node_appointments
node_admin_user -->|"confirms or exports"| node_admin_actions
node_admin_actions -->|"updates status and reads"| node_appointments
node_admin_actions -.->|"signals status change"| node_emails
node_ajax -.->|"signals new booking"| node_emails
node_emails -->|"reads booking data"| node_appointments
node_emails -->|"sends notifications"| node_mail

click node_bootstrap "https://github.com/nasabikram/bikram-appointment-scheduler/blob/main/bikram-appointment-scheduler.php"
click node_core "https://github.com/nasabikram/bikram-appointment-scheduler/blob/main/includes/class-bapsc.php"
click node_cpt "https://github.com/nasabikram/bikram-appointment-scheduler/blob/main/includes/class-bapsc-cpt.php"
click node_settings "https://github.com/nasabikram/bikram-appointment-scheduler/blob/main/includes/class-bapsc-settings.php"
click node_helpers "https://github.com/nasabikram/bikram-appointment-scheduler/blob/main/includes/bapsc-functions.php"
click node_frontend "https://github.com/nasabikram/bikram-appointment-scheduler/blob/main/includes/class-bapsc-frontend.php"
click node_frontend_js "https://github.com/nasabikram/bikram-appointment-scheduler/blob/main/assets/js/frontend.js"
click node_ajax "https://github.com/nasabikram/bikram-appointment-scheduler/blob/main/includes/class-bapsc-ajax.php"
click node_availability "https://github.com/nasabikram/bikram-appointment-scheduler/blob/main/includes/class-bapsc-availability.php"
click node_emails "https://github.com/nasabikram/bikram-appointment-scheduler/blob/main/includes/class-bapsc-emails.php"
click node_list_table "https://github.com/nasabikram/bikram-appointment-scheduler/blob/main/includes/class-bapsc-admin-list-table.php"
click node_admin_actions "https://github.com/nasabikram/bikram-appointment-scheduler/blob/main/includes/class-bapsc-admin-actions.php"

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_bootstrap,node_core,node_settings,node_helpers,node_admin_user toneBlue
class node_frontend,node_frontend_js,node_ajax,node_availability,node_emails toneAmber
class node_cpt,node_list_table,node_admin_actions toneMint
class node_appointments,node_mail toneRose
class node_visitor toneIndigo
```

## Components

### Plugin runtime

- [Plugin bootstrap](https://github.com/nasabikram/bikram-appointment-scheduler/blob/main/bikram-appointment-scheduler.php): `bikram-appointment-scheduler.php`
- [Component setup](https://github.com/nasabikram/bikram-appointment-scheduler/blob/main/includes/class-bapsc.php): `includes/class-bapsc.php`
- [Scheduling settings](https://github.com/nasabikram/bikram-appointment-scheduler/blob/main/includes/class-bapsc-settings.php): `includes/class-bapsc-settings.php`
- [Booking data helpers](https://github.com/nasabikram/bikram-appointment-scheduler/blob/main/includes/bapsc-functions.php): `includes/bapsc-functions.php`

### Booking flow

- [Shortcode form](https://github.com/nasabikram/bikram-appointment-scheduler/blob/main/includes/class-bapsc-frontend.php): `includes/class-bapsc-frontend.php`
- [Booking browser script](https://github.com/nasabikram/bikram-appointment-scheduler/blob/main/assets/js/frontend.js): `assets/js/frontend.js`
- [Booking endpoints](https://github.com/nasabikram/bikram-appointment-scheduler/blob/main/includes/class-bapsc-ajax.php): `includes/class-bapsc-ajax.php`
- [Slot availability](https://github.com/nasabikram/bikram-appointment-scheduler/blob/main/includes/class-bapsc-availability.php): `includes/class-bapsc-availability.php`
- [Email notifications](https://github.com/nasabikram/bikram-appointment-scheduler/blob/main/includes/class-bapsc-emails.php): `includes/class-bapsc-emails.php`

### Admin management

- [Staff and appointments](https://github.com/nasabikram/bikram-appointment-scheduler/blob/main/includes/class-bapsc-cpt.php): `includes/class-bapsc-cpt.php`
- [Appointment list](https://github.com/nasabikram/bikram-appointment-scheduler/blob/main/includes/class-bapsc-admin-list-table.php): `includes/class-bapsc-admin-list-table.php`
- [Admin actions and export](https://github.com/nasabikram/bikram-appointment-scheduler/blob/main/includes/class-bapsc-admin-actions.php): `includes/class-bapsc-admin-actions.php`

### WordPress services

- **Appointment records**
- **WordPress mail**

### Other components

- **Booking visitor**
- **Admin user**

## Connections

- Plugin bootstrap → Component setup: loads and starts (evidence: `bikram-appointment-scheduler.php`)
- Component setup → Staff and appointments: creates (evidence: `includes/class-bapsc.php`)
- Component setup → Scheduling settings: creates (evidence: `includes/class-bapsc.php`)
- Component setup → Slot availability: creates (evidence: `includes/class-bapsc.php`)
- Component setup → Booking endpoints: creates (evidence: `includes/class-bapsc.php`)
- Component setup → Shortcode form: creates (evidence: `includes/class-bapsc.php`)
- Component setup → Email notifications: creates (evidence: `includes/class-bapsc.php`)
- Component setup → Appointment list: creates (evidence: `includes/class-bapsc.php`)
- Component setup → Admin actions and export: creates (evidence: `includes/class-bapsc.php`)
- Booking visitor → Shortcode form: uses booking form (evidence: `README.md`)
- Shortcode form → Booking browser script: enqueues (evidence: `includes/class-bapsc-frontend.php`)
- Booking visitor → Booking endpoints: submits requests
- Booking endpoints → Slot availability: checks slots (evidence: `includes/class-bapsc-ajax.php`)
- Slot availability → Booking data helpers: reads appointments (evidence: `includes/class-bapsc-availability.php`)
- Slot availability → Booking data helpers: reads settings (evidence: `includes/class-bapsc-availability.php`)
- Booking data helpers → Scheduling settings: gets settings (evidence: `includes/bapsc-functions.php`)
- Booking endpoints → Appointment records: creates and saves (evidence: `includes/class-bapsc-ajax.php`)
- Booking data helpers → Appointment records: queries records (evidence: `includes/bapsc-functions.php`)
- Staff and appointments → Appointment records: stores metadata (evidence: `includes/class-bapsc-cpt.php`)
- Admin user → Appointment list: manages bookings (evidence: `README.md`)
- Appointment list → Appointment records: reads booking data (evidence: `includes/class-bapsc-admin-list-table.php`)
- Admin user → Admin actions and export: confirms or exports (evidence: `includes/class-bapsc-admin-actions.php`)
- Admin actions and export → Appointment records: updates status and reads (evidence: `includes/class-bapsc-admin-actions.php`)
- Admin actions and export → Email notifications: signals status change
- Booking endpoints → Email notifications: signals new booking
- Email notifications → Appointment records: reads booking data (evidence: `includes/class-bapsc-emails.php`)
- Email notifications → WordPress mail: sends notifications (evidence: `includes/class-bapsc-emails.php`)
