# mostafa00zedan/clinicflow architecture

> Architecture diagram of the GitHub repository mostafa00zedan/clinicflow, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-12-06). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/mostafa00zedan/clinicflow
- Repository: https://github.com/mostafa00zedan/clinicflow

## Overview

ClinicFlow is a browser-only clinic booking demo with patient and staff workflows; appointments, settings, and the simulated reminder queue live in localStorage. The patient flow selects service, clinician and slot, captures details, then books or manages an appointment; staff review appointments and maintain schedules and settings. The README documents the dashboard, calendar export, demo reminders, localization, and decorative motion. Edges below are limited to calls visible in excerpts or capabilities explicitly documented in the README; unsampled page wiring is not inferred.

Main entry points: [`js/store.js`](https://github.com/mostafa00zedan/clinicflow/blob/main/js/store.js) (Appointment store), [`js/booking.js`](https://github.com/mostafa00zedan/clinicflow/blob/main/js/booking.js) (Booking wizard), [`js/staff.js`](https://github.com/mostafa00zedan/clinicflow/blob/main/js/staff.js) (Staff dashboard), [`js/slots.js`](https://github.com/mostafa00zedan/clinicflow/blob/main/js/slots.js) (Slot generation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_patient["Patient booking"]
  node_booking["Booking wizard<br/>[booking.js]"]
  node_manage["Manage booking<br/>[booking.js]"]
end

subgraph group_staff["Staff operations"]
  node_dashboard["Staff dashboard<br/>[staff.js]"]
  node_staff_schedule["Schedule board<br/>[staff.js]"]
  node_staff_settings["Clinic settings<br/>[staff.js]"]
end

subgraph group_domain["Booking domain"]
  node_sample["Sample clinic<br/>[data.js]"]
  node_availability["Slot generation<br/>[slots.js]"]
  node_appointments[("Appointment store<br/>[store.js]")]
  node_reminders["Demo reminder queue<br/>[store.js]"]
  node_configuration["Timezone and rules<br/>[config.js]"]
  node_time["Clinic time helpers<br/>[time.js]"]
end

subgraph group_shared["Shared presentation"]
  node_ui["Shared UI helpers<br/>[ui.js]"]
  node_strings["UI strings<br/>[strings.js]"]
  node_motion["Decorative motion<br/>[motion.js]"]
  node_calendar["Calendar export<br/>[ui.js]"]
end

node_patient_actor(("Patient"))
node_staff_actor(("Clinic staff"))

node_patient_actor -->|"uses"| node_booking
node_booking -->|"requests slots"| node_availability
node_booking -->|"creates booking"| node_appointments
node_booking -.->|"opens management"| node_manage
node_manage -.->|"requests changes"| node_appointments
node_appointments -->|"checks availability"| node_availability
node_staff_actor -->|"uses"| node_dashboard
node_dashboard -.->|"updates bookings"| node_appointments
node_dashboard -.->|"shows schedule"| node_staff_schedule
node_dashboard -.->|"edits settings"| node_staff_settings
node_appointments -->|"queues notices"| node_reminders
node_appointments -->|"seeds state"| node_sample
node_sample -->|"generates appointments"| node_availability
node_availability -->|"uses dates"| node_time
node_appointments -->|"computes clinic time"| node_time
node_availability -->|"reads booking rules"| node_configuration
node_ui -->|"formats dates"| node_time
node_ui -->|"reads countdown time"| node_appointments
node_booking -.->|"renders dialogs"| node_ui
node_dashboard -->|"renders dialogs"| node_ui
node_booking -.->|"offers export"| node_calendar
node_calendar -.->|"formats appointment"| node_appointments
node_booking -.->|"uses translations"| node_strings
node_booking -.->|"animates booking"| node_motion

click node_booking "https://github.com/mostafa00zedan/clinicflow/blob/main/js/booking.js"
click node_manage "https://github.com/mostafa00zedan/clinicflow/blob/main/js/booking.js"
click node_dashboard "https://github.com/mostafa00zedan/clinicflow/blob/main/js/staff.js"
click node_staff_schedule "https://github.com/mostafa00zedan/clinicflow/blob/main/js/staff.js"
click node_staff_settings "https://github.com/mostafa00zedan/clinicflow/blob/main/js/staff.js"
click node_sample "https://github.com/mostafa00zedan/clinicflow/blob/main/js/data.js"
click node_availability "https://github.com/mostafa00zedan/clinicflow/blob/main/js/slots.js"
click node_appointments "https://github.com/mostafa00zedan/clinicflow/blob/main/js/store.js"
click node_reminders "https://github.com/mostafa00zedan/clinicflow/blob/main/js/store.js"
click node_configuration "https://github.com/mostafa00zedan/clinicflow/blob/main/js/config.js"
click node_time "https://github.com/mostafa00zedan/clinicflow/blob/main/js/time.js"
click node_ui "https://github.com/mostafa00zedan/clinicflow/blob/main/js/ui.js"
click node_strings "https://github.com/mostafa00zedan/clinicflow/blob/main/js/strings.js"
click node_motion "https://github.com/mostafa00zedan/clinicflow/blob/main/js/motion.js"
click node_calendar "https://github.com/mostafa00zedan/clinicflow/blob/main/js/ui.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_booking,node_manage toneBlue
class node_dashboard,node_staff_schedule,node_staff_settings toneAmber
class node_sample,node_availability,node_appointments,node_reminders,node_configuration,node_time toneMint
class node_ui,node_strings,node_motion,node_calendar toneRose
class node_patient_actor,node_staff_actor toneIndigo
```

## Components

### Patient booking

- [Booking wizard](https://github.com/mostafa00zedan/clinicflow/blob/main/js/booking.js): `js/booking.js`
- [Manage booking](https://github.com/mostafa00zedan/clinicflow/blob/main/js/booking.js): `js/booking.js`

### Staff operations

- [Staff dashboard](https://github.com/mostafa00zedan/clinicflow/blob/main/js/staff.js): `js/staff.js`
- [Schedule board](https://github.com/mostafa00zedan/clinicflow/blob/main/js/staff.js): `js/staff.js`
- [Clinic settings](https://github.com/mostafa00zedan/clinicflow/blob/main/js/staff.js): `js/staff.js`

### Booking domain

- [Sample clinic](https://github.com/mostafa00zedan/clinicflow/blob/main/js/data.js): `js/data.js`
- [Slot generation](https://github.com/mostafa00zedan/clinicflow/blob/main/js/slots.js): `js/slots.js`
- [Appointment store](https://github.com/mostafa00zedan/clinicflow/blob/main/js/store.js): `js/store.js`
- [Demo reminder queue](https://github.com/mostafa00zedan/clinicflow/blob/main/js/store.js): `js/store.js`
- [Timezone and rules](https://github.com/mostafa00zedan/clinicflow/blob/main/js/config.js): `js/config.js`
- [Clinic time helpers](https://github.com/mostafa00zedan/clinicflow/blob/main/js/time.js): `js/time.js`

### Shared presentation

- [Shared UI helpers](https://github.com/mostafa00zedan/clinicflow/blob/main/js/ui.js): `js/ui.js`
- [UI strings](https://github.com/mostafa00zedan/clinicflow/blob/main/js/strings.js): `js/strings.js`
- [Decorative motion](https://github.com/mostafa00zedan/clinicflow/blob/main/js/motion.js): `js/motion.js`
- [Calendar export](https://github.com/mostafa00zedan/clinicflow/blob/main/js/ui.js): `js/ui.js`

### Other components

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

## Connections

- Patient → Booking wizard: uses (evidence: `README.md`)
- Booking wizard → Slot generation: requests slots (evidence: `js/booking.js`)
- Booking wizard → Appointment store: creates booking (evidence: `js/booking.js`)
- Booking wizard → Manage booking: opens management (evidence: `js/booking.js`)
- Manage booking → Appointment store: requests changes
- Appointment store → Slot generation: checks availability (evidence: `js/store.js`)
- Clinic staff → Staff dashboard: uses (evidence: `README.md`)
- Staff dashboard → Appointment store: updates bookings
- Staff dashboard → Schedule board: shows schedule (evidence: `js/staff.js`)
- Staff dashboard → Clinic settings: edits settings (evidence: `js/staff.js`)
- Appointment store → Demo reminder queue: queues notices (evidence: `js/store.js`)
- Appointment store → Sample clinic: seeds state (evidence: `js/store.js`)
- Sample clinic → Slot generation: generates appointments (evidence: `js/data.js`)
- Slot generation → Clinic time helpers: uses dates (evidence: `js/slots.js`)
- Appointment store → Clinic time helpers: computes clinic time (evidence: `js/store.js`)
- Slot generation → Timezone and rules: reads booking rules (evidence: `js/slots.js`)
- Shared UI helpers → Clinic time helpers: formats dates (evidence: `js/ui.js`)
- Shared UI helpers → Appointment store: reads countdown time (evidence: `js/ui.js`)
- Booking wizard → Shared UI helpers: renders dialogs
- Staff dashboard → Shared UI helpers: renders dialogs (evidence: `js/staff.js`)
- Booking wizard → Calendar export: offers export (evidence: `README.md`)
- Calendar export → Appointment store: formats appointment (evidence: `README.md`)
- Booking wizard → UI strings: uses translations (evidence: `README.md`)
- Booking wizard → Decorative motion: animates booking (evidence: `README.md`)
