# y-lebid/borichkas_slop architecture

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

- Interactive diagram: https://gitdiagram.com/y-lebid/borichkas_slop
- Repository: https://github.com/y-lebid/borichkas_slop

## Overview

Borichkas Slop is a Flask pizza-delivery service. Customers browse a database-backed menu, manage a session cart, check out with delivery details, and receive bonus points; registered users can also manage profiles. Admins manage products and orders. The README additionally documents a delivery-zone map, though its implementation is not shown in the sampled source. The excerpts show Flask routes rendering several customer views and accessing SQLite/SQLAlchemy data; unsampled feature links are omitted or marked unverified.

Main entry points: [`app.py`](https://github.com/y-lebid/borichkas_slop/blob/master/app.py) (Flask routes), [`instance/borichkas_slop.db`](https://github.com/y-lebid/borichkas_slop/blob/master/instance/borichkas_slop.db) (Product catalog), [`models.py`](https://github.com/y-lebid/borichkas_slop/blob/master/models.py) (User and order data), [`templates/menu.html`](https://github.com/y-lebid/borichkas_slop/blob/master/templates/menu.html) (Pizza menu)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web experience"]
  node_flask["Flask routes<br/>[app.py]"]
  node_menu["Pizza menu<br/>[menu.html]"]
  node_home["Home page<br/>[index.html]"]
end

subgraph group_ordering["Ordering"]
  node_cart["Cart view<br/>[cart.html]"]
  node_checkout["Checkout view<br/>[checkout.html]"]
  node_orders["Order handling<br/>[app.py]"]
  node_catalog[("Product catalog<br/>[borichkas_slop.db]")]
  node_deliverymap["Delivery zone map"]
end

subgraph group_accounts["Accounts and rewards"]
  node_auth["Authentication<br/>[app.py]"]
  node_profile["Account profile<br/>[dashboard.html]"]
  node_rewards["Bonus points<br/>[app.py]"]
  node_userstore[("User and order data<br/>[models.py]")]
end

subgraph group_operations["Operations"]
  node_adminpanel["Admin panel<br/>[admin.html]"]
  node_productadmin["Product management<br/>[app.py]"]
end

node_customer(("Customer"))
node_admin(("Admin"))

node_customer -->|"uses"| node_flask
node_admin -->|"uses"| node_flask
node_flask -->|"queries menu"| node_catalog
node_flask -->|"renders"| node_home
node_flask -->|"renders"| node_menu
node_flask -->|"renders"| node_cart
node_flask -->|"renders"| node_checkout
node_flask -->|"handles"| node_auth
node_flask -->|"queries users"| node_userstore
node_flask -->|"creates orders"| node_orders
node_flask -->|"persists orders"| node_userstore
node_flask -->|"awards points"| node_rewards
node_flask -->|"renders"| node_profile
node_flask -.->|"renders"| node_adminpanel
node_flask -->|"adds products"| node_productadmin
node_productadmin -->|"writes products"| node_catalog
node_customer -.->|"checks zone"| node_deliverymap

click node_flask "https://github.com/y-lebid/borichkas_slop/blob/master/app.py"
click node_menu "https://github.com/y-lebid/borichkas_slop/blob/master/templates/menu.html"
click node_home "https://github.com/y-lebid/borichkas_slop/blob/master/templates/index.html"
click node_cart "https://github.com/y-lebid/borichkas_slop/blob/master/templates/cart.html"
click node_checkout "https://github.com/y-lebid/borichkas_slop/blob/master/templates/checkout.html"
click node_orders "https://github.com/y-lebid/borichkas_slop/blob/master/app.py"
click node_catalog "https://github.com/y-lebid/borichkas_slop/blob/master/instance/borichkas_slop.db"
click node_auth "https://github.com/y-lebid/borichkas_slop/blob/master/app.py"
click node_profile "https://github.com/y-lebid/borichkas_slop/blob/master/templates/dashboard.html"
click node_rewards "https://github.com/y-lebid/borichkas_slop/blob/master/app.py"
click node_userstore "https://github.com/y-lebid/borichkas_slop/blob/master/models.py"
click node_adminpanel "https://github.com/y-lebid/borichkas_slop/blob/master/templates/admin.html"
click node_productadmin "https://github.com/y-lebid/borichkas_slop/blob/master/app.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_flask,node_menu,node_home toneBlue
class node_cart,node_checkout,node_orders,node_catalog,node_deliverymap toneAmber
class node_auth,node_profile,node_rewards,node_userstore toneMint
class node_adminpanel,node_productadmin toneRose
class node_customer,node_admin toneIndigo
```

## Components

### Web experience

- [Flask routes](https://github.com/y-lebid/borichkas_slop/blob/master/app.py): `app.py`
- [Pizza menu](https://github.com/y-lebid/borichkas_slop/blob/master/templates/menu.html): `templates/menu.html`
- [Home page](https://github.com/y-lebid/borichkas_slop/blob/master/templates/index.html): `templates/index.html`

### Ordering

- [Cart view](https://github.com/y-lebid/borichkas_slop/blob/master/templates/cart.html): `templates/cart.html`
- [Checkout view](https://github.com/y-lebid/borichkas_slop/blob/master/templates/checkout.html): `templates/checkout.html`
- [Order handling](https://github.com/y-lebid/borichkas_slop/blob/master/app.py): `app.py`
- [Product catalog](https://github.com/y-lebid/borichkas_slop/blob/master/instance/borichkas_slop.db): `instance/borichkas_slop.db`
- **Delivery zone map**

### Accounts and rewards

- [Authentication](https://github.com/y-lebid/borichkas_slop/blob/master/app.py): `app.py`
- [Account profile](https://github.com/y-lebid/borichkas_slop/blob/master/templates/dashboard.html): `templates/dashboard.html`
- [Bonus points](https://github.com/y-lebid/borichkas_slop/blob/master/app.py): `app.py`
- [User and order data](https://github.com/y-lebid/borichkas_slop/blob/master/models.py): `models.py`

### Operations

- [Admin panel](https://github.com/y-lebid/borichkas_slop/blob/master/templates/admin.html): `templates/admin.html`
- [Product management](https://github.com/y-lebid/borichkas_slop/blob/master/app.py): `app.py`

### Other components

- **Customer**
- **Admin**

## Connections

- Customer → Flask routes: uses (evidence: `README.md`)
- Admin → Flask routes: uses (evidence: `README.md`)
- Flask routes → Product catalog: queries menu (evidence: `app.py`)
- Flask routes → Home page: renders (evidence: `app.py`)
- Flask routes → Pizza menu: renders (evidence: `app.py`)
- Flask routes → Cart view: renders (evidence: `app.py`)
- Flask routes → Checkout view: renders (evidence: `app.py`)
- Flask routes → Authentication: handles (evidence: `app.py`)
- Flask routes → User and order data: queries users (evidence: `app.py`)
- Flask routes → Order handling: creates orders (evidence: `app.py`)
- Flask routes → User and order data: persists orders (evidence: `app.py`)
- Flask routes → Bonus points: awards points (evidence: `app.py`)
- Flask routes → Account profile: renders (evidence: `app.py`)
- Flask routes → Admin panel: renders
- Flask routes → Product management: adds products (evidence: `app.py`)
- Product management → Product catalog: writes products (evidence: `app.py`)
- Customer → Delivery zone map: checks zone (evidence: `README.md`)
