# iamhusnain-1214/restaurant-system architecture

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

- Interactive diagram: https://gitdiagram.com/iamhusnain-1214/restaurant-system
- Repository: https://github.com/iamhusnain-1214/restaurant-system

## Overview

This is a Raylib restaurant-management application. A user navigates the UI to browse the menu, register customers and riders, place and track orders, and create reservations; the main loop coordinates these operations with the domain objects. Menu pricing, order totals/status, rider assignment, and table-slot availability are represented in the object model. The excerpts establish several direct interactions, but do not show all order-placement and rider-assignment UI logic, so those links are omitted.

Main entry points: [`BSAI25005-main.cpp`](https://github.com/iamhusnain-1214/restaurant-system/blob/main/BSAI25005-main.cpp) (Raylib Application), [`BSAI25005-Resturant.h`](https://github.com/iamhusnain-1214/restaurant-system/blob/main/BSAI25005-Resturant.h) (Restaurant), [`BSAI25005-Order.cpp`](https://github.com/iamhusnain-1214/restaurant-system/blob/main/BSAI25005-Order.cpp) (Order), [`BSAI25005-Menu.cpp`](https://github.com/iamhusnain-1214/restaurant-system/blob/main/BSAI25005-Menu.cpp) (Menu)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Application UI"]
  node_app["Raylib Application<br/>[BSAI25005-main.cpp]"]
end

subgraph group_catalog["Menu Catalog"]
  node_menu["Menu<br/>[BSAI25005-Menu.cpp]"]
  node_menuitem["Menu Item"]
end

subgraph group_operations["Restaurant Operations"]
  node_restaurant["Restaurant"]
  node_customer["Customer"]
  node_order["Order"]
  node_rider["Rider"]
  node_reservation["Reservation"]
end

node_user(("Restaurant User"))

node_user -->|"uses"| node_app
node_app -->|"creates"| node_restaurant
node_app -->|"retrieves"| node_menu
node_restaurant -->|"owns"| node_menu
node_menu -->|"creates"| node_menuitem
node_app -->|"registers"| node_customer
node_app -->|"registers"| node_rider
node_app -->|"creates"| node_order
node_order -->|"displays"| node_customer
node_order -->|"prices items"| node_menuitem
node_order -->|"assigns"| node_rider
node_app -->|"creates"| node_reservation
node_app -->|"checks availability"| node_restaurant
node_app -->|"adds reservation"| node_restaurant
node_restaurant -->|"checks slots"| node_reservation

click node_app "https://github.com/iamhusnain-1214/restaurant-system/blob/main/BSAI25005-main.cpp"
click node_restaurant "https://github.com/iamhusnain-1214/restaurant-system/blob/main/BSAI25005-Resturant.h"
click node_menu "https://github.com/iamhusnain-1214/restaurant-system/blob/main/BSAI25005-Menu.cpp"
click node_menuitem "https://github.com/iamhusnain-1214/restaurant-system/blob/main/BSAI25005-MenuItem.cpp"
click node_customer "https://github.com/iamhusnain-1214/restaurant-system/blob/main/BSAI25005-Customer.cpp"
click node_order "https://github.com/iamhusnain-1214/restaurant-system/blob/main/BSAI25005-Order.cpp"
click node_rider "https://github.com/iamhusnain-1214/restaurant-system/blob/main/BSAI25005-Rider.cpp"
click node_reservation "https://github.com/iamhusnain-1214/restaurant-system/blob/main/BSAI25005-Reservation.cpp"

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_app,node_user toneBlue
class node_menu,node_menuitem toneAmber
class node_restaurant,node_customer,node_order,node_rider,node_reservation toneMint
```

## Components

### Application UI

- [Raylib Application](https://github.com/iamhusnain-1214/restaurant-system/blob/main/BSAI25005-main.cpp): `BSAI25005-main.cpp`

### Menu Catalog

- [Menu](https://github.com/iamhusnain-1214/restaurant-system/blob/main/BSAI25005-Menu.cpp): `BSAI25005-Menu.cpp`
- [Menu Item](https://github.com/iamhusnain-1214/restaurant-system/blob/main/BSAI25005-MenuItem.cpp): `BSAI25005-MenuItem.cpp`

### Restaurant Operations

- [Restaurant](https://github.com/iamhusnain-1214/restaurant-system/blob/main/BSAI25005-Resturant.h): `BSAI25005-Resturant.h`
- [Customer](https://github.com/iamhusnain-1214/restaurant-system/blob/main/BSAI25005-Customer.cpp): `BSAI25005-Customer.cpp`
- [Order](https://github.com/iamhusnain-1214/restaurant-system/blob/main/BSAI25005-Order.cpp): `BSAI25005-Order.cpp`
- [Rider](https://github.com/iamhusnain-1214/restaurant-system/blob/main/BSAI25005-Rider.cpp): `BSAI25005-Rider.cpp`
- [Reservation](https://github.com/iamhusnain-1214/restaurant-system/blob/main/BSAI25005-Reservation.cpp): `BSAI25005-Reservation.cpp`

### Other components

- **Restaurant User**

## Connections

- Restaurant User → Raylib Application: uses (evidence: `README.md`)
- Raylib Application → Restaurant: creates (evidence: `BSAI25005-main.cpp`)
- Raylib Application → Menu: retrieves (evidence: `BSAI25005-main.cpp`)
- Restaurant → Menu: owns (evidence: `BSAI25005-Resturant.h`)
- Menu → Menu Item: creates (evidence: `BSAI25005-Menu.cpp`)
- Raylib Application → Customer: registers (evidence: `BSAI25005-main.cpp`)
- Raylib Application → Rider: registers (evidence: `BSAI25005-main.cpp`)
- Raylib Application → Order: creates (evidence: `BSAI25005-main.cpp`)
- Order → Customer: displays (evidence: `BSAI25005-Order.cpp`)
- Order → Menu Item: prices items (evidence: `BSAI25005-Order.cpp`)
- Order → Rider: assigns (evidence: `BSAI25005-Order.cpp`)
- Raylib Application → Reservation: creates (evidence: `BSAI25005-main.cpp`)
- Raylib Application → Restaurant: checks availability (evidence: `BSAI25005-main.cpp`)
- Raylib Application → Restaurant: adds reservation (evidence: `BSAI25005-main.cpp`)
- Restaurant → Reservation: checks slots (evidence: `BSAI25005-Resturant.h`)
