# francissdc/coffee-pos architecture

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

- Interactive diagram: https://gitdiagram.com/francissdc/coffee-pos
- Repository: https://github.com/francissdc/coffee-pos

## Overview

Coffee-POS is a browser-based coffee-shop point-of-sale app. Staff and managers use the interface to browse products, build discounted orders, and track order status; managers also edit the menu and review or print sales reports. The sampled JavaScript is a monolithic implementation, so several domain stages share its path. Edges reflect the excerpted calls and README-described capabilities; unsampled wiring is not asserted.

Main entry points: [`script.js`](https://github.com/francissdc/coffee-pos/blob/main/script.js) (Order processing), [`index.html`](https://github.com/francissdc/coffee-pos/blob/main/index.html) (POS interface), [`login.html`](https://github.com/francissdc/coffee-pos/blob/main/login.html) (Role login), [`products.json`](https://github.com/francissdc/coffee-pos/blob/main/products.json) (Product data)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Access and interface"]
  node_login["Role login<br/>[login.html]"]
  node_pos["POS interface<br/>[index.html]"]
end

subgraph group_sales["Sales workflow"]
  node_catalogue["Product catalogue<br/>[script.js]"]
  node_menu_data["Product data<br/>[products.json]"]
  node_basket["Basket and discounts<br/>[script.js]"]
  node_order["Order processing<br/>[script.js]"]
end

subgraph group_operations["Order operations"]
  node_storage[("Browser storage")]
  node_kitchen["Kitchen queue<br/>[script.js]"]
end

subgraph group_management["Manager tools"]
  node_history["Order history<br/>[script.js]"]
  node_menu_admin["Menu management<br/>[script.js]"]
  node_sales_report["Sales reporting<br/>[script.js]"]
end

node_staff(("Staff or manager"))

node_staff -->|"signs in"| node_login
node_login -->|"enters"| node_pos
node_staff -->|"uses"| node_pos
node_pos -->|"browses"| node_catalogue
node_catalogue -->|"loads"| node_menu_data
node_staff -->|"builds order"| node_basket
node_basket -->|"submits"| node_order
node_order -->|"persists"| node_storage
node_order -->|"routes"| node_kitchen
node_kitchen -->|"saves status"| node_storage
node_staff -->|"updates status"| node_kitchen
node_storage -->|"loads orders"| node_history
node_staff -->|"manages menu"| node_menu_admin
node_menu_admin -->|"saves menu"| node_storage
node_staff -->|"reviews sales"| node_sales_report
node_history -->|"summarizes"| node_sales_report

click node_login "https://github.com/francissdc/coffee-pos/blob/main/login.html"
click node_pos "https://github.com/francissdc/coffee-pos/blob/main/index.html"
click node_catalogue "https://github.com/francissdc/coffee-pos/blob/main/script.js"
click node_menu_data "https://github.com/francissdc/coffee-pos/blob/main/products.json"
click node_basket "https://github.com/francissdc/coffee-pos/blob/main/script.js"
click node_order "https://github.com/francissdc/coffee-pos/blob/main/script.js"
click node_kitchen "https://github.com/francissdc/coffee-pos/blob/main/script.js"
click node_history "https://github.com/francissdc/coffee-pos/blob/main/script.js"
click node_menu_admin "https://github.com/francissdc/coffee-pos/blob/main/script.js"
click node_sales_report "https://github.com/francissdc/coffee-pos/blob/main/script.js"

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_login,node_pos toneBlue
class node_catalogue,node_menu_data,node_basket,node_order toneAmber
class node_storage,node_kitchen toneMint
class node_history,node_menu_admin,node_sales_report toneRose
class node_staff toneIndigo
```

## Components

### Access and interface

- [Role login](https://github.com/francissdc/coffee-pos/blob/main/login.html): `login.html`
- [POS interface](https://github.com/francissdc/coffee-pos/blob/main/index.html): `index.html`

### Sales workflow

- [Product catalogue](https://github.com/francissdc/coffee-pos/blob/main/script.js): `script.js`
- [Product data](https://github.com/francissdc/coffee-pos/blob/main/products.json): `products.json`
- [Basket and discounts](https://github.com/francissdc/coffee-pos/blob/main/script.js): `script.js`
- [Order processing](https://github.com/francissdc/coffee-pos/blob/main/script.js): `script.js`

### Order operations

- **Browser storage**
- [Kitchen queue](https://github.com/francissdc/coffee-pos/blob/main/script.js): `script.js`

### Manager tools

- [Order history](https://github.com/francissdc/coffee-pos/blob/main/script.js): `script.js`
- [Menu management](https://github.com/francissdc/coffee-pos/blob/main/script.js): `script.js`
- [Sales reporting](https://github.com/francissdc/coffee-pos/blob/main/script.js): `script.js`

### Other components

- **Staff or manager**

## Connections

- Staff or manager → Role login: signs in
- Role login → POS interface: enters
- Staff or manager → POS interface: uses (evidence: `README.md`)
- POS interface → Product catalogue: browses (evidence: `README.md`)
- Product catalogue → Product data: loads (evidence: `script.js`)
- Staff or manager → Basket and discounts: builds order (evidence: `README.md`)
- Basket and discounts → Order processing: submits (evidence: `script.js`)
- Order processing → Browser storage: persists (evidence: `script.js`)
- Order processing → Kitchen queue: routes (evidence: `README.md`)
- Kitchen queue → Browser storage: saves status (evidence: `script.js`)
- Staff or manager → Kitchen queue: updates status (evidence: `README.md`)
- Browser storage → Order history: loads orders (evidence: `README.md`)
- Staff or manager → Menu management: manages menu (evidence: `README.md`)
- Menu management → Browser storage: saves menu (evidence: `README.md`)
- Staff or manager → Sales reporting: reviews sales (evidence: `README.md`)
- Order history → Sales reporting: summarizes (evidence: `README.md`)
