# hnkillnet404/lehainam_24ct1_cnpm architecture

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

- Interactive diagram: https://gitdiagram.com/hnkillnet404/lehainam_24ct1_cnpm
- Repository: https://github.com/hnkillnet404/lehainam_24ct1_cnpm

## Overview

Urban Threads is a Django streetwear e-commerce site. The customer workflow runs from product discovery and filtering through cart management, checkout, and QR payment; accounts support registration and order history. Reviews, wishlists, promotions, static pages, and Django Admin are distinct supporting capabilities. The README documents SQLite and VietQR. Source excerpts are incomplete and templates are absent from the supplied tree, so UI rendering and some cross-app interactions are not mapped beyond documented or indexed relationships.

Main entry points: [`urban_threads/settings.py`](https://github.com/hnkillnet404/lehainam_24ct1_cnpm/blob/main/urban_threads/settings.py) (SQLite database), [`cart/views.py`](https://github.com/hnkillnet404/lehainam_24ct1_cnpm/blob/main/cart/views.py) (Cart management), [`payments/views.py`](https://github.com/hnkillnet404/lehainam_24ct1_cnpm/blob/main/payments/views.py) (QR payments), [`accounts/views.py`](https://github.com/hnkillnet404/lehainam_24ct1_cnpm/blob/main/accounts/views.py) (Accounts and addresses)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_catalog["Catalog and discovery"]
  node_products["Product browsing<br/>[views.py]"]
  node_product_data[("Product catalog<br/>[models.py]")]
end

subgraph group_commerce["Cart and orders"]
  node_cart["Cart management<br/>[views.py]"]
  node_cart_data[("Cart records<br/>[models.py]")]
  node_orders["Checkout and orders<br/>[views.py]"]
  node_order_data[("Order records<br/>[models.py]")]
  node_payments["QR payments<br/>[views.py]"]
  node_payment_data[("Payment records<br/>[models.py]")]
end

subgraph group_engagement["Customer features"]
  node_accounts["Accounts and addresses<br/>[views.py]"]
  node_account_data[("User accounts<br/>[models.py]")]
  node_account_forms["Account forms<br/>[forms.py]"]
  node_reviews["Product reviews<br/>[views.py]"]
  node_review_data[("Review records<br/>[models.py]")]
  node_wishlists["Wishlists<br/>[views.py]"]
  node_wishlist_data[("Wishlist records<br/>[models.py]")]
  node_promotions["Promotions and banners<br/>[views.py]"]
  node_promotion_data[("Promotion records<br/>[models.py]")]
  node_pages["Static pages<br/>[views.py]"]
end

subgraph group_platform["Platform and operations"]
  node_admin["Admin dashboard<br/>[admin.py]"]
  node_database[("SQLite database<br/>[settings.py]")]
  node_routing["Django URL routing<br/>[urls.py]"]
end

node_customer(("Customer"))
node_vietqr["VietQR API"]

node_customer -->|"browses"| node_products
node_products -->|"queries"| node_product_data
node_customer -->|"manages"| node_cart
node_cart -->|"reads and writes"| node_cart_data
node_cart -->|"checks variants"| node_product_data
node_cart -->|"checks coupons"| node_promotion_data
node_customer -->|"checks out"| node_orders
node_orders -->|"uses orders"| node_order_data
node_customer -->|"pays by QR"| node_payments
node_payments -->|"uses payments"| node_payment_data
node_payments -->|"uses orders"| node_order_data
node_payments -->|"requests QR"| node_vietqr
node_customer -->|"manages account"| node_accounts
node_accounts -->|"uses forms"| node_account_forms
node_accounts -->|"uses accounts"| node_account_data
node_accounts -->|"reads history"| node_order_data
node_customer -->|"submits reviews"| node_reviews
node_reviews -->|"uses reviews"| node_review_data
node_reviews -->|"targets products"| node_product_data
node_customer -->|"manages wishlist"| node_wishlists
node_wishlists -->|"uses wishlist"| node_wishlist_data
node_wishlists -->|"selects products"| node_product_data
node_customer -->|"views offers"| node_promotions
node_promotions -->|"uses promotions"| node_promotion_data
node_customer -->|"visits pages"| node_pages
node_admin -->|"manages orders"| node_order_data
node_admin -->|"manages records"| node_database
node_routing -->|"routes requests"| node_products
node_products -->|"queries via ORM"| node_database
node_cart -->|"stores cart data"| node_database
node_orders -->|"stores orders"| node_database
node_payments -->|"stores payments"| node_database
node_accounts -->|"stores accounts"| node_database
node_reviews -->|"stores reviews"| node_database
node_wishlists -->|"stores wishlists"| node_database
node_promotions -->|"stores offers"| node_database

click node_products "https://github.com/hnkillnet404/lehainam_24ct1_cnpm/blob/main/products/views.py"
click node_product_data "https://github.com/hnkillnet404/lehainam_24ct1_cnpm/blob/main/products/models.py"
click node_cart "https://github.com/hnkillnet404/lehainam_24ct1_cnpm/blob/main/cart/views.py"
click node_cart_data "https://github.com/hnkillnet404/lehainam_24ct1_cnpm/blob/main/cart/models.py"
click node_orders "https://github.com/hnkillnet404/lehainam_24ct1_cnpm/blob/main/orders/views.py"
click node_order_data "https://github.com/hnkillnet404/lehainam_24ct1_cnpm/blob/main/orders/models.py"
click node_payments "https://github.com/hnkillnet404/lehainam_24ct1_cnpm/blob/main/payments/views.py"
click node_payment_data "https://github.com/hnkillnet404/lehainam_24ct1_cnpm/blob/main/payments/models.py"
click node_accounts "https://github.com/hnkillnet404/lehainam_24ct1_cnpm/blob/main/accounts/views.py"
click node_account_data "https://github.com/hnkillnet404/lehainam_24ct1_cnpm/blob/main/accounts/models.py"
click node_account_forms "https://github.com/hnkillnet404/lehainam_24ct1_cnpm/blob/main/accounts/forms.py"
click node_reviews "https://github.com/hnkillnet404/lehainam_24ct1_cnpm/blob/main/reviews/views.py"
click node_review_data "https://github.com/hnkillnet404/lehainam_24ct1_cnpm/blob/main/reviews/models.py"
click node_wishlists "https://github.com/hnkillnet404/lehainam_24ct1_cnpm/blob/main/wishlists/views.py"
click node_wishlist_data "https://github.com/hnkillnet404/lehainam_24ct1_cnpm/blob/main/wishlists/models.py"
click node_promotions "https://github.com/hnkillnet404/lehainam_24ct1_cnpm/blob/main/promotions/views.py"
click node_promotion_data "https://github.com/hnkillnet404/lehainam_24ct1_cnpm/blob/main/promotions/models.py"
click node_pages "https://github.com/hnkillnet404/lehainam_24ct1_cnpm/blob/main/pages/views.py"
click node_admin "https://github.com/hnkillnet404/lehainam_24ct1_cnpm/blob/main/orders/admin.py"
click node_database "https://github.com/hnkillnet404/lehainam_24ct1_cnpm/blob/main/urban_threads/settings.py"
click node_routing "https://github.com/hnkillnet404/lehainam_24ct1_cnpm/blob/main/urban_threads/urls.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_products,node_product_data toneBlue
class node_cart,node_cart_data,node_orders,node_order_data,node_payments,node_payment_data toneAmber
class node_accounts,node_account_data,node_account_forms,node_reviews,node_review_data,node_wishlists,node_wishlist_data,node_promotions,node_promotion_data,node_pages,node_vietqr toneMint
class node_admin,node_database,node_routing toneRose
class node_customer toneIndigo
```

## Components

### Catalog and discovery

- [Product browsing](https://github.com/hnkillnet404/lehainam_24ct1_cnpm/blob/main/products/views.py): `products/views.py`
- [Product catalog](https://github.com/hnkillnet404/lehainam_24ct1_cnpm/blob/main/products/models.py): `products/models.py`

### Cart and orders

- [Cart management](https://github.com/hnkillnet404/lehainam_24ct1_cnpm/blob/main/cart/views.py): `cart/views.py`
- [Cart records](https://github.com/hnkillnet404/lehainam_24ct1_cnpm/blob/main/cart/models.py): `cart/models.py`
- [Checkout and orders](https://github.com/hnkillnet404/lehainam_24ct1_cnpm/blob/main/orders/views.py): `orders/views.py`
- [Order records](https://github.com/hnkillnet404/lehainam_24ct1_cnpm/blob/main/orders/models.py): `orders/models.py`
- [QR payments](https://github.com/hnkillnet404/lehainam_24ct1_cnpm/blob/main/payments/views.py): `payments/views.py`
- [Payment records](https://github.com/hnkillnet404/lehainam_24ct1_cnpm/blob/main/payments/models.py): `payments/models.py`

### Customer features

- [Accounts and addresses](https://github.com/hnkillnet404/lehainam_24ct1_cnpm/blob/main/accounts/views.py): `accounts/views.py`
- [User accounts](https://github.com/hnkillnet404/lehainam_24ct1_cnpm/blob/main/accounts/models.py): `accounts/models.py`
- [Account forms](https://github.com/hnkillnet404/lehainam_24ct1_cnpm/blob/main/accounts/forms.py): `accounts/forms.py`
- [Product reviews](https://github.com/hnkillnet404/lehainam_24ct1_cnpm/blob/main/reviews/views.py): `reviews/views.py`
- [Review records](https://github.com/hnkillnet404/lehainam_24ct1_cnpm/blob/main/reviews/models.py): `reviews/models.py`
- [Wishlists](https://github.com/hnkillnet404/lehainam_24ct1_cnpm/blob/main/wishlists/views.py): `wishlists/views.py`
- [Wishlist records](https://github.com/hnkillnet404/lehainam_24ct1_cnpm/blob/main/wishlists/models.py): `wishlists/models.py`
- [Promotions and banners](https://github.com/hnkillnet404/lehainam_24ct1_cnpm/blob/main/promotions/views.py): `promotions/views.py`
- [Promotion records](https://github.com/hnkillnet404/lehainam_24ct1_cnpm/blob/main/promotions/models.py): `promotions/models.py`
- [Static pages](https://github.com/hnkillnet404/lehainam_24ct1_cnpm/blob/main/pages/views.py): `pages/views.py`

### Platform and operations

- [Admin dashboard](https://github.com/hnkillnet404/lehainam_24ct1_cnpm/blob/main/orders/admin.py): `orders/admin.py`
- [SQLite database](https://github.com/hnkillnet404/lehainam_24ct1_cnpm/blob/main/urban_threads/settings.py): `urban_threads/settings.py`
- [Django URL routing](https://github.com/hnkillnet404/lehainam_24ct1_cnpm/blob/main/urban_threads/urls.py): `urban_threads/urls.py`

### Other components

- **Customer**
- **VietQR API**

## Connections

- Customer → Product browsing: browses
- Product browsing → Product catalog: queries (evidence: `products/views.py`)
- Customer → Cart management: manages
- Cart management → Cart records: reads and writes (evidence: `cart/views.py`)
- Cart management → Product catalog: checks variants (evidence: `cart/views.py`)
- Cart management → Promotion records: checks coupons (evidence: `cart/views.py`)
- Customer → Checkout and orders: checks out
- Checkout and orders → Order records: uses orders (evidence: `orders/views.py`)
- Customer → QR payments: pays by QR
- QR payments → Payment records: uses payments (evidence: `payments/views.py`)
- QR payments → Order records: uses orders (evidence: `payments/views.py`)
- QR payments → VietQR API: requests QR
- Customer → Accounts and addresses: manages account
- Accounts and addresses → Account forms: uses forms (evidence: `accounts/views.py`)
- Accounts and addresses → User accounts: uses accounts (evidence: `accounts/views.py`)
- Accounts and addresses → Order records: reads history (evidence: `accounts/views.py`)
- Customer → Product reviews: submits reviews
- Product reviews → Review records: uses reviews (evidence: `reviews/views.py`)
- Product reviews → Product catalog: targets products (evidence: `reviews/views.py`)
- Customer → Wishlists: manages wishlist
- Wishlists → Wishlist records: uses wishlist (evidence: `wishlists/views.py`)
- Wishlists → Product catalog: selects products (evidence: `wishlists/views.py`)
- Customer → Promotions and banners: views offers
- Promotions and banners → Promotion records: uses promotions (evidence: `promotions/views.py`)
- Customer → Static pages: visits pages
- Admin dashboard → Order records: manages orders (evidence: `orders/admin.py`)
- Admin dashboard → SQLite database: manages records
- Django URL routing → Product browsing: routes requests (evidence: `urban_threads/urls.py`)
- Product browsing → SQLite database: queries via ORM
- Cart management → SQLite database: stores cart data
- Checkout and orders → SQLite database: stores orders
- QR payments → SQLite database: stores payments
- Accounts and addresses → SQLite database: stores accounts
- Product reviews → SQLite database: stores reviews
- Wishlists → SQLite database: stores wishlists
- Promotions and banners → SQLite database: stores offers
