# kapustakstepan-dev/project-restaurant architecture

> Architecture diagram of the GitHub repository kapustakstepan-dev/project-restaurant, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/kapustakstepan-dev/project-restaurant
- Repository: https://github.com/kapustakstepan-dev/project-restaurant

## Overview

RetroBite is a Flask restaurant application for menu browsing, account access, ordering, and table reservations, with an admin dashboard for managing restaurant data. The principal customer flow is browsing menu items, building a session-backed basket, checking out, and viewing order history; reservations are a separate booking flow. Flask routes render Jinja templates and use SQLAlchemy models backed by PostgreSQL. README features document additional UI and email capabilities; the sampled route excerpts are partial, so uncertain route-to-feature wiring is omitted.

Main entry points: [`ProyectRestourant/online_restaurant.py`](https://github.com/kapustakstepan-dev/project-restaurant/blob/main/ProyectRestourant/online_restaurant.py) (Flask routes), [`ProyectRestourant/back/BD/online_restaurant_db.py`](https://github.com/kapustakstepan-dev/project-restaurant/blob/main/ProyectRestourant/back/BD/online_restaurant_db.py) (ORM models), [`ProyectRestourant/static/js/main.js`](https://github.com/kapustakstepan-dev/project-restaurant/blob/main/ProyectRestourant/static/js/main.js) (Browser interface), [`ProyectRestourant/templates`](https://github.com/kapustakstepan-dev/project-restaurant/tree/main/ProyectRestourant/templates) (Page templates)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web experience"]
  node_pages["Page templates"]
  node_browser["Browser interface<br/>[main.js]"]
  node_localization["Translations<br/>[translate.js]"]
  node_theme["Theme preference<br/>[theme.js]"]
  node_motion["Animations<br/>[animations.js]"]
end

subgraph group_customer["Customer services"]
  node_flask["Flask routes"]
  node_menu["Menu browsing"]
  node_accounts["Accounts and login"]
  node_basket["Basket and checkout"]
  node_orders["Order history"]
  node_reservations["Table bookings"]
  node_receipts["Email receipts"]
end

subgraph group_admin["Administration"]
  node_admin["Admin dashboard"]
end

subgraph group_data["Persistence and integrations"]
  node_models["ORM models"]
  node_postgres[("PostgreSQL")]
  node_smtp["SMTP service"]
end

node_visitor(("Customer"))
node_administrator(("Administrator"))

node_visitor -->|"requests"| node_flask
node_administrator -->|"admin requests"| node_flask
node_flask -->|"renders"| node_pages
node_flask -->|"dispatches"| node_menu
node_flask -->|"dispatches"| node_accounts
node_flask -->|"dispatches"| node_basket
node_flask -->|"dispatches"| node_orders
node_flask -->|"dispatches"| node_reservations
node_flask -->|"dispatches"| node_admin
node_menu -->|"queries"| node_models
node_accounts -->|"queries"| node_models
node_basket -->|"reads and writes"| node_models
node_orders -->|"queries"| node_models
node_reservations -->|"reads and writes"| node_models
node_admin -->|"manages records"| node_models
node_models -->|"persists data"| node_postgres
node_browser -->|"navigates"| node_flask
node_browser -->|"uses"| node_localization
node_browser -->|"uses"| node_theme
node_browser -->|"uses"| node_motion
node_flask -->|"dispatches"| node_receipts
node_receipts -->|"loads order items"| node_models
node_receipts -.->|"sends receipt"| node_smtp

click node_flask "https://github.com/kapustakstepan-dev/project-restaurant/blob/main/ProyectRestourant/online_restaurant.py"
click node_pages "https://github.com/kapustakstepan-dev/project-restaurant/tree/main/ProyectRestourant/templates"
click node_menu "https://github.com/kapustakstepan-dev/project-restaurant/blob/main/ProyectRestourant/online_restaurant.py"
click node_accounts "https://github.com/kapustakstepan-dev/project-restaurant/blob/main/ProyectRestourant/online_restaurant.py"
click node_basket "https://github.com/kapustakstepan-dev/project-restaurant/blob/main/ProyectRestourant/online_restaurant.py"
click node_orders "https://github.com/kapustakstepan-dev/project-restaurant/blob/main/ProyectRestourant/online_restaurant.py"
click node_reservations "https://github.com/kapustakstepan-dev/project-restaurant/blob/main/ProyectRestourant/online_restaurant.py"
click node_admin "https://github.com/kapustakstepan-dev/project-restaurant/blob/main/ProyectRestourant/online_restaurant.py"
click node_models "https://github.com/kapustakstepan-dev/project-restaurant/blob/main/ProyectRestourant/back/BD/online_restaurant_db.py"
click node_browser "https://github.com/kapustakstepan-dev/project-restaurant/blob/main/ProyectRestourant/static/js/main.js"
click node_localization "https://github.com/kapustakstepan-dev/project-restaurant/blob/main/ProyectRestourant/static/js/translate.js"
click node_theme "https://github.com/kapustakstepan-dev/project-restaurant/blob/main/ProyectRestourant/static/js/theme.js"
click node_motion "https://github.com/kapustakstepan-dev/project-restaurant/blob/main/ProyectRestourant/static/js/animations.js"
click node_receipts "https://github.com/kapustakstepan-dev/project-restaurant/blob/main/ProyectRestourant/online_restaurant.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_pages,node_browser,node_localization,node_theme,node_motion toneBlue
class node_flask,node_menu,node_accounts,node_basket,node_orders,node_reservations,node_receipts toneAmber
class node_admin toneMint
class node_models,node_postgres,node_smtp toneRose
class node_visitor,node_administrator toneIndigo
```

## Components

### Web experience

- [Page templates](https://github.com/kapustakstepan-dev/project-restaurant/tree/main/ProyectRestourant/templates): `ProyectRestourant/templates`
- [Browser interface](https://github.com/kapustakstepan-dev/project-restaurant/blob/main/ProyectRestourant/static/js/main.js): `ProyectRestourant/static/js/main.js`
- [Translations](https://github.com/kapustakstepan-dev/project-restaurant/blob/main/ProyectRestourant/static/js/translate.js): `ProyectRestourant/static/js/translate.js`
- [Theme preference](https://github.com/kapustakstepan-dev/project-restaurant/blob/main/ProyectRestourant/static/js/theme.js): `ProyectRestourant/static/js/theme.js`
- [Animations](https://github.com/kapustakstepan-dev/project-restaurant/blob/main/ProyectRestourant/static/js/animations.js): `ProyectRestourant/static/js/animations.js`

### Customer services

- [Flask routes](https://github.com/kapustakstepan-dev/project-restaurant/blob/main/ProyectRestourant/online_restaurant.py): `ProyectRestourant/online_restaurant.py`
- [Menu browsing](https://github.com/kapustakstepan-dev/project-restaurant/blob/main/ProyectRestourant/online_restaurant.py): `ProyectRestourant/online_restaurant.py`
- [Accounts and login](https://github.com/kapustakstepan-dev/project-restaurant/blob/main/ProyectRestourant/online_restaurant.py): `ProyectRestourant/online_restaurant.py`
- [Basket and checkout](https://github.com/kapustakstepan-dev/project-restaurant/blob/main/ProyectRestourant/online_restaurant.py): `ProyectRestourant/online_restaurant.py`
- [Order history](https://github.com/kapustakstepan-dev/project-restaurant/blob/main/ProyectRestourant/online_restaurant.py): `ProyectRestourant/online_restaurant.py`
- [Table bookings](https://github.com/kapustakstepan-dev/project-restaurant/blob/main/ProyectRestourant/online_restaurant.py): `ProyectRestourant/online_restaurant.py`
- [Email receipts](https://github.com/kapustakstepan-dev/project-restaurant/blob/main/ProyectRestourant/online_restaurant.py): `ProyectRestourant/online_restaurant.py`

### Administration

- [Admin dashboard](https://github.com/kapustakstepan-dev/project-restaurant/blob/main/ProyectRestourant/online_restaurant.py): `ProyectRestourant/online_restaurant.py`

### Persistence and integrations

- [ORM models](https://github.com/kapustakstepan-dev/project-restaurant/blob/main/ProyectRestourant/back/BD/online_restaurant_db.py): `ProyectRestourant/back/BD/online_restaurant_db.py`
- **PostgreSQL**
- **SMTP service**

### Other components

- **Customer**
- **Administrator**

## Connections

- Customer → Flask routes: requests
- Administrator → Flask routes: admin requests
- Flask routes → Page templates: renders
- Flask routes → Menu browsing: dispatches
- Flask routes → Accounts and login: dispatches
- Flask routes → Basket and checkout: dispatches
- Flask routes → Order history: dispatches
- Flask routes → Table bookings: dispatches
- Flask routes → Admin dashboard: dispatches
- Menu browsing → ORM models: queries
- Accounts and login → ORM models: queries
- Basket and checkout → ORM models: reads and writes
- Order history → ORM models: queries
- Table bookings → ORM models: reads and writes
- Admin dashboard → ORM models: manages records
- ORM models → PostgreSQL: persists data
- Browser interface → Flask routes: navigates
- Browser interface → Translations: uses
- Browser interface → Theme preference: uses
- Browser interface → Animations: uses
- Flask routes → Email receipts: dispatches
- Email receipts → ORM models: loads order items
- Email receipts → SMTP service: sends receipt
