# aaban-khursheed/lazy-laundry architecture

> Architecture diagram of the GitHub repository aaban-khursheed/lazy-laundry, 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/aaban-khursheed/lazy-laundry
- Repository: https://github.com/aaban-khursheed/lazy-laundry

## Overview

LazyLaundry is a web booking platform with a customer booking and tracking experience and a separate operator workspace. Customers check availability, submit bookings, and later track or change them; operators search bookings, inspect details, and perform booking actions. The browser clients send requests through a shared API wrapper to the Worker. The excerpts show these client-side calls and some rendering responsibilities; the Worker implementation was read but not excerpted, so its internal processing and storage relationships are not detailed here.

Main entry points: [`public/operator/modules/dashboard.js`](https://github.com/aaban-khursheed/lazy-laundry/blob/main/public/operator/modules/dashboard.js) (Booking dashboard), [`public/shared/api.js`](https://github.com/aaban-khursheed/lazy-laundry/blob/main/public/shared/api.js) (API client), [`public/booking/app.js`](https://github.com/aaban-khursheed/lazy-laundry/blob/main/public/booking/app.js) (Booking app), [`public/booking/modules/booking.js`](https://github.com/aaban-khursheed/lazy-laundry/blob/main/public/booking/modules/booking.js) (Booking flow)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_customer["Customer booking"]
  node_booking_app["Booking app<br/>[app.js]"]
  node_booking_flow["Booking flow<br/>[booking.js]"]
  node_tracking["Tracking and changes<br/>[tracking.js]"]
  node_turnstile["Security check<br/>[turnstile.js]"]
end

subgraph group_operator["Operator workspace"]
  node_operator_app["Operator app<br/>[app.js]"]
  node_dashboard["Booking dashboard<br/>[dashboard.js]"]
  node_operator_components["Booking views<br/>[components.js]"]
  node_operator_dialogs["Action dialogs<br/>[dialogs.js]"]
  node_operator_actions["Booking actions<br/>[actions.js]"]
end

subgraph group_shared["Shared client services"]
  node_shared_api["API client<br/>[api.js]"]
  node_shared_utils["Date and format helpers<br/>[utils.js]"]
end

subgraph group_backend["API service"]
  node_worker["HTTP API<br/>[worker.js]"]
end

node_customer(("Customer"))
node_turnstile_service["Cloudflare Turnstile"]
node_operator(("Laundry operator"))

node_customer -->|"uses"| node_booking_app
node_booking_app -->|"initializes"| node_booking_flow
node_booking_app -->|"initializes"| node_tracking
node_booking_app -->|"checks config"| node_shared_api
node_booking_flow -->|"requests availability and bookings"| node_shared_api
node_booking_flow -->|"gets verification token"| node_turnstile
node_tracking -->|"requests tracking and changes"| node_shared_api
node_tracking -->|"gets verification token"| node_turnstile
node_turnstile -->|"loads challenge"| node_turnstile_service
node_operator -->|"uses"| node_operator_app
node_operator_app -->|"initializes"| node_dashboard
node_dashboard -->|"searches bookings"| node_shared_api
node_dashboard -->|"renders"| node_operator_components
node_dashboard -->|"requests confirmation"| node_operator_dialogs
node_dashboard -->|"delegates actions"| node_operator_actions
node_operator_dialogs -->|"checks eligibility"| node_operator_components
node_booking_flow -->|"uses scheduling helpers"| node_shared_utils
node_operator_components -->|"uses formatting helpers"| node_shared_utils
node_shared_api -->|"sends HTTP requests"| node_worker

click node_booking_app "https://github.com/aaban-khursheed/lazy-laundry/blob/main/public/booking/app.js"
click node_booking_flow "https://github.com/aaban-khursheed/lazy-laundry/blob/main/public/booking/modules/booking.js"
click node_tracking "https://github.com/aaban-khursheed/lazy-laundry/blob/main/public/booking/modules/tracking.js"
click node_turnstile "https://github.com/aaban-khursheed/lazy-laundry/blob/main/public/booking/modules/turnstile.js"
click node_operator_app "https://github.com/aaban-khursheed/lazy-laundry/blob/main/public/operator/app.js"
click node_dashboard "https://github.com/aaban-khursheed/lazy-laundry/blob/main/public/operator/modules/dashboard.js"
click node_operator_components "https://github.com/aaban-khursheed/lazy-laundry/blob/main/public/operator/modules/components.js"
click node_operator_dialogs "https://github.com/aaban-khursheed/lazy-laundry/blob/main/public/operator/modules/dialogs.js"
click node_operator_actions "https://github.com/aaban-khursheed/lazy-laundry/blob/main/public/operator/modules/actions.js"
click node_shared_api "https://github.com/aaban-khursheed/lazy-laundry/blob/main/public/shared/api.js"
click node_shared_utils "https://github.com/aaban-khursheed/lazy-laundry/blob/main/public/shared/utils.js"
click node_worker "https://github.com/aaban-khursheed/lazy-laundry/blob/main/api/worker.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_app,node_booking_flow,node_tracking,node_turnstile toneBlue
class node_operator_app,node_dashboard,node_operator_components,node_operator_dialogs,node_operator_actions toneAmber
class node_shared_api,node_shared_utils toneMint
class node_worker toneRose
class node_customer,node_turnstile_service,node_operator toneIndigo
```

## Components

### Customer booking

- [Booking app](https://github.com/aaban-khursheed/lazy-laundry/blob/main/public/booking/app.js): `public/booking/app.js`
- [Booking flow](https://github.com/aaban-khursheed/lazy-laundry/blob/main/public/booking/modules/booking.js): `public/booking/modules/booking.js`
- [Tracking and changes](https://github.com/aaban-khursheed/lazy-laundry/blob/main/public/booking/modules/tracking.js): `public/booking/modules/tracking.js`
- [Security check](https://github.com/aaban-khursheed/lazy-laundry/blob/main/public/booking/modules/turnstile.js): `public/booking/modules/turnstile.js`

### Operator workspace

- [Operator app](https://github.com/aaban-khursheed/lazy-laundry/blob/main/public/operator/app.js): `public/operator/app.js`
- [Booking dashboard](https://github.com/aaban-khursheed/lazy-laundry/blob/main/public/operator/modules/dashboard.js): `public/operator/modules/dashboard.js`
- [Booking views](https://github.com/aaban-khursheed/lazy-laundry/blob/main/public/operator/modules/components.js): `public/operator/modules/components.js`
- [Action dialogs](https://github.com/aaban-khursheed/lazy-laundry/blob/main/public/operator/modules/dialogs.js): `public/operator/modules/dialogs.js`
- [Booking actions](https://github.com/aaban-khursheed/lazy-laundry/blob/main/public/operator/modules/actions.js): `public/operator/modules/actions.js`

### Shared client services

- [API client](https://github.com/aaban-khursheed/lazy-laundry/blob/main/public/shared/api.js): `public/shared/api.js`
- [Date and format helpers](https://github.com/aaban-khursheed/lazy-laundry/blob/main/public/shared/utils.js): `public/shared/utils.js`

### API service

- [HTTP API](https://github.com/aaban-khursheed/lazy-laundry/blob/main/api/worker.js): `api/worker.js`

### Other components

- **Customer**
- **Cloudflare Turnstile**
- **Laundry operator**

## Connections

- Customer → Booking app: uses
- Booking app → Booking flow: initializes (evidence: `public/booking/app.js`)
- Booking app → Tracking and changes: initializes (evidence: `public/booking/app.js`)
- Booking app → API client: checks config (evidence: `public/booking/app.js`)
- Booking flow → API client: requests availability and bookings (evidence: `public/booking/modules/booking.js`)
- Booking flow → Security check: gets verification token (evidence: `public/booking/modules/booking.js`)
- Tracking and changes → API client: requests tracking and changes (evidence: `public/booking/modules/tracking.js`)
- Tracking and changes → Security check: gets verification token (evidence: `public/booking/modules/tracking.js`)
- Security check → Cloudflare Turnstile: loads challenge (evidence: `public/booking/modules/turnstile.js`)
- Laundry operator → Operator app: uses
- Operator app → Booking dashboard: initializes (evidence: `public/operator/app.js`)
- Booking dashboard → API client: searches bookings (evidence: `public/operator/modules/dashboard.js`)
- Booking dashboard → Booking views: renders (evidence: `public/operator/modules/dashboard.js`)
- Booking dashboard → Action dialogs: requests confirmation (evidence: `public/operator/modules/dashboard.js`)
- Booking dashboard → Booking actions: delegates actions (evidence: `public/operator/modules/dashboard.js`)
- Action dialogs → Booking views: checks eligibility (evidence: `public/operator/modules/dialogs.js`)
- Booking flow → Date and format helpers: uses scheduling helpers (evidence: `public/booking/modules/booking.js`)
- Booking views → Date and format helpers: uses formatting helpers (evidence: `public/operator/modules/components.js`)
- API client → HTTP API: sends HTTP requests (evidence: `public/shared/api.js`)
