# duonghuuthanh/it2402saleapp architecture

> Architecture diagram of the GitHub repository duonghuuthanh/it2402saleapp, 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/duonghuuthanh/it2402saleapp
- Repository: https://github.com/duonghuuthanh/it2402saleapp

## Overview

This is a small Flask sales-catalog app. A visitor opens the catalog, where the app builds an in-memory product list, applies optional name and category filters, and renders the results. It also serves login and registration pages and provides shared category data through a context processor. The HTML files are listed in the tree, but their contents were not sampled, so template composition and use of the shared category data are not mapped.

Main entry points: [`saleappv1/eapp/index.py`](https://github.com/duonghuuthanh/it2402saleapp/blob/main/saleappv1/eapp/index.py) (Catalog route), [`saleappv1/eapp/templates/index.html`](https://github.com/duonghuuthanh/it2402saleapp/blob/main/saleappv1/eapp/templates/index.html) (Catalog page), [`saleappv1/eapp/templates/login.html`](https://github.com/duonghuuthanh/it2402saleapp/blob/main/saleappv1/eapp/templates/login.html) (Login page), [`saleappv1/eapp/templates/register.html`](https://github.com/duonghuuthanh/it2402saleapp/blob/main/saleappv1/eapp/templates/register.html) (Registration page)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Flask application"]
  node_catalog["Catalog route<br/>[index.py]"]
  node_catalog_data["Product filtering<br/>[index.py]"]
  node_categories["Category context<br/>[index.py]"]
  node_login_route["Login route<br/>[index.py]"]
  node_register_route["Registration route<br/>[index.py]"]
end

subgraph group_views["HTML views"]
  node_catalog_template["Catalog page<br/>[index.html]"]
  node_login_template["Login page<br/>[login.html]"]
  node_register_template["Registration page<br/>[register.html]"]
  node_base_template["Base layout<br/>[base.html]"]
  node_header_template["Header<br/>[header.html]"]
  node_footer_template["Footer<br/>[footer.html]"]
end

node_visitor(("Visitor"))

node_visitor -->|"requests"| node_catalog
node_catalog -->|"filters"| node_catalog_data
node_catalog -->|"renders"| node_catalog_template
node_visitor -->|"requests"| node_login_route
node_login_route -->|"renders"| node_login_template
node_visitor -->|"requests"| node_register_route
node_register_route -->|"renders"| node_register_template

click node_catalog "https://github.com/duonghuuthanh/it2402saleapp/blob/main/saleappv1/eapp/index.py"
click node_catalog_data "https://github.com/duonghuuthanh/it2402saleapp/blob/main/saleappv1/eapp/index.py"
click node_categories "https://github.com/duonghuuthanh/it2402saleapp/blob/main/saleappv1/eapp/index.py"
click node_login_route "https://github.com/duonghuuthanh/it2402saleapp/blob/main/saleappv1/eapp/index.py"
click node_register_route "https://github.com/duonghuuthanh/it2402saleapp/blob/main/saleappv1/eapp/index.py"
click node_catalog_template "https://github.com/duonghuuthanh/it2402saleapp/blob/main/saleappv1/eapp/templates/index.html"
click node_login_template "https://github.com/duonghuuthanh/it2402saleapp/blob/main/saleappv1/eapp/templates/login.html"
click node_register_template "https://github.com/duonghuuthanh/it2402saleapp/blob/main/saleappv1/eapp/templates/register.html"
click node_base_template "https://github.com/duonghuuthanh/it2402saleapp/blob/main/saleappv1/eapp/templates/layout/base.html"
click node_header_template "https://github.com/duonghuuthanh/it2402saleapp/blob/main/saleappv1/eapp/templates/layout/header.html"
click node_footer_template "https://github.com/duonghuuthanh/it2402saleapp/blob/main/saleappv1/eapp/templates/layout/footer.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_catalog,node_catalog_data,node_categories,node_login_route,node_register_route toneBlue
class node_catalog_template,node_login_template,node_register_template,node_base_template,node_header_template,node_footer_template toneAmber
class node_visitor toneIndigo
```

## Components

### Flask application

- [Catalog route](https://github.com/duonghuuthanh/it2402saleapp/blob/main/saleappv1/eapp/index.py): `saleappv1/eapp/index.py`
- [Product filtering](https://github.com/duonghuuthanh/it2402saleapp/blob/main/saleappv1/eapp/index.py): `saleappv1/eapp/index.py`
- [Category context](https://github.com/duonghuuthanh/it2402saleapp/blob/main/saleappv1/eapp/index.py): `saleappv1/eapp/index.py`
- [Login route](https://github.com/duonghuuthanh/it2402saleapp/blob/main/saleappv1/eapp/index.py): `saleappv1/eapp/index.py`
- [Registration route](https://github.com/duonghuuthanh/it2402saleapp/blob/main/saleappv1/eapp/index.py): `saleappv1/eapp/index.py`

### HTML views

- [Catalog page](https://github.com/duonghuuthanh/it2402saleapp/blob/main/saleappv1/eapp/templates/index.html): `saleappv1/eapp/templates/index.html`
- [Login page](https://github.com/duonghuuthanh/it2402saleapp/blob/main/saleappv1/eapp/templates/login.html): `saleappv1/eapp/templates/login.html`
- [Registration page](https://github.com/duonghuuthanh/it2402saleapp/blob/main/saleappv1/eapp/templates/register.html): `saleappv1/eapp/templates/register.html`
- [Base layout](https://github.com/duonghuuthanh/it2402saleapp/blob/main/saleappv1/eapp/templates/layout/base.html): `saleappv1/eapp/templates/layout/base.html`
- [Header](https://github.com/duonghuuthanh/it2402saleapp/blob/main/saleappv1/eapp/templates/layout/header.html): `saleappv1/eapp/templates/layout/header.html`
- [Footer](https://github.com/duonghuuthanh/it2402saleapp/blob/main/saleappv1/eapp/templates/layout/footer.html): `saleappv1/eapp/templates/layout/footer.html`

### Other components

- **Visitor**

## Connections

- Visitor → Catalog route: requests (evidence: `saleappv1/eapp/index.py`)
- Catalog route → Product filtering: filters (evidence: `saleappv1/eapp/index.py`)
- Catalog route → Catalog page: renders (evidence: `saleappv1/eapp/index.py`)
- Visitor → Login route: requests (evidence: `saleappv1/eapp/index.py`)
- Login route → Login page: renders (evidence: `saleappv1/eapp/index.py`)
- Visitor → Registration route: requests (evidence: `saleappv1/eapp/index.py`)
- Registration route → Registration page: renders (evidence: `saleappv1/eapp/index.py`)
