# phucndh777/noithat architecture

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

- Interactive diagram: https://gitdiagram.com/phucndh777/noithat
- Repository: https://github.com/phucndh777/noithat

## Overview

Furni Store is a Django furniture storefront with staff administration. Customers browse and review products, register, keep a session-backed cart, place orders, and view their orders; staff manage products and order status. Checkout validates stock and creates order items within a transaction, while cancellation restores stock. The graph separates these domain responsibilities even though several share shop/views.py. Some view sections and templates were not sampled, so those branches rely on the README or URL declarations rather than claims about unseen implementation details.

Main entry points: [`shop/urls.py`](https://github.com/phucndh777/noithat/blob/main/shop/urls.py) (URL routes), [`shop/templates/shop`](https://github.com/phucndh777/noithat/tree/main/shop/templates/shop) (Store pages), [`shop/models.py`](https://github.com/phucndh777/noithat/blob/main/shop/models.py) (Store records), [`shop/views.py`](https://github.com/phucndh777/noithat/blob/main/shop/views.py) (Product management)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Web entry"]
  node_routes["URL routes<br/>[urls.py]"]
  node_account["Account flows<br/>[views.py]"]
  node_settings["Django settings<br/>[settings.py]"]
end

subgraph group_shopping["Storefront"]
  node_catalog["Product browsing<br/>[views.py]"]
  node_reviews["Product reviews<br/>[views.py]"]
  node_forms["Input forms<br/>[forms.py]"]
  node_templates["Store pages"]
end

subgraph group_commerce["Orders"]
  node_cart["Session cart<br/>[views.py]"]
  node_checkout["Checkout<br/>[views.py]"]
  node_orders["Order history<br/>[views.py]"]
  node_domain["Store records<br/>[models.py]"]
  node_database[("SQLite database<br/>[db.sqlite3]")]
end

subgraph group_operations["Staff operations"]
  node_product_admin["Product management<br/>[views.py]"]
  node_order_admin["Order management<br/>[views.py]"]
  node_admin_forms["Product form<br/>[forms.py]"]
  node_media["Product images"]
end

node_customer(("Customer"))
node_staff(("Staff user"))

node_customer -->|"requests pages"| node_routes
node_staff -->|"uses admin routes"| node_routes
node_routes -->|"routes to"| node_catalog
node_routes -->|"routes to"| node_reviews
node_routes -->|"routes to"| node_account
node_routes -->|"routes to"| node_cart
node_routes -->|"routes to"| node_checkout
node_routes -->|"routes to"| node_orders
node_routes -->|"routes to"| node_product_admin
node_routes -->|"routes to"| node_order_admin
node_account -->|"validates registration"| node_forms
node_account -->|"renders pages"| node_templates
node_catalog -->|"queries products"| node_domain
node_catalog -->|"renders pages"| node_templates
node_reviews -->|"validates reviews"| node_forms
node_reviews -->|"reads and writes reviews"| node_domain
node_reviews -->|"renders details"| node_templates
node_cart -->|"loads products"| node_domain
node_cart -->|"renders cart"| node_templates
node_cart -->|"uses session middleware"| node_settings
node_checkout -->|"validates order"| node_forms
node_checkout -->|"creates order items"| node_domain
node_checkout -->|"renders checkout"| node_templates
node_orders -.->|"queries orders"| node_domain
node_orders -.->|"renders order pages"| node_templates
node_product_admin -->|"validates product edits"| node_admin_forms
node_product_admin -->|"saves products"| node_domain
node_product_admin -->|"stores product images"| node_media
node_product_admin -.->|"renders management pages"| node_templates
node_order_admin -->|"updates order status"| node_domain
node_order_admin -.->|"renders order management"| node_templates
node_settings -->|"configures SQLite"| node_database
node_settings -->|"configures media root"| node_media

click node_routes "https://github.com/phucndh777/noithat/blob/main/shop/urls.py"
click node_account "https://github.com/phucndh777/noithat/blob/main/shop/views.py"
click node_catalog "https://github.com/phucndh777/noithat/blob/main/shop/views.py"
click node_reviews "https://github.com/phucndh777/noithat/blob/main/shop/views.py"
click node_forms "https://github.com/phucndh777/noithat/blob/main/shop/forms.py"
click node_templates "https://github.com/phucndh777/noithat/tree/main/shop/templates/shop"
click node_cart "https://github.com/phucndh777/noithat/blob/main/shop/views.py"
click node_checkout "https://github.com/phucndh777/noithat/blob/main/shop/views.py"
click node_orders "https://github.com/phucndh777/noithat/blob/main/shop/views.py"
click node_domain "https://github.com/phucndh777/noithat/blob/main/shop/models.py"
click node_database "https://github.com/phucndh777/noithat/blob/main/db.sqlite3"
click node_product_admin "https://github.com/phucndh777/noithat/blob/main/shop/views.py"
click node_order_admin "https://github.com/phucndh777/noithat/blob/main/shop/views.py"
click node_admin_forms "https://github.com/phucndh777/noithat/blob/main/shop/forms.py"
click node_media "https://github.com/phucndh777/noithat/tree/main/media/products"
click node_settings "https://github.com/phucndh777/noithat/blob/main/config/settings.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_routes,node_account,node_settings,node_staff toneBlue
class node_catalog,node_reviews,node_forms,node_templates toneAmber
class node_cart,node_checkout,node_orders,node_domain,node_database toneMint
class node_product_admin,node_order_admin,node_admin_forms,node_media toneRose
class node_customer toneIndigo
```

## Components

### Web entry

- [URL routes](https://github.com/phucndh777/noithat/blob/main/shop/urls.py): `shop/urls.py`
- [Account flows](https://github.com/phucndh777/noithat/blob/main/shop/views.py): `shop/views.py`
- [Django settings](https://github.com/phucndh777/noithat/blob/main/config/settings.py): `config/settings.py`

### Storefront

- [Product browsing](https://github.com/phucndh777/noithat/blob/main/shop/views.py): `shop/views.py`
- [Product reviews](https://github.com/phucndh777/noithat/blob/main/shop/views.py): `shop/views.py`
- [Input forms](https://github.com/phucndh777/noithat/blob/main/shop/forms.py): `shop/forms.py`
- [Store pages](https://github.com/phucndh777/noithat/tree/main/shop/templates/shop): `shop/templates/shop`

### Orders

- [Session cart](https://github.com/phucndh777/noithat/blob/main/shop/views.py): `shop/views.py`
- [Checkout](https://github.com/phucndh777/noithat/blob/main/shop/views.py): `shop/views.py`
- [Order history](https://github.com/phucndh777/noithat/blob/main/shop/views.py): `shop/views.py`
- [Store records](https://github.com/phucndh777/noithat/blob/main/shop/models.py): `shop/models.py`
- [SQLite database](https://github.com/phucndh777/noithat/blob/main/db.sqlite3): `db.sqlite3`

### Staff operations

- [Product management](https://github.com/phucndh777/noithat/blob/main/shop/views.py): `shop/views.py`
- [Order management](https://github.com/phucndh777/noithat/blob/main/shop/views.py): `shop/views.py`
- [Product form](https://github.com/phucndh777/noithat/blob/main/shop/forms.py): `shop/forms.py`
- [Product images](https://github.com/phucndh777/noithat/tree/main/media/products): `media/products`

### Other components

- **Customer**
- **Staff user**

## Connections

- Customer → URL routes: requests pages (evidence: `README.md`)
- Staff user → URL routes: uses admin routes (evidence: `README.md`)
- URL routes → Product browsing: routes to (evidence: `shop/urls.py`)
- URL routes → Product reviews: routes to (evidence: `shop/urls.py`)
- URL routes → Account flows: routes to (evidence: `shop/urls.py`)
- URL routes → Session cart: routes to (evidence: `shop/urls.py`)
- URL routes → Checkout: routes to (evidence: `shop/urls.py`)
- URL routes → Order history: routes to (evidence: `shop/urls.py`)
- URL routes → Product management: routes to (evidence: `shop/urls.py`)
- URL routes → Order management: routes to (evidence: `shop/urls.py`)
- Account flows → Input forms: validates registration (evidence: `shop/views.py`)
- Account flows → Store pages: renders pages (evidence: `shop/views.py`)
- Product browsing → Store records: queries products (evidence: `shop/views.py`)
- Product browsing → Store pages: renders pages (evidence: `shop/views.py`)
- Product reviews → Input forms: validates reviews (evidence: `shop/views.py`)
- Product reviews → Store records: reads and writes reviews (evidence: `shop/views.py`)
- Product reviews → Store pages: renders details (evidence: `shop/views.py`)
- Session cart → Store records: loads products (evidence: `shop/views.py`)
- Session cart → Store pages: renders cart (evidence: `shop/views.py`)
- Session cart → Django settings: uses session middleware (evidence: `config/settings.py`)
- Checkout → Input forms: validates order (evidence: `shop/views.py`)
- Checkout → Store records: creates order items (evidence: `shop/views.py`)
- Checkout → Store pages: renders checkout (evidence: `shop/views.py`)
- Order history → Store records: queries orders (evidence: `shop/views.py`)
- Order history → Store pages: renders order pages
- Product management → Product form: validates product edits (evidence: `shop/views.py`)
- Product management → Store records: saves products (evidence: `shop/views.py`)
- Product management → Product images: stores product images
- Product management → Store pages: renders management pages
- Order management → Store records: updates order status (evidence: `shop/views.py`)
- Order management → Store pages: renders order management
- Django settings → SQLite database: configures SQLite (evidence: `config/settings.py`)
- Django settings → Product images: configures media root (evidence: `config/settings.py`)
