# void-of-lust/prototypefypno2 architecture

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

- Interactive diagram: https://gitdiagram.com/void-of-lust/prototypefypno2
- Repository: https://github.com/void-of-lust/prototypefypno2

## Overview

PrototypeFyp is a Flask restaurant-ordering app for table-based customer orders, kitchen preparation, and admin management. The customer flow selects an order type, optionally uploads a food image, browses available drinks, places an order, and checks its status. Kitchen staff update drink-order statuses; admins manage the menu, payments, food prices, and sales/table dashboards. The excerpts show route-to-model and route-to-utility usage; database details come from the ORM models. The README provides no additional product description, and unsampled template behavior is not expanded here.

Main entry points: [`app/customer/routes.py`](https://github.com/void-of-lust/prototypefypno2/blob/main/app/customer/routes.py) (Order journey), [`app/kitchen/routes.py`](https://github.com/void-of-lust/prototypefypno2/blob/main/app/kitchen/routes.py) (Kitchen orders), [`app/admin/routes.py`](https://github.com/void-of-lust/prototypefypno2/blob/main/app/admin/routes.py) (Admin dashboard), [`app/models.py`](https://github.com/void-of-lust/prototypefypno2/blob/main/app/models.py) (Order models)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_customer["Customer ordering"]
  node_customer_flow["Order journey<br/>[routes.py]"]
  node_customer_status["Order status<br/>[routes.py]"]
end

subgraph group_operations["Order operations"]
  node_kitchen_orders["Kitchen orders<br/>[routes.py]"]
  node_admin_ops["Admin dashboard<br/>[routes.py]"]
end

subgraph group_platform["App platform"]
  node_auth["Role login<br/>[__init__.py]"]
  node_app_setup["App factory<br/>[__init__.py]"]
  node_domain_models["Order models<br/>[models.py]"]
  node_db_extension["SQLAlchemy extension<br/>[extensions.py]"]
  node_database[("Relational database")]
  node_shared_utils["Validation and uploads<br/>[utils.py]"]
end

node_customer_actor(("Customer"))
node_kitchen_actor(("Kitchen staff"))
node_admin_actor(("Administrator"))

node_customer_actor -->|"places order"| node_customer_flow
node_customer_flow -->|"redirects to"| node_customer_status
node_customer_flow -->|"creates and queries"| node_domain_models
node_customer_status -->|"reads status"| node_domain_models
node_customer_flow -->|"validates uploads"| node_shared_utils
node_kitchen_actor -->|"updates orders"| node_kitchen_orders
node_kitchen_orders -->|"queries and updates"| node_domain_models
node_kitchen_orders -->|"uses time helpers"| node_shared_utils
node_admin_actor -->|"manages service"| node_admin_ops
node_admin_ops -->|"queries and updates"| node_domain_models
node_admin_ops -->|"validates and stores images"| node_shared_utils
node_app_setup -->|"defines routes"| node_auth
node_app_setup -->|"registers blueprint"| node_customer_flow
node_app_setup -->|"registers blueprint"| node_kitchen_orders
node_app_setup -->|"registers blueprint"| node_admin_ops
node_domain_models -->|"maps with"| node_db_extension
node_customer_flow -->|"reads and writes"| node_database
node_customer_status -->|"reads"| node_database
node_kitchen_orders -->|"reads and writes"| node_database
node_admin_ops -->|"reads and writes"| node_database

click node_customer_flow "https://github.com/void-of-lust/prototypefypno2/blob/main/app/customer/routes.py"
click node_customer_status "https://github.com/void-of-lust/prototypefypno2/blob/main/app/customer/routes.py"
click node_kitchen_orders "https://github.com/void-of-lust/prototypefypno2/blob/main/app/kitchen/routes.py"
click node_admin_ops "https://github.com/void-of-lust/prototypefypno2/blob/main/app/admin/routes.py"
click node_auth "https://github.com/void-of-lust/prototypefypno2/blob/main/app/__init__.py"
click node_app_setup "https://github.com/void-of-lust/prototypefypno2/blob/main/app/__init__.py"
click node_domain_models "https://github.com/void-of-lust/prototypefypno2/blob/main/app/models.py"
click node_db_extension "https://github.com/void-of-lust/prototypefypno2/blob/main/app/extensions.py"
click node_shared_utils "https://github.com/void-of-lust/prototypefypno2/blob/main/app/utils.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_customer_flow,node_customer_status toneBlue
class node_kitchen_orders,node_admin_ops toneAmber
class node_auth,node_app_setup,node_domain_models,node_db_extension,node_database,node_shared_utils toneMint
class node_customer_actor,node_kitchen_actor,node_admin_actor toneIndigo
```

## Components

### Customer ordering

- [Order journey](https://github.com/void-of-lust/prototypefypno2/blob/main/app/customer/routes.py): `app/customer/routes.py`
- [Order status](https://github.com/void-of-lust/prototypefypno2/blob/main/app/customer/routes.py): `app/customer/routes.py`

### Order operations

- [Kitchen orders](https://github.com/void-of-lust/prototypefypno2/blob/main/app/kitchen/routes.py): `app/kitchen/routes.py`
- [Admin dashboard](https://github.com/void-of-lust/prototypefypno2/blob/main/app/admin/routes.py): `app/admin/routes.py`

### App platform

- [Role login](https://github.com/void-of-lust/prototypefypno2/blob/main/app/__init__.py): `app/__init__.py`
- [App factory](https://github.com/void-of-lust/prototypefypno2/blob/main/app/__init__.py): `app/__init__.py`
- [Order models](https://github.com/void-of-lust/prototypefypno2/blob/main/app/models.py): `app/models.py`
- [SQLAlchemy extension](https://github.com/void-of-lust/prototypefypno2/blob/main/app/extensions.py): `app/extensions.py`
- **Relational database**
- [Validation and uploads](https://github.com/void-of-lust/prototypefypno2/blob/main/app/utils.py): `app/utils.py`

### Other components

- **Customer**
- **Kitchen staff**
- **Administrator**

## Connections

- Customer → Order journey: places order (evidence: `app/customer/routes.py`)
- Order journey → Order status: redirects to (evidence: `app/customer/routes.py`)
- Order journey → Order models: creates and queries (evidence: `app/customer/routes.py`)
- Order status → Order models: reads status (evidence: `app/customer/routes.py`)
- Order journey → Validation and uploads: validates uploads (evidence: `app/customer/routes.py`)
- Kitchen staff → Kitchen orders: updates orders (evidence: `app/kitchen/routes.py`)
- Kitchen orders → Order models: queries and updates (evidence: `app/kitchen/routes.py`)
- Kitchen orders → Validation and uploads: uses time helpers (evidence: `app/kitchen/routes.py`)
- Administrator → Admin dashboard: manages service (evidence: `app/admin/routes.py`)
- Admin dashboard → Order models: queries and updates (evidence: `app/admin/routes.py`)
- Admin dashboard → Validation and uploads: validates and stores images (evidence: `app/admin/routes.py`)
- App factory → Role login: defines routes (evidence: `app/__init__.py`)
- App factory → Order journey: registers blueprint (evidence: `app/__init__.py`)
- App factory → Kitchen orders: registers blueprint (evidence: `app/__init__.py`)
- App factory → Admin dashboard: registers blueprint (evidence: `app/__init__.py`)
- Order models → SQLAlchemy extension: maps with (evidence: `app/models.py`)
- Order journey → Relational database: reads and writes (evidence: `app/customer/routes.py`)
- Order status → Relational database: reads (evidence: `app/customer/routes.py`)
- Kitchen orders → Relational database: reads and writes (evidence: `app/kitchen/routes.py`)
- Admin dashboard → Relational database: reads and writes (evidence: `app/admin/routes.py`)
