# sm4th13/fleuropa architecture

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

- Interactive diagram: https://gitdiagram.com/sm4th13/fleuropa
- Repository: https://github.com/sm4th13/fleuropa

## Overview

Fleuropa is a Flask flower-sales site. Customers browse bouquets and shops, manage a session-based basket, and reach a checkout confirmation flow; account registration and sign-in are also supported. The routes in `main.py` coordinate database access in `db.py` and render pages from `templates/`. The README describes stock availability and ordering as product goals, but the shown checkout handler does not persist an order, and the excerpts do not show stock updates. The graph reflects shown calls and documented presentation links; it omits unverified internal details.

Main entry points: [`main.py`](https://github.com/sm4th13/fleuropa/blob/main/main.py) (Flask routes), [`db.py`](https://github.com/sm4th13/fleuropa/blob/main/db.py) (Data access), [`templates`](https://github.com/sm4th13/fleuropa/tree/main/templates) (Page templates), [`style.css`](https://github.com/sm4th13/fleuropa/blob/main/style.css) (Stylesheets)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web application"]
  node_flask_routes["Flask routes<br/>[main.py]"]
end

subgraph group_commerce["Shopping flows"]
  node_catalog["Bouquet catalog<br/>[main.py]"]
  node_shops["Shop directory<br/>[main.py]"]
  node_basket["Session basket<br/>[main.py]"]
  node_checkout["Checkout flow<br/>[main.py]"]
end

subgraph group_accounts["Customer accounts"]
  node_account_flows["Account flows<br/>[main.py]"]
end

subgraph group_data["Persistence and presentation"]
  node_db_access["Data access<br/>[db.py]"]
  node_postgres[("PostgreSQL")]
  node_page_templates["Page templates"]
  node_styles["Stylesheets<br/>[style.css]"]
end

node_customer(("Customer"))

node_customer -->|"sends requests"| node_flask_routes
node_flask_routes -->|"routes to"| node_catalog
node_flask_routes -->|"routes to"| node_shops
node_flask_routes -->|"routes to"| node_basket
node_flask_routes -->|"routes to"| node_checkout
node_flask_routes -->|"routes to"| node_account_flows
node_catalog -->|"fetches bouquets"| node_db_access
node_shops -->|"fetches shops"| node_db_access
node_basket -->|"fetches details"| node_db_access
node_checkout -->|"fetches customer data"| node_db_access
node_account_flows -->|"reads and writes"| node_db_access
node_db_access -->|"queries"| node_postgres
node_flask_routes -->|"renders pages"| node_page_templates
node_page_templates -->|"uses styling"| node_styles

click node_flask_routes "https://github.com/sm4th13/fleuropa/blob/main/main.py"
click node_catalog "https://github.com/sm4th13/fleuropa/blob/main/main.py"
click node_shops "https://github.com/sm4th13/fleuropa/blob/main/main.py"
click node_basket "https://github.com/sm4th13/fleuropa/blob/main/main.py"
click node_checkout "https://github.com/sm4th13/fleuropa/blob/main/main.py"
click node_account_flows "https://github.com/sm4th13/fleuropa/blob/main/main.py"
click node_db_access "https://github.com/sm4th13/fleuropa/blob/main/db.py"
click node_page_templates "https://github.com/sm4th13/fleuropa/tree/main/templates"
click node_styles "https://github.com/sm4th13/fleuropa/blob/main/style.css"

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_routes toneBlue
class node_catalog,node_shops,node_basket,node_checkout toneAmber
class node_account_flows toneMint
class node_db_access,node_postgres,node_page_templates,node_styles toneRose
class node_customer toneIndigo
```

## Components

### Web application

- [Flask routes](https://github.com/sm4th13/fleuropa/blob/main/main.py): `main.py`

### Shopping flows

- [Bouquet catalog](https://github.com/sm4th13/fleuropa/blob/main/main.py): `main.py`
- [Shop directory](https://github.com/sm4th13/fleuropa/blob/main/main.py): `main.py`
- [Session basket](https://github.com/sm4th13/fleuropa/blob/main/main.py): `main.py`
- [Checkout flow](https://github.com/sm4th13/fleuropa/blob/main/main.py): `main.py`

### Customer accounts

- [Account flows](https://github.com/sm4th13/fleuropa/blob/main/main.py): `main.py`

### Persistence and presentation

- [Data access](https://github.com/sm4th13/fleuropa/blob/main/db.py): `db.py`
- **PostgreSQL**
- [Page templates](https://github.com/sm4th13/fleuropa/tree/main/templates): `templates`
- [Stylesheets](https://github.com/sm4th13/fleuropa/blob/main/style.css): `style.css`

### Other components

- **Customer**

## Connections

- Customer → Flask routes: sends requests (evidence: `README.md`)
- Flask routes → Bouquet catalog: routes to (evidence: `main.py`)
- Flask routes → Shop directory: routes to (evidence: `main.py`)
- Flask routes → Session basket: routes to (evidence: `main.py`)
- Flask routes → Checkout flow: routes to (evidence: `main.py`)
- Flask routes → Account flows: routes to (evidence: `main.py`)
- Bouquet catalog → Data access: fetches bouquets (evidence: `main.py`)
- Shop directory → Data access: fetches shops (evidence: `main.py`)
- Session basket → Data access: fetches details (evidence: `main.py`)
- Checkout flow → Data access: fetches customer data (evidence: `main.py`)
- Account flows → Data access: reads and writes (evidence: `main.py`)
- Data access → PostgreSQL: queries (evidence: `db.py`)
- Flask routes → Page templates: renders pages (evidence: `main.py`)
- Page templates → Stylesheets: uses styling (evidence: `README.md`)
