# bakliounsaid/appointment architecture

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

- Interactive diagram: https://gitdiagram.com/bakliounsaid/appointment
- Repository: https://github.com/bakliounsaid/appointment

## Overview

Appointment-App is a Laravel/Livewire application for a curtain-fitting business, with client appointment booking and product sales plus an admin operations dashboard. The client workflow covers booking an appointment, browsing products and purchasing, and tracking request status. Admins monitor and update appointment stages, manage products and categories, and handle orders. Appointment and order models represent the domain state; delivery dispatch is an additional integration. The README documents the main capabilities, while some client and admin component details are unsampled, so those links reflect documented behavior rather than inspected calls.

Main entry points: [`app/Models/Appointment.php`](https://github.com/bakliounsaid/appointment/blob/main/app/Models/Appointment.php) (Appointments), [`app/Models/Order.php`](https://github.com/bakliounsaid/appointment/blob/main/app/Models/Order.php) (Orders), [`app/Services/DeliveryContext.php`](https://github.com/bakliounsaid/appointment/blob/main/app/Services/DeliveryContext.php) (Delivery coordination), [`app/Models/Product.php`](https://github.com/bakliounsaid/appointment/blob/main/app/Models/Product.php) (Products)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Client experience"]
  node_appointment_ui["Appointment booking<br/>[Index.php]"]
  node_catalog_ui["Product catalog<br/>[Index.php]"]
  node_product_ui["Product details<br/>[Show.php]"]
  node_thanks_ui["Purchase result<br/>[ThankYou.php]"]
end

subgraph group_admin["Admin operations"]
  node_admin_dashboard["Operations dashboard<br/>[Index.php]"]
  node_appointment_admin["Appointment stages"]
  node_appointment_detail["Appointment detail<br/>[Detail.php]"]
  node_schedule["Appointment schedule<br/>[Program.php]"]
  node_product_admin["Product management"]
  node_category_admin["Category management"]
  node_order_admin["Order management<br/>[Index.php]"]
end

subgraph group_domain["Business data"]
  node_appointment_model[("Appointments<br/>[Appointment.php]")]
  node_status_model[("Appointment statuses<br/>[Status.php]")]
  node_product_model[("Products<br/>[Product.php]")]
  node_order_model[("Orders<br/>[Order.php]")]
  node_search["Search scope<br/>[Search.php]"]
end

subgraph group_delivery["Delivery integration"]
  node_delivery_context["Delivery coordination"]
  node_delivery_api["Zrexpress API"]
end

node_visitor(("Client"))
node_delivery_service{{"Zrexpress"}}
node_mysql[("MySQL database")]

node_visitor -->|"books appointment"| node_appointment_ui
node_visitor -->|"browses products"| node_catalog_ui
node_visitor -->|"purchases products"| node_product_ui
node_visitor -.->|"tracks request"| node_thanks_ui
node_appointment_ui -.->|"creates records"| node_appointment_model
node_catalog_ui -.->|"shows catalog"| node_product_model
node_product_ui -.->|"creates orders"| node_order_model
node_admin_dashboard -->|"summarizes"| node_appointment_model
node_admin_dashboard -->|"summarizes"| node_order_model
node_appointment_admin -->|"queries stages"| node_appointment_model
node_appointment_detail -->|"updates details"| node_appointment_model
node_schedule -->|"queries schedule"| node_appointment_model
node_appointment_model -->|"relates statuses"| node_status_model
node_appointment_admin -->|"uses search"| node_search
node_product_admin -.->|"manages products"| node_product_model
node_category_admin -.->|"organizes products"| node_product_model
node_order_admin -->|"manages orders"| node_order_model
node_order_admin -->|"dispatches delivery"| node_delivery_context
node_delivery_context -->|"selects provider"| node_delivery_api
node_delivery_api -.->|"calls service"| node_delivery_service
node_delivery_context -->|"updates tracking"| node_order_model
node_appointment_model -.->|"persists data"| node_mysql
node_order_model -.->|"persists data"| node_mysql

click node_appointment_ui "https://github.com/bakliounsaid/appointment/blob/main/app/Livewire/Client/Index.php"
click node_catalog_ui "https://github.com/bakliounsaid/appointment/blob/main/app/Livewire/Client/Product/Index.php"
click node_product_ui "https://github.com/bakliounsaid/appointment/blob/main/app/Livewire/Client/Product/Show.php"
click node_thanks_ui "https://github.com/bakliounsaid/appointment/blob/main/app/Livewire/Client/ThankYou.php"
click node_admin_dashboard "https://github.com/bakliounsaid/appointment/blob/main/app/Livewire/Admin/Index.php"
click node_appointment_admin "https://github.com/bakliounsaid/appointment/tree/main/app/Livewire/Admin/Appointment"
click node_appointment_detail "https://github.com/bakliounsaid/appointment/blob/main/app/Livewire/Admin/Appointment/Detail.php"
click node_schedule "https://github.com/bakliounsaid/appointment/blob/main/app/Livewire/Admin/Appointment/Program.php"
click node_product_admin "https://github.com/bakliounsaid/appointment/tree/main/app/Livewire/Admin/Product"
click node_category_admin "https://github.com/bakliounsaid/appointment/tree/main/app/Livewire/Admin/Category"
click node_order_admin "https://github.com/bakliounsaid/appointment/blob/main/app/Livewire/Admin/Order/Index.php"
click node_appointment_model "https://github.com/bakliounsaid/appointment/blob/main/app/Models/Appointment.php"
click node_status_model "https://github.com/bakliounsaid/appointment/blob/main/app/Models/Status.php"
click node_product_model "https://github.com/bakliounsaid/appointment/blob/main/app/Models/Product.php"
click node_order_model "https://github.com/bakliounsaid/appointment/blob/main/app/Models/Order.php"
click node_search "https://github.com/bakliounsaid/appointment/blob/main/app/Traits/Search.php"
click node_delivery_context "https://github.com/bakliounsaid/appointment/blob/main/app/Services/DeliveryContext.php"
click node_delivery_api "https://github.com/bakliounsaid/appointment/blob/main/app/Apis/ZrexpressDeliveryApi.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_appointment_ui,node_catalog_ui,node_product_ui,node_thanks_ui,node_visitor toneBlue
class node_admin_dashboard,node_appointment_admin,node_appointment_detail,node_schedule,node_product_admin,node_category_admin,node_order_admin,node_mysql toneAmber
class node_appointment_model,node_status_model,node_product_model,node_order_model,node_search toneMint
class node_delivery_context,node_delivery_api toneRose
class node_delivery_service toneIndigo
```

## Components

### Client experience

- [Appointment booking](https://github.com/bakliounsaid/appointment/blob/main/app/Livewire/Client/Index.php): `app/Livewire/Client/Index.php`
- [Product catalog](https://github.com/bakliounsaid/appointment/blob/main/app/Livewire/Client/Product/Index.php): `app/Livewire/Client/Product/Index.php`
- [Product details](https://github.com/bakliounsaid/appointment/blob/main/app/Livewire/Client/Product/Show.php): `app/Livewire/Client/Product/Show.php`
- [Purchase result](https://github.com/bakliounsaid/appointment/blob/main/app/Livewire/Client/ThankYou.php): `app/Livewire/Client/ThankYou.php`

### Admin operations

- [Operations dashboard](https://github.com/bakliounsaid/appointment/blob/main/app/Livewire/Admin/Index.php): `app/Livewire/Admin/Index.php`
- [Appointment stages](https://github.com/bakliounsaid/appointment/tree/main/app/Livewire/Admin/Appointment): `app/Livewire/Admin/Appointment`
- [Appointment detail](https://github.com/bakliounsaid/appointment/blob/main/app/Livewire/Admin/Appointment/Detail.php): `app/Livewire/Admin/Appointment/Detail.php`
- [Appointment schedule](https://github.com/bakliounsaid/appointment/blob/main/app/Livewire/Admin/Appointment/Program.php): `app/Livewire/Admin/Appointment/Program.php`
- [Product management](https://github.com/bakliounsaid/appointment/tree/main/app/Livewire/Admin/Product): `app/Livewire/Admin/Product`
- [Category management](https://github.com/bakliounsaid/appointment/tree/main/app/Livewire/Admin/Category): `app/Livewire/Admin/Category`
- [Order management](https://github.com/bakliounsaid/appointment/blob/main/app/Livewire/Admin/Order/Index.php): `app/Livewire/Admin/Order/Index.php`

### Business data

- [Appointments](https://github.com/bakliounsaid/appointment/blob/main/app/Models/Appointment.php): `app/Models/Appointment.php`
- [Appointment statuses](https://github.com/bakliounsaid/appointment/blob/main/app/Models/Status.php): `app/Models/Status.php`
- [Products](https://github.com/bakliounsaid/appointment/blob/main/app/Models/Product.php): `app/Models/Product.php`
- [Orders](https://github.com/bakliounsaid/appointment/blob/main/app/Models/Order.php): `app/Models/Order.php`
- [Search scope](https://github.com/bakliounsaid/appointment/blob/main/app/Traits/Search.php): `app/Traits/Search.php`

### Delivery integration

- [Delivery coordination](https://github.com/bakliounsaid/appointment/blob/main/app/Services/DeliveryContext.php): `app/Services/DeliveryContext.php`
- [Zrexpress API](https://github.com/bakliounsaid/appointment/blob/main/app/Apis/ZrexpressDeliveryApi.php): `app/Apis/ZrexpressDeliveryApi.php`

### Other components

- **Client**
- **Zrexpress**
- **MySQL database**

## Connections

- Client → Appointment booking: books appointment
- Client → Product catalog: browses products
- Client → Product details: purchases products
- Client → Purchase result: tracks request
- Appointment booking → Appointments: creates records
- Product catalog → Products: shows catalog
- Product details → Orders: creates orders
- Operations dashboard → Appointments: summarizes (evidence: `app/Livewire/Admin/Index.php`)
- Operations dashboard → Orders: summarizes (evidence: `app/Livewire/Admin/Index.php`)
- Appointment stages → Appointments: queries stages (evidence: `app/Livewire/Admin/Appointment/Validated.php`)
- Appointment detail → Appointments: updates details (evidence: `app/Livewire/Admin/Appointment/Detail.php`)
- Appointment schedule → Appointments: queries schedule (evidence: `app/Livewire/Admin/Appointment/Program.php`)
- Appointments → Appointment statuses: relates statuses (evidence: `app/Models/Appointment.php`)
- Appointment stages → Search scope: uses search (evidence: `app/Livewire/Admin/Appointment/Validated.php`)
- Product management → Products: manages products
- Category management → Products: organizes products
- Order management → Orders: manages orders (evidence: `app/Livewire/Admin/Order/Index.php`)
- Order management → Delivery coordination: dispatches delivery (evidence: `app/Livewire/Admin/Order/Index.php`)
- Delivery coordination → Zrexpress API: selects provider (evidence: `app/Services/DeliveryContext.php`)
- Zrexpress API → Zrexpress: calls service
- Delivery coordination → Orders: updates tracking (evidence: `app/Services/DeliveryContext.php`)
- Appointments → MySQL database: persists data
- Orders → MySQL database: persists data
