# funlightstudios/food-delivery-platform architecture

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

- Interactive diagram: https://gitdiagram.com/funlightstudios/food-delivery-platform
- Repository: https://github.com/funlightstudios/food-delivery-platform

## Overview

SwissEat is a Flask food-delivery platform for customers, restaurant owners, and site staff. The main customer journey is browsing restaurants and menus, adding items to a cart, checking out with an accepted payment method, tracking orders, and reviewing delivered orders. Separate branches cover account management, restaurant operations, and staff administration. The excerpts show route-to-model interactions and app blueprint registration; other documented capabilities are represented, but unsampled implementation details and integrations are not inferred.

Main entry points: [`swisseat/__init__.py`](https://github.com/funlightstudios/food-delivery-platform/blob/main/swisseat/__init__.py) (Flask App), [`swisseat/models.py`](https://github.com/funlightstudios/food-delivery-platform/blob/main/swisseat/models.py) (Domain Models), [`swisseat/restaurants/routes.py`](https://github.com/funlightstudios/food-delivery-platform/blob/main/swisseat/restaurants/routes.py) (Restaurant Discovery), [`swisseat/orders/routes.py`](https://github.com/funlightstudios/food-delivery-platform/blob/main/swisseat/orders/routes.py) (Checkout & Orders)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application Core"]
  node_app_factory["Flask App<br/>[__init__.py]"]
  node_db_config["Database Config<br/>[config.py]"]
end

subgraph group_customer["Customer Journey"]
  node_restaurants["Restaurant Discovery<br/>[routes.py]"]
  node_home["Home Page<br/>[routes.py]"]
  node_cart["Shopping Cart<br/>[routes.py]"]
  node_checkout["Checkout &amp; Orders<br/>[routes.py]"]
  node_accounts["Accounts &amp; Addresses<br/>[routes.py]"]
  node_reviews["Restaurant Reviews<br/>[routes.py]"]
end

subgraph group_merchant["Restaurant Operations"]
  node_merchant_ops["Restaurant Operations<br/>[routes.py]"]
  node_merchant_admin["Owner Dashboard<br/>[routes.py]"]
end

subgraph group_staff["Staff Administration"]
  node_staff_backend["Staff Backend<br/>[routes.py]"]
  node_site_admin["Site Admin<br/>[routes.py]"]
end

subgraph group_domain["Shared Domain"]
  node_forms["Form Definitions<br/>[forms.py]"]
  node_restaurant_forms["Restaurant Forms<br/>[forms.py]"]
  node_review_forms["Review Forms<br/>[forms.py]"]
  node_backend_forms["Backend Forms<br/>[forms.py]"]
  node_models["Domain Models<br/>[models.py]"]
end

node_visitor(("Customer"))
node_owner(("Restaurant Owner"))
node_staff_actor(("Site Staff"))
node_database[("SQL Database")]
node_payment["Payment Options"]

node_visitor -->|"browses"| node_home
node_home -->|"queries restaurants"| node_models
node_visitor -->|"searches menus"| node_restaurants
node_restaurants -->|"queries listings"| node_models
node_visitor -->|"registers or signs in"| node_accounts
node_accounts -->|"reads and writes accounts"| node_models
node_visitor -->|"adds items"| node_cart
node_cart -->|"reads and updates cart"| node_models
node_visitor -->|"places order"| node_checkout
node_checkout -->|"creates order items"| node_models
node_checkout -->|"checks accepted methods"| node_payment
node_visitor -->|"rates delivered order"| node_reviews
node_reviews -->|"stores review and rating"| node_models
node_owner -->|"manages restaurant"| node_merchant_ops
node_merchant_ops -->|"updates menu and orders"| node_models
node_owner -->|"views dashboard"| node_merchant_admin
node_merchant_admin -->|"queries management data"| node_models
node_staff_actor -.->|"uses backend"| node_staff_backend
node_staff_backend -->|"queries site data"| node_models
node_staff_actor -.->|"administers site"| node_site_admin
node_app_factory -->|"registers blueprint"| node_accounts
node_app_factory -->|"registers blueprint"| node_restaurants
node_app_factory -->|"registers blueprint"| node_home
node_app_factory -->|"registers blueprint"| node_cart
node_app_factory -->|"registers blueprint"| node_checkout
node_app_factory -->|"registers blueprint"| node_reviews
node_app_factory -->|"registers blueprint"| node_site_admin
node_app_factory -->|"registers blueprint"| node_staff_backend
node_app_factory -->|"loads configuration"| node_db_config
node_models -.->|"persists entities"| node_database
node_restaurants -->|"uses forms"| node_restaurant_forms
node_accounts -->|"uses forms"| node_forms
node_reviews -->|"uses forms"| node_review_forms
node_staff_backend -->|"uses forms"| node_backend_forms

click node_app_factory "https://github.com/funlightstudios/food-delivery-platform/blob/main/swisseat/__init__.py"
click node_db_config "https://github.com/funlightstudios/food-delivery-platform/blob/main/swisseat/config.py"
click node_restaurants "https://github.com/funlightstudios/food-delivery-platform/blob/main/swisseat/restaurants/routes.py"
click node_home "https://github.com/funlightstudios/food-delivery-platform/blob/main/swisseat/main/routes.py"
click node_cart "https://github.com/funlightstudios/food-delivery-platform/blob/main/swisseat/cart/routes.py"
click node_checkout "https://github.com/funlightstudios/food-delivery-platform/blob/main/swisseat/orders/routes.py"
click node_accounts "https://github.com/funlightstudios/food-delivery-platform/blob/main/swisseat/users/routes.py"
click node_reviews "https://github.com/funlightstudios/food-delivery-platform/blob/main/swisseat/reviews/routes.py"
click node_merchant_ops "https://github.com/funlightstudios/food-delivery-platform/blob/main/swisseat/restaurants/routes.py"
click node_merchant_admin "https://github.com/funlightstudios/food-delivery-platform/blob/main/swisseat/admin/routes.py"
click node_staff_backend "https://github.com/funlightstudios/food-delivery-platform/blob/main/swisseat/backend/routes.py"
click node_site_admin "https://github.com/funlightstudios/food-delivery-platform/blob/main/swisseat/admin/routes.py"
click node_forms "https://github.com/funlightstudios/food-delivery-platform/blob/main/swisseat/users/forms.py"
click node_restaurant_forms "https://github.com/funlightstudios/food-delivery-platform/blob/main/swisseat/restaurants/forms.py"
click node_review_forms "https://github.com/funlightstudios/food-delivery-platform/blob/main/swisseat/reviews/forms.py"
click node_backend_forms "https://github.com/funlightstudios/food-delivery-platform/blob/main/swisseat/backend/forms.py"
click node_models "https://github.com/funlightstudios/food-delivery-platform/blob/main/swisseat/models.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_factory,node_db_config toneBlue
class node_restaurants,node_home,node_cart,node_checkout,node_accounts,node_reviews,node_database toneAmber
class node_merchant_ops,node_merchant_admin toneMint
class node_staff_backend,node_site_admin toneRose
class node_forms,node_restaurant_forms,node_review_forms,node_backend_forms,node_models,node_visitor,node_owner,node_staff_actor,node_payment toneIndigo
```

## Components

### Application Core

- [Flask App](https://github.com/funlightstudios/food-delivery-platform/blob/main/swisseat/__init__.py): `swisseat/__init__.py`
- [Database Config](https://github.com/funlightstudios/food-delivery-platform/blob/main/swisseat/config.py): `swisseat/config.py`

### Customer Journey

- [Restaurant Discovery](https://github.com/funlightstudios/food-delivery-platform/blob/main/swisseat/restaurants/routes.py): `swisseat/restaurants/routes.py`
- [Home Page](https://github.com/funlightstudios/food-delivery-platform/blob/main/swisseat/main/routes.py): `swisseat/main/routes.py`
- [Shopping Cart](https://github.com/funlightstudios/food-delivery-platform/blob/main/swisseat/cart/routes.py): `swisseat/cart/routes.py`
- [Checkout & Orders](https://github.com/funlightstudios/food-delivery-platform/blob/main/swisseat/orders/routes.py): `swisseat/orders/routes.py`
- [Accounts & Addresses](https://github.com/funlightstudios/food-delivery-platform/blob/main/swisseat/users/routes.py): `swisseat/users/routes.py`
- [Restaurant Reviews](https://github.com/funlightstudios/food-delivery-platform/blob/main/swisseat/reviews/routes.py): `swisseat/reviews/routes.py`

### Restaurant Operations

- [Restaurant Operations](https://github.com/funlightstudios/food-delivery-platform/blob/main/swisseat/restaurants/routes.py): `swisseat/restaurants/routes.py`
- [Owner Dashboard](https://github.com/funlightstudios/food-delivery-platform/blob/main/swisseat/admin/routes.py): `swisseat/admin/routes.py`

### Staff Administration

- [Staff Backend](https://github.com/funlightstudios/food-delivery-platform/blob/main/swisseat/backend/routes.py): `swisseat/backend/routes.py`
- [Site Admin](https://github.com/funlightstudios/food-delivery-platform/blob/main/swisseat/admin/routes.py): `swisseat/admin/routes.py`

### Shared Domain

- [Form Definitions](https://github.com/funlightstudios/food-delivery-platform/blob/main/swisseat/users/forms.py): `swisseat/users/forms.py`
- [Restaurant Forms](https://github.com/funlightstudios/food-delivery-platform/blob/main/swisseat/restaurants/forms.py): `swisseat/restaurants/forms.py`
- [Review Forms](https://github.com/funlightstudios/food-delivery-platform/blob/main/swisseat/reviews/forms.py): `swisseat/reviews/forms.py`
- [Backend Forms](https://github.com/funlightstudios/food-delivery-platform/blob/main/swisseat/backend/forms.py): `swisseat/backend/forms.py`
- [Domain Models](https://github.com/funlightstudios/food-delivery-platform/blob/main/swisseat/models.py): `swisseat/models.py`

### Other components

- **Customer**
- **Restaurant Owner**
- **Site Staff**
- **SQL Database**
- **Payment Options**

## Connections

- Customer → Home Page: browses (evidence: `README.md`)
- Home Page → Domain Models: queries restaurants (evidence: `swisseat/main/routes.py`)
- Customer → Restaurant Discovery: searches menus (evidence: `README.md`)
- Restaurant Discovery → Domain Models: queries listings (evidence: `swisseat/restaurants/routes.py`)
- Customer → Accounts & Addresses: registers or signs in (evidence: `README.md`)
- Accounts & Addresses → Domain Models: reads and writes accounts (evidence: `swisseat/users/routes.py`)
- Customer → Shopping Cart: adds items (evidence: `README.md`)
- Shopping Cart → Domain Models: reads and updates cart (evidence: `swisseat/cart/routes.py`)
- Customer → Checkout & Orders: places order (evidence: `README.md`)
- Checkout & Orders → Domain Models: creates order items (evidence: `swisseat/orders/routes.py`)
- Checkout & Orders → Payment Options: checks accepted methods (evidence: `swisseat/orders/routes.py`)
- Customer → Restaurant Reviews: rates delivered order (evidence: `swisseat/reviews/routes.py`)
- Restaurant Reviews → Domain Models: stores review and rating (evidence: `swisseat/reviews/routes.py`)
- Restaurant Owner → Restaurant Operations: manages restaurant (evidence: `README.md`)
- Restaurant Operations → Domain Models: updates menu and orders (evidence: `swisseat/restaurants/routes.py`)
- Restaurant Owner → Owner Dashboard: views dashboard (evidence: `README.md`)
- Owner Dashboard → Domain Models: queries management data (evidence: `swisseat/admin/routes.py`)
- Site Staff → Staff Backend: uses backend (evidence: `README.md`)
- Staff Backend → Domain Models: queries site data (evidence: `swisseat/backend/routes.py`)
- Site Staff → Site Admin: administers site (evidence: `README.md`)
- Flask App → Accounts & Addresses: registers blueprint (evidence: `swisseat/__init__.py`)
- Flask App → Restaurant Discovery: registers blueprint (evidence: `swisseat/__init__.py`)
- Flask App → Home Page: registers blueprint (evidence: `swisseat/__init__.py`)
- Flask App → Shopping Cart: registers blueprint (evidence: `swisseat/__init__.py`)
- Flask App → Checkout & Orders: registers blueprint (evidence: `swisseat/__init__.py`)
- Flask App → Restaurant Reviews: registers blueprint (evidence: `swisseat/__init__.py`)
- Flask App → Site Admin: registers blueprint (evidence: `swisseat/__init__.py`)
- Flask App → Staff Backend: registers blueprint (evidence: `swisseat/__init__.py`)
- Flask App → Database Config: loads configuration (evidence: `swisseat/__init__.py`)
- Domain Models → SQL Database: persists entities (evidence: `README.md`)
- Restaurant Discovery → Restaurant Forms: uses forms (evidence: `swisseat/restaurants/routes.py`)
- Accounts & Addresses → Form Definitions: uses forms (evidence: `swisseat/users/routes.py`)
- Restaurant Reviews → Review Forms: uses forms (evidence: `swisseat/reviews/routes.py`)
- Staff Backend → Backend Forms: uses forms (evidence: `swisseat/backend/routes.py`)
