# cubra20/newlands architecture

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

- Interactive diagram: https://gitdiagram.com/cubra20/newlands
- Repository: https://github.com/cubra20/newlands

## Overview

Newland’s Café has two implementations: a browser-based shop and a separate console edition. In the website workflow, customers browse and configure menu items, build a persistent order, and place it; staff use the PIN-protected Manage page to handle orders, menu, stock, and messages. The console edition offers its own menu, ordering, and admin flow. The README documents several capabilities whose detailed handlers were not sampled, so those are represented at subsystem level; the Python data-file wiring is not fully evidenced in the excerpts.

Main entry points: [`script.js`](https://github.com/cubra20/newlands/blob/main/script.js) (Page runtime), [`manage.html`](https://github.com/cubra20/newlands/blob/main/manage.html) (Manage page), [`pythonfile/newlands.py`](https://github.com/cubra20/newlands/blob/main/pythonfile/newlands.py) (Console application), [`index.html`](https://github.com/cubra20/newlands/blob/main/index.html) (Home page)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Browser shop"]
  node_home["Home page<br/>[index.html]"]
  node_site_runtime["Page runtime<br/>[script.js]"]
  node_browser_store[("Browser storage")]
end

subgraph group_customer["Customer experience"]
  node_menu_page["Menu page<br/>[menu.html]"]
  node_story_page["Café story<br/>[story.html]"]
  node_contact_page["Contact page<br/>[contact.html]"]
  node_catalog["Menu catalog<br/>[script.js]"]
  node_cart["Order cart<br/>[script.js]"]
  node_checkout["Order placement<br/>[script.js]"]
end

subgraph group_staff["Staff operations"]
  node_manage_page["Manage page<br/>[manage.html]"]
  node_staff_auth["PIN protection<br/>[script.js]"]
  node_order_admin["Order management<br/>[script.js]"]
  node_menu_stock["Menu and stock<br/>[script.js]"]
  node_messages_reports["Messages and reports<br/>[manage.html]"]
end

subgraph group_console["Console edition"]
  node_console_app["Console application<br/>[newlands.py]"]
  node_console_menu["Console menu<br/>[newlands.py]"]
  node_console_order["Console ordering<br/>[newlands.py]"]
  node_console_admin["Console admin<br/>[newlands.py]"]
  node_console_data[("Console data files")]
end

node_customer_actor(("Customer"))
node_staff_actor(("Staff"))
node_console_actor(("Console user"))

node_customer_actor -->|"opens"| node_home
node_customer_actor -->|"browses"| node_menu_page
node_customer_actor -->|"reads"| node_story_page
node_customer_actor -->|"sends message"| node_contact_page
node_staff_actor -->|"opens"| node_manage_page
node_home -->|"loads"| node_site_runtime
node_menu_page -->|"loads"| node_site_runtime
node_story_page -->|"loads"| node_site_runtime
node_contact_page -->|"loads"| node_site_runtime
node_manage_page -->|"loads"| node_site_runtime
node_site_runtime -->|"renders"| node_catalog
node_customer_actor -->|"searches"| node_catalog
node_catalog -->|"adds selections"| node_cart
node_cart -->|"submits"| node_checkout
node_checkout -->|"saves order"| node_browser_store
node_checkout -->|"reduces stock"| node_menu_stock
node_site_runtime -->|"loads and saves"| node_browser_store
node_staff_actor -->|"enters PIN"| node_staff_auth
node_staff_auth -->|"unlocks"| node_manage_page
node_manage_page -->|"manages orders"| node_order_admin
node_manage_page -->|"edits catalog"| node_menu_stock
node_manage_page -->|"views messages and metrics"| node_messages_reports
node_console_actor -->|"uses"| node_console_app
node_console_app -->|"dispatches"| node_console_menu
node_console_app -->|"dispatches"| node_console_order
node_console_app -->|"dispatches"| node_console_admin
node_console_order -.->|"persists orders"| node_console_data
node_console_admin -.->|"persists menu"| node_console_data

click node_home "https://github.com/cubra20/newlands/blob/main/index.html"
click node_menu_page "https://github.com/cubra20/newlands/blob/main/menu.html"
click node_story_page "https://github.com/cubra20/newlands/blob/main/story.html"
click node_contact_page "https://github.com/cubra20/newlands/blob/main/contact.html"
click node_manage_page "https://github.com/cubra20/newlands/blob/main/manage.html"
click node_site_runtime "https://github.com/cubra20/newlands/blob/main/script.js"
click node_catalog "https://github.com/cubra20/newlands/blob/main/script.js"
click node_cart "https://github.com/cubra20/newlands/blob/main/script.js"
click node_checkout "https://github.com/cubra20/newlands/blob/main/script.js"
click node_staff_auth "https://github.com/cubra20/newlands/blob/main/script.js"
click node_order_admin "https://github.com/cubra20/newlands/blob/main/script.js"
click node_menu_stock "https://github.com/cubra20/newlands/blob/main/script.js"
click node_messages_reports "https://github.com/cubra20/newlands/blob/main/manage.html"
click node_console_app "https://github.com/cubra20/newlands/blob/main/pythonfile/newlands.py"
click node_console_menu "https://github.com/cubra20/newlands/blob/main/pythonfile/newlands.py"
click node_console_order "https://github.com/cubra20/newlands/blob/main/pythonfile/newlands.py"
click node_console_admin "https://github.com/cubra20/newlands/blob/main/pythonfile/newlands.py"
click node_console_data "https://github.com/cubra20/newlands/tree/main/pythonfile/data"

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_home,node_site_runtime,node_browser_store,node_console_actor toneBlue
class node_menu_page,node_story_page,node_contact_page,node_catalog,node_cart,node_checkout toneAmber
class node_manage_page,node_staff_auth,node_order_admin,node_menu_stock,node_messages_reports toneMint
class node_console_app,node_console_menu,node_console_order,node_console_admin,node_console_data toneRose
class node_customer_actor,node_staff_actor toneIndigo
```

## Components

### Browser shop

- [Home page](https://github.com/cubra20/newlands/blob/main/index.html): `index.html`
- [Page runtime](https://github.com/cubra20/newlands/blob/main/script.js): `script.js`
- **Browser storage**

### Customer experience

- [Menu page](https://github.com/cubra20/newlands/blob/main/menu.html): `menu.html`
- [Café story](https://github.com/cubra20/newlands/blob/main/story.html): `story.html`
- [Contact page](https://github.com/cubra20/newlands/blob/main/contact.html): `contact.html`
- [Menu catalog](https://github.com/cubra20/newlands/blob/main/script.js): `script.js`
- [Order cart](https://github.com/cubra20/newlands/blob/main/script.js): `script.js`
- [Order placement](https://github.com/cubra20/newlands/blob/main/script.js): `script.js`

### Staff operations

- [Manage page](https://github.com/cubra20/newlands/blob/main/manage.html): `manage.html`
- [PIN protection](https://github.com/cubra20/newlands/blob/main/script.js): `script.js`
- [Order management](https://github.com/cubra20/newlands/blob/main/script.js): `script.js`
- [Menu and stock](https://github.com/cubra20/newlands/blob/main/script.js): `script.js`
- [Messages and reports](https://github.com/cubra20/newlands/blob/main/manage.html): `manage.html`

### Console edition

- [Console application](https://github.com/cubra20/newlands/blob/main/pythonfile/newlands.py): `pythonfile/newlands.py`
- [Console menu](https://github.com/cubra20/newlands/blob/main/pythonfile/newlands.py): `pythonfile/newlands.py`
- [Console ordering](https://github.com/cubra20/newlands/blob/main/pythonfile/newlands.py): `pythonfile/newlands.py`
- [Console admin](https://github.com/cubra20/newlands/blob/main/pythonfile/newlands.py): `pythonfile/newlands.py`
- [Console data files](https://github.com/cubra20/newlands/tree/main/pythonfile/data): `pythonfile/data`

### Other components

- **Customer**
- **Staff**
- **Console user**

## Connections

- Customer → Home page: opens (evidence: `README.md`)
- Customer → Menu page: browses (evidence: `README.md`)
- Customer → Café story: reads (evidence: `README.md`)
- Customer → Contact page: sends message (evidence: `README.md`)
- Staff → Manage page: opens (evidence: `README.md`)
- Home page → Page runtime: loads (evidence: `script.js`)
- Menu page → Page runtime: loads (evidence: `script.js`)
- Café story → Page runtime: loads (evidence: `script.js`)
- Contact page → Page runtime: loads (evidence: `script.js`)
- Manage page → Page runtime: loads (evidence: `script.js`)
- Page runtime → Menu catalog: renders (evidence: `script.js`)
- Customer → Menu catalog: searches (evidence: `README.md`)
- Menu catalog → Order cart: adds selections (evidence: `script.js`)
- Order cart → Order placement: submits (evidence: `script.js`)
- Order placement → Browser storage: saves order (evidence: `README.md`)
- Order placement → Menu and stock: reduces stock (evidence: `script.js`)
- Page runtime → Browser storage: loads and saves (evidence: `README.md`)
- Staff → PIN protection: enters PIN (evidence: `README.md`)
- PIN protection → Manage page: unlocks (evidence: `README.md`)
- Manage page → Order management: manages orders (evidence: `README.md`)
- Manage page → Menu and stock: edits catalog (evidence: `README.md`)
- Manage page → Messages and reports: views messages and metrics (evidence: `README.md`)
- Console user → Console application: uses (evidence: `pythonfile/newlands.py`)
- Console application → Console menu: dispatches (evidence: `pythonfile/newlands.py`)
- Console application → Console ordering: dispatches (evidence: `pythonfile/newlands.py`)
- Console application → Console admin: dispatches (evidence: `pythonfile/newlands.py`)
- Console ordering → Console data files: persists orders
- Console admin → Console data files: persists menu
