# mainguyenhonganh2912-dau/onepiece-figure-store architecture

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

- Interactive diagram: https://gitdiagram.com/mainguyenhonganh2912-dau/onepiece-figure-store
- Repository: https://github.com/mainguyenhonganh2912-dau/onepiece-figure-store

## Overview

One Piece Figure Store is a Django e-commerce application for buyers, sellers, and administrators. Buyers browse and filter figures, manage a session cart and coupons, then place orders and view order confirmation. Accounts support role-based access; sellers manage listings and order status, while administrators oversee users, products, categories, and orders. URL patterns dispatch requests through a re-exporting view module to domain handlers, which use Django models for persistence. The README documents VietQR and other payment options, but the excerpts do not establish live payment-provider integrations; those are represented as order capabilities, not external service connections.

Main entry points: [`cua_hang/co_so_du_lieu.py`](https://github.com/mainguyenhonganh2912-dau/onepiece-figure-store/blob/main/cua_hang/co_so_du_lieu.py) (Domain Models), [`cua_hang/views.py`](https://github.com/mainguyenhonganh2912-dau/onepiece-figure-store/blob/main/cua_hang/views.py) (View Exports), [`du_an/urls.py`](https://github.com/mainguyenhonganh2912-dau/onepiece-figure-store/blob/main/du_an/urls.py) (Project Routes), [`cua_hang/trang_quan_tri_admin.py`](https://github.com/mainguyenhonganh2912-dau/onepiece-figure-store/blob/main/cua_hang/trang_quan_tri_admin.py) (Django Admin)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web Routing"]
  node_root_routes["Project Routes<br/>[urls.py]"]
  node_shop_routes["Shop Routes<br/>[duong_dan_url.py]"]
  node_view_dispatch["View Exports<br/>[views.py]"]
end

subgraph group_commerce["Shopping"]
  node_shopping["Browse, Cart, Checkout"]
  node_shared_context["Shared Shop Context"]
end

subgraph group_identity["Accounts"]
  node_account["Authentication and Profile<br/>[xu_ly_tai_khoan.py]"]
end

subgraph group_operations["Seller and Admin"]
  node_seller_portal["Seller Portal<br/>[xu_ly_nguoi_ban.py]"]
  node_admin_portal["Admin Portal<br/>[xu_ly_quan_tri.py]"]
  node_django_admin["Django Admin"]
  node_admin_config["Admin Registration<br/>[admin.py]"]
end

subgraph group_data["Persistence"]
  node_orm["Domain Models<br/>[co_so_du_lieu.py]"]
  node_database[("Relational Store")]
  node_seed["Catalog Seed Data<br/>[seed_data.py]"]
end

node_buyer(("Buyer / Guest"))
node_seller(("Seller"))
node_admin_actor(("Administrator"))

node_buyer -->|"browses and orders"| node_root_routes
node_seller -->|"manages shop"| node_root_routes
node_admin_actor -->|"administers store"| node_root_routes
node_root_routes -->|"routes shop"| node_shop_routes
node_root_routes -->|"routes admin"| node_django_admin
node_shop_routes -->|"dispatches views"| node_view_dispatch
node_view_dispatch -->|"exports handlers"| node_shopping
node_view_dispatch -->|"exports handlers"| node_account
node_view_dispatch -->|"exports handlers"| node_seller_portal
node_view_dispatch -->|"exports handlers"| node_admin_portal
node_shopping -->|"queries and saves"| node_orm
node_account -->|"reads and updates"| node_orm
node_seller_portal -->|"manages listings and orders"| node_orm
node_admin_portal -->|"administers records"| node_orm
node_django_admin -->|"administers models"| node_orm
node_orm -->|"persists records"| node_database
node_seed -->|"loads sample catalog"| node_orm
node_shared_context -.->|"reads shop data"| node_orm
node_admin_config -->|"imports configuration"| node_django_admin

click node_root_routes "https://github.com/mainguyenhonganh2912-dau/onepiece-figure-store/blob/main/du_an/urls.py"
click node_shop_routes "https://github.com/mainguyenhonganh2912-dau/onepiece-figure-store/blob/main/cua_hang/duong_dan_url.py"
click node_view_dispatch "https://github.com/mainguyenhonganh2912-dau/onepiece-figure-store/blob/main/cua_hang/views.py"
click node_shopping "https://github.com/mainguyenhonganh2912-dau/onepiece-figure-store/blob/main/cua_hang/xu_ly_khach_hang.py"
click node_account "https://github.com/mainguyenhonganh2912-dau/onepiece-figure-store/blob/main/cua_hang/xu_ly_tai_khoan.py"
click node_seller_portal "https://github.com/mainguyenhonganh2912-dau/onepiece-figure-store/blob/main/cua_hang/xu_ly_nguoi_ban.py"
click node_admin_portal "https://github.com/mainguyenhonganh2912-dau/onepiece-figure-store/blob/main/cua_hang/xu_ly_quan_tri.py"
click node_django_admin "https://github.com/mainguyenhonganh2912-dau/onepiece-figure-store/blob/main/cua_hang/trang_quan_tri_admin.py"
click node_shared_context "https://github.com/mainguyenhonganh2912-dau/onepiece-figure-store/blob/main/cua_hang/du_lieu_dung_chung.py"
click node_orm "https://github.com/mainguyenhonganh2912-dau/onepiece-figure-store/blob/main/cua_hang/co_so_du_lieu.py"
click node_seed "https://github.com/mainguyenhonganh2912-dau/onepiece-figure-store/blob/main/seed_data.py"
click node_admin_config "https://github.com/mainguyenhonganh2912-dau/onepiece-figure-store/blob/main/cua_hang/admin.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_root_routes,node_shop_routes,node_view_dispatch toneBlue
class node_shopping,node_shared_context toneAmber
class node_account toneMint
class node_seller_portal,node_admin_portal,node_django_admin,node_admin_config toneRose
class node_orm,node_database,node_seed,node_buyer,node_seller,node_admin_actor toneIndigo
```

## Components

### Web Routing

- [Project Routes](https://github.com/mainguyenhonganh2912-dau/onepiece-figure-store/blob/main/du_an/urls.py): `du_an/urls.py`
- [Shop Routes](https://github.com/mainguyenhonganh2912-dau/onepiece-figure-store/blob/main/cua_hang/duong_dan_url.py): `cua_hang/duong_dan_url.py`
- [View Exports](https://github.com/mainguyenhonganh2912-dau/onepiece-figure-store/blob/main/cua_hang/views.py): `cua_hang/views.py`

### Shopping

- [Browse, Cart, Checkout](https://github.com/mainguyenhonganh2912-dau/onepiece-figure-store/blob/main/cua_hang/xu_ly_khach_hang.py): `cua_hang/xu_ly_khach_hang.py`
- [Shared Shop Context](https://github.com/mainguyenhonganh2912-dau/onepiece-figure-store/blob/main/cua_hang/du_lieu_dung_chung.py): `cua_hang/du_lieu_dung_chung.py`

### Accounts

- [Authentication and Profile](https://github.com/mainguyenhonganh2912-dau/onepiece-figure-store/blob/main/cua_hang/xu_ly_tai_khoan.py): `cua_hang/xu_ly_tai_khoan.py`

### Seller and Admin

- [Seller Portal](https://github.com/mainguyenhonganh2912-dau/onepiece-figure-store/blob/main/cua_hang/xu_ly_nguoi_ban.py): `cua_hang/xu_ly_nguoi_ban.py`
- [Admin Portal](https://github.com/mainguyenhonganh2912-dau/onepiece-figure-store/blob/main/cua_hang/xu_ly_quan_tri.py): `cua_hang/xu_ly_quan_tri.py`
- [Django Admin](https://github.com/mainguyenhonganh2912-dau/onepiece-figure-store/blob/main/cua_hang/trang_quan_tri_admin.py): `cua_hang/trang_quan_tri_admin.py`
- [Admin Registration](https://github.com/mainguyenhonganh2912-dau/onepiece-figure-store/blob/main/cua_hang/admin.py): `cua_hang/admin.py`

### Persistence

- [Domain Models](https://github.com/mainguyenhonganh2912-dau/onepiece-figure-store/blob/main/cua_hang/co_so_du_lieu.py): `cua_hang/co_so_du_lieu.py`
- **Relational Store**
- [Catalog Seed Data](https://github.com/mainguyenhonganh2912-dau/onepiece-figure-store/blob/main/seed_data.py): `seed_data.py`

### Other components

- **Buyer / Guest**
- **Seller**
- **Administrator**

## Connections

- Buyer / Guest → Project Routes: browses and orders (evidence: `README.md`)
- Seller → Project Routes: manages shop (evidence: `README.md`)
- Administrator → Project Routes: administers store (evidence: `README.md`)
- Project Routes → Shop Routes: routes shop (evidence: `README.md`)
- Project Routes → Django Admin: routes admin (evidence: `README.md`)
- Shop Routes → View Exports: dispatches views (evidence: `cua_hang/duong_dan_url.py`)
- View Exports → Browse, Cart, Checkout: exports handlers (evidence: `cua_hang/views.py`)
- View Exports → Authentication and Profile: exports handlers (evidence: `cua_hang/views.py`)
- View Exports → Seller Portal: exports handlers (evidence: `cua_hang/views.py`)
- View Exports → Admin Portal: exports handlers (evidence: `cua_hang/views.py`)
- Browse, Cart, Checkout → Domain Models: queries and saves (evidence: `cua_hang/xu_ly_khach_hang.py`)
- Authentication and Profile → Domain Models: reads and updates (evidence: `cua_hang/xu_ly_tai_khoan.py`)
- Seller Portal → Domain Models: manages listings and orders (evidence: `cua_hang/xu_ly_nguoi_ban.py`)
- Admin Portal → Domain Models: administers records (evidence: `cua_hang/xu_ly_quan_tri.py`)
- Django Admin → Domain Models: administers models (evidence: `cua_hang/trang_quan_tri_admin.py`)
- Domain Models → Relational Store: persists records (evidence: `README.md`)
- Catalog Seed Data → Domain Models: loads sample catalog (evidence: `seed_data.py`)
- Shared Shop Context → Domain Models: reads shop data
- Admin Registration → Django Admin: imports configuration (evidence: `cua_hang/admin.py`)
