# rektive/restaurantproject architecture

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

- Interactive diagram: https://gitdiagram.com/rektive/restaurantproject
- Repository: https://github.com/rektive/restaurantproject

## Overview

This is a command-line restaurant POS and ordering system. Its main workflow loads food and drink records, presents selectable menus, captures item sizes and food instructions, and adds configured items to a bill; bill output includes subtotal, tax, and total, and reset saves a numbered receipt. Food and Drink specialize a shared Billable interface, while Menu and Utils support selection and input validation. The graph reflects the README’s documented capabilities; the sampled source does not show a production application entry point, so initiating interaction is represented as a terminal user.

Main entry points: [`Ordering.cpp`](https://github.com/rektive/restaurantproject/blob/main/Ordering.cpp) (Ordering engine), [`Menu.cpp`](https://github.com/rektive/restaurantproject/blob/main/Menu.cpp) (Interactive menus), [`Food.cpp`](https://github.com/rektive/restaurantproject/blob/main/Food.cpp) (Food items), [`Drink.cpp`](https://github.com/rektive/restaurantproject/blob/main/Drink.cpp) (Drink items)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ordering["Ordering and billing"]
  node_ordering["Ordering engine<br/>[Ordering.cpp]"]
  node_receipts["Numbered receipts"]
end

subgraph group_catalog["Menu and catalog"]
  node_menu["Interactive menus<br/>[Menu.cpp]"]
  node_fooddata["Food CSV data<br/>[foods.csv]"]
  node_drinkdata["Drink CSV data<br/>[drinks.csv]"]
end

subgraph group_items["Billable items"]
  node_food["Food items<br/>[Food.cpp]"]
  node_drink["Drink items<br/>[Drink.cpp]"]
  node_billable["Billable interface<br/>[Billable.h]"]
end

subgraph group_support["Input support"]
  node_utils["Input and utilities<br/>[Utils.cpp]"]
end

node_user(("Terminal user"))

node_user -->|"initiates ordering"| node_ordering
node_ordering -->|"reads records"| node_fooddata
node_ordering -->|"reads records"| node_drinkdata
node_ordering -->|"loads and configures"| node_food
node_ordering -->|"loads and configures"| node_drink
node_ordering -->|"presents selections"| node_menu
node_menu -->|"validates input"| node_utils
node_ordering -->|"writes numbered bills"| node_receipts
node_food -->|"extends"| node_billable
node_drink -->|"extends"| node_billable

click node_ordering "https://github.com/rektive/restaurantproject/blob/main/Ordering.cpp"
click node_menu "https://github.com/rektive/restaurantproject/blob/main/Menu.cpp"
click node_food "https://github.com/rektive/restaurantproject/blob/main/Food.cpp"
click node_drink "https://github.com/rektive/restaurantproject/blob/main/Drink.cpp"
click node_billable "https://github.com/rektive/restaurantproject/blob/main/Billable.h"
click node_utils "https://github.com/rektive/restaurantproject/blob/main/Utils.cpp"
click node_fooddata "https://github.com/rektive/restaurantproject/blob/main/foods.csv"
click node_drinkdata "https://github.com/rektive/restaurantproject/blob/main/drinks.csv"

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_ordering,node_receipts,node_user toneBlue
class node_menu,node_fooddata,node_drinkdata toneAmber
class node_food,node_drink,node_billable toneMint
class node_utils toneRose
```

## Components

### Ordering and billing

- [Ordering engine](https://github.com/rektive/restaurantproject/blob/main/Ordering.cpp): `Ordering.cpp`
- **Numbered receipts**

### Menu and catalog

- [Interactive menus](https://github.com/rektive/restaurantproject/blob/main/Menu.cpp): `Menu.cpp`
- [Food CSV data](https://github.com/rektive/restaurantproject/blob/main/foods.csv): `foods.csv`
- [Drink CSV data](https://github.com/rektive/restaurantproject/blob/main/drinks.csv): `drinks.csv`

### Billable items

- [Food items](https://github.com/rektive/restaurantproject/blob/main/Food.cpp): `Food.cpp`
- [Drink items](https://github.com/rektive/restaurantproject/blob/main/Drink.cpp): `Drink.cpp`
- [Billable interface](https://github.com/rektive/restaurantproject/blob/main/Billable.h): `Billable.h`

### Input support

- [Input and utilities](https://github.com/rektive/restaurantproject/blob/main/Utils.cpp): `Utils.cpp`

### Other components

- **Terminal user**

## Connections

- Terminal user → Ordering engine: initiates ordering
- Ordering engine → Food CSV data: reads records
- Ordering engine → Drink CSV data: reads records
- Ordering engine → Food items: loads and configures
- Ordering engine → Drink items: loads and configures
- Ordering engine → Interactive menus: presents selections
- Interactive menus → Input and utilities: validates input
- Ordering engine → Numbered receipts: writes numbered bills
- Food items → Billable interface: extends
- Drink items → Billable interface: extends
