# 2451052137kiet/it2402-bth1-sale architecture

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

- Interactive diagram: https://gitdiagram.com/2451052137kiet/it2402-bth1-sale
- Repository: https://github.com/2451052137kiet/it2402-bth1-sale

## Overview

This is a small Flask storefront demo. A visitor opens the catalog, where the app filters an in-memory product list by keyword and category before rendering the catalog page; the app also serves separate login and registration pages. Category choices are supplied through a context processor. The tree and excerpts show no persistence or separate business-service layer, and template internals were not sampled, so the graph limits UI relationships to templates explicitly named by the app.

Main entry points: [`saleappv1/eapp/index.py`](https://github.com/2451052137kiet/it2402-bth1-sale/blob/main/saleappv1/eapp/index.py) (Flask app), [`saleappv1/eapp/templates/index.html`](https://github.com/2451052137kiet/it2402-bth1-sale/blob/main/saleappv1/eapp/templates/index.html) (Catalog page), [`saleappv1/eapp/templates/login.html`](https://github.com/2451052137kiet/it2402-bth1-sale/blob/main/saleappv1/eapp/templates/login.html) (Login page), [`saleappv1/eapp/templates/reg.html`](https://github.com/2451052137kiet/it2402-bth1-sale/blob/main/saleappv1/eapp/templates/reg.html) (Registration page)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Flask runtime"]
  node_flask_app["Flask app<br/>[index.py]"]
end

subgraph group_views["Page templates"]
  node_catalog_page["Catalog page<br/>[index.html]"]
  node_login_page["Login page<br/>[login.html]"]
  node_registration_page["Registration page<br/>[reg.html]"]
end

node_visitor(("Visitor"))

node_visitor -->|"sends requests"| node_flask_app
node_flask_app -->|"renders catalog"| node_catalog_page
node_flask_app -->|"renders login"| node_login_page
node_flask_app -->|"renders registration"| node_registration_page

click node_flask_app "https://github.com/2451052137kiet/it2402-bth1-sale/blob/main/saleappv1/eapp/index.py"
click node_catalog_page "https://github.com/2451052137kiet/it2402-bth1-sale/blob/main/saleappv1/eapp/templates/index.html"
click node_login_page "https://github.com/2451052137kiet/it2402-bth1-sale/blob/main/saleappv1/eapp/templates/login.html"
click node_registration_page "https://github.com/2451052137kiet/it2402-bth1-sale/blob/main/saleappv1/eapp/templates/reg.html"

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_app toneBlue
class node_catalog_page,node_login_page,node_registration_page toneAmber
class node_visitor toneIndigo
```

## Components

### Flask runtime

- [Flask app](https://github.com/2451052137kiet/it2402-bth1-sale/blob/main/saleappv1/eapp/index.py): `saleappv1/eapp/index.py`

### Page templates

- [Catalog page](https://github.com/2451052137kiet/it2402-bth1-sale/blob/main/saleappv1/eapp/templates/index.html): `saleappv1/eapp/templates/index.html`
- [Login page](https://github.com/2451052137kiet/it2402-bth1-sale/blob/main/saleappv1/eapp/templates/login.html): `saleappv1/eapp/templates/login.html`
- [Registration page](https://github.com/2451052137kiet/it2402-bth1-sale/blob/main/saleappv1/eapp/templates/reg.html): `saleappv1/eapp/templates/reg.html`

### Other components

- **Visitor**

## Connections

- Visitor → Flask app: sends requests (evidence: `saleappv1/eapp/index.py`)
- Flask app → Catalog page: renders catalog (evidence: `saleappv1/eapp/index.py`)
- Flask app → Login page: renders login (evidence: `saleappv1/eapp/index.py`)
- Flask app → Registration page: renders registration (evidence: `saleappv1/eapp/index.py`)
