# kiruiian/platter architecture

> Architecture diagram of the GitHub repository kiruiian/platter, 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/kiruiian/platter
- Repository: https://github.com/kiruiian/platter

## Overview

This is a Flask restaurant meal-management application. Staff log in, then use the menu and table screens; the sampled code supports authenticated menu viewing and administrator menu/table maintenance. The data model also defines orders, order lines, and payments, but the relevant handlers are omitted, so their operational flow is not shown. The database is configured for PostgreSQL; only the supplied source excerpt was inspected.

Main entry points: [`app.py`](https://github.com/kiruiian/platter/blob/main/app.py) (SQLAlchemy models), [`templates/login.html`](https://github.com/kiruiian/platter/blob/main/templates/login.html) (Login screen), [`templates/menu.html`](https://github.com/kiruiian/platter/blob/main/templates/menu.html) (Menu screen), [`templates/tables.html`](https://github.com/kiruiian/platter/blob/main/templates/tables.html) (Tables screen)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Staff access"]
  node_app["Flask application<br/>[app.py]"]
  node_login["Login and roles<br/>[app.py]"]
  node_loginpage["Login screen<br/>[login.html]"]
  node_dashboard["Dashboard screen<br/>[dashboard.html]"]
end

subgraph group_operations["Restaurant operations"]
  node_menu["Menu management<br/>[app.py]"]
  node_menupage["Menu screen<br/>[menu.html]"]
  node_tables["Table management<br/>[app.py]"]
  node_tablespage["Tables screen<br/>[tables.html]"]
  node_orders["Meal order records<br/>[app.py]"]
  node_payments["Payment records<br/>[app.py]"]
  node_totals["Order totals<br/>[app.py]"]
end

subgraph group_data["Persistence"]
  node_models["SQLAlchemy models<br/>[app.py]"]
  node_database[("PostgreSQL database")]
end

node_staff(("Staff"))

node_staff -->|"sends requests"| node_app
node_app -->|"dispatches login"| node_login
node_login -->|"checks user"| node_database
node_login -->|"renders"| node_loginpage
node_app -->|"dispatches menu"| node_menu
node_menu -->|"reads and writes"| node_database
node_menu -->|"renders"| node_menupage
node_app -->|"dispatches tables"| node_tables
node_tables -->|"reads and writes"| node_database
node_tables -->|"renders"| node_tablespage
node_models -->|"defines schema"| node_database
node_models -->|"models"| node_orders
node_models -->|"models"| node_payments
node_models -->|"stores totals"| node_totals

click node_app "https://github.com/kiruiian/platter/blob/main/app.py"
click node_login "https://github.com/kiruiian/platter/blob/main/app.py"
click node_loginpage "https://github.com/kiruiian/platter/blob/main/templates/login.html"
click node_dashboard "https://github.com/kiruiian/platter/blob/main/templates/dashboard.html"
click node_menu "https://github.com/kiruiian/platter/blob/main/app.py"
click node_menupage "https://github.com/kiruiian/platter/blob/main/templates/menu.html"
click node_tables "https://github.com/kiruiian/platter/blob/main/app.py"
click node_tablespage "https://github.com/kiruiian/platter/blob/main/templates/tables.html"
click node_orders "https://github.com/kiruiian/platter/blob/main/app.py"
click node_payments "https://github.com/kiruiian/platter/blob/main/app.py"
click node_totals "https://github.com/kiruiian/platter/blob/main/app.py"
click node_models "https://github.com/kiruiian/platter/blob/main/app.py"

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_login,node_loginpage,node_dashboard toneBlue
class node_menu,node_menupage,node_tables,node_tablespage,node_orders,node_payments,node_totals toneAmber
class node_models,node_database toneMint
class node_staff toneIndigo
```

## Components

### Staff access

- [Flask application](https://github.com/kiruiian/platter/blob/main/app.py): `app.py`
- [Login and roles](https://github.com/kiruiian/platter/blob/main/app.py): `app.py`
- [Login screen](https://github.com/kiruiian/platter/blob/main/templates/login.html): `templates/login.html`
- [Dashboard screen](https://github.com/kiruiian/platter/blob/main/templates/dashboard.html): `templates/dashboard.html`

### Restaurant operations

- [Menu management](https://github.com/kiruiian/platter/blob/main/app.py): `app.py`
- [Menu screen](https://github.com/kiruiian/platter/blob/main/templates/menu.html): `templates/menu.html`
- [Table management](https://github.com/kiruiian/platter/blob/main/app.py): `app.py`
- [Tables screen](https://github.com/kiruiian/platter/blob/main/templates/tables.html): `templates/tables.html`
- [Meal order records](https://github.com/kiruiian/platter/blob/main/app.py): `app.py`
- [Payment records](https://github.com/kiruiian/platter/blob/main/app.py): `app.py`
- [Order totals](https://github.com/kiruiian/platter/blob/main/app.py): `app.py`

### Persistence

- [SQLAlchemy models](https://github.com/kiruiian/platter/blob/main/app.py): `app.py`
- **PostgreSQL database**

### Other components

- **Staff**

## Connections

- Staff → Flask application: sends requests
- Flask application → Login and roles: dispatches login
- Login and roles → PostgreSQL database: checks user
- Login and roles → Login screen: renders
- Flask application → Menu management: dispatches menu
- Menu management → PostgreSQL database: reads and writes
- Menu management → Menu screen: renders
- Flask application → Table management: dispatches tables
- Table management → PostgreSQL database: reads and writes
- Table management → Tables screen: renders
- SQLAlchemy models → PostgreSQL database: defines schema
- SQLAlchemy models → Meal order records: models
- SQLAlchemy models → Payment records: models
- SQLAlchemy models → Order totals: stores totals
