# gh-yeh/wehbegroup architecture

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

- Interactive diagram: https://gitdiagram.com/gh-yeh/wehbegroup
- Repository: https://github.com/gh-yeh/wehbegroup

## Overview

WehbeGroup is a Django wholesale catalog, inventory, and web POS. Staff browse or search products, build a session-backed ticket, and check out to create client orders; administrators also synchronize spreadsheet inventory, manage catalog data, and oversee salesman pricing. The graph separates those domain stages while showing the shared request-routing, persistence, form, and PDF layers. Some view bodies and templates were not sampled, so feature links rely on explicit route declarations or README capability descriptions rather than assumed internal calls.

Main entry points: [`catalog/urls.py`](https://github.com/gh-yeh/wehbegroup/blob/main/catalog/urls.py) (URL routing), [`catalog/models.py`](https://github.com/gh-yeh/wehbegroup/blob/main/catalog/models.py) (Domain models), [`catalog/views.py`](https://github.com/gh-yeh/wehbegroup/blob/main/catalog/views.py) (Catalog browsing), [`catalog/utils.py`](https://github.com/gh-yeh/wehbegroup/blob/main/catalog/utils.py) (PDF rendering)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Catalog and POS"]
  node_catalog_views["Catalog browsing<br/>[views.py]"]
  node_search["Live search<br/>[views.py]"]
  node_ticket["Ticket building<br/>[views.py]"]
  node_checkout["Order checkout<br/>[views.py]"]
  node_catalog_ui["Catalog pages"]
end

subgraph group_ops["Inventory and Admin"]
  node_inventory_sync["Inventory sync<br/>[views.py]"]
  node_catalog_admin["Catalog editing<br/>[views.py]"]
  node_admin_ui["Admin registration<br/>[admin.py]"]
end

subgraph group_crm["Clients and Sales"]
  node_clients["Client records<br/>[views.py]"]
  node_orders["Order records<br/>[views.py]"]
  node_sales_pricing["Salesman pricing<br/>[views.py]"]
  node_sales_dashboard["Sales dashboard<br/>[views.py]"]
end

subgraph group_core["Shared Backend"]
  node_router["URL routing<br/>[urls.py]"]
  node_item_form["Item form<br/>[forms.py]"]
  node_domain_models["Domain models<br/>[models.py]"]
  node_database[("SQLite database<br/>[settings.py]")]
  node_pdf["PDF rendering<br/>[utils.py]"]
  node_pdf_templates["PDF templates"]
end

node_staff(("Staff user"))

node_staff -->|"sends requests"| node_router
node_router -->|"routes catalog"| node_catalog_views
node_router -->|"routes search"| node_search
node_router -->|"routes ticket actions"| node_ticket
node_router -->|"routes checkout"| node_checkout
node_router -->|"routes sync"| node_inventory_sync
node_router -->|"routes editing"| node_catalog_admin
node_router -->|"routes clients"| node_clients
node_router -->|"routes orders"| node_orders
node_router -->|"routes pricing"| node_sales_pricing
node_router -->|"routes dashboard"| node_sales_dashboard
node_catalog_views -->|"queries catalog"| node_domain_models
node_search -->|"queries items"| node_domain_models
node_ticket -->|"loads items"| node_domain_models
node_checkout -->|"creates orders"| node_domain_models
node_inventory_sync -->|"syncs inventory"| node_domain_models
node_catalog_admin -->|"uses form"| node_item_form
node_item_form -->|"models item"| node_domain_models
node_admin_ui -->|"registers models"| node_domain_models
node_clients -->|"manages clients"| node_domain_models
node_orders -->|"manages orders"| node_domain_models
node_sales_pricing -->|"updates overrides"| node_domain_models
node_sales_dashboard -->|"manages profiles"| node_domain_models
node_domain_models -->|"persists records"| node_database
node_catalog_views -.->|"renders catalog"| node_catalog_ui
node_catalog_views -.->|"generates catalog PDF"| node_pdf
node_orders -.->|"generates receipts"| node_pdf
node_pdf -->|"renders templates"| node_pdf_templates

click node_router "https://github.com/gh-yeh/wehbegroup/blob/main/catalog/urls.py"
click node_catalog_views "https://github.com/gh-yeh/wehbegroup/blob/main/catalog/views.py"
click node_search "https://github.com/gh-yeh/wehbegroup/blob/main/catalog/views.py"
click node_ticket "https://github.com/gh-yeh/wehbegroup/blob/main/catalog/views.py"
click node_checkout "https://github.com/gh-yeh/wehbegroup/blob/main/catalog/views.py"
click node_catalog_ui "https://github.com/gh-yeh/wehbegroup/tree/main/catalog/templates/catalog"
click node_inventory_sync "https://github.com/gh-yeh/wehbegroup/blob/main/catalog/views.py"
click node_catalog_admin "https://github.com/gh-yeh/wehbegroup/blob/main/catalog/views.py"
click node_admin_ui "https://github.com/gh-yeh/wehbegroup/blob/main/catalog/admin.py"
click node_clients "https://github.com/gh-yeh/wehbegroup/blob/main/catalog/views.py"
click node_orders "https://github.com/gh-yeh/wehbegroup/blob/main/catalog/views.py"
click node_sales_pricing "https://github.com/gh-yeh/wehbegroup/blob/main/catalog/views.py"
click node_sales_dashboard "https://github.com/gh-yeh/wehbegroup/blob/main/catalog/views.py"
click node_item_form "https://github.com/gh-yeh/wehbegroup/blob/main/catalog/forms.py"
click node_domain_models "https://github.com/gh-yeh/wehbegroup/blob/main/catalog/models.py"
click node_database "https://github.com/gh-yeh/wehbegroup/blob/main/wehbe_backend/settings.py"
click node_pdf "https://github.com/gh-yeh/wehbegroup/blob/main/catalog/utils.py"
click node_pdf_templates "https://github.com/gh-yeh/wehbegroup/tree/main/catalog/templates/catalog"

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_views,node_search,node_ticket,node_checkout,node_catalog_ui,node_staff toneBlue
class node_inventory_sync,node_catalog_admin,node_admin_ui toneAmber
class node_clients,node_orders,node_sales_pricing,node_sales_dashboard toneMint
class node_router,node_item_form,node_domain_models,node_database,node_pdf,node_pdf_templates toneRose
```

## Components

### Catalog and POS

- [Catalog browsing](https://github.com/gh-yeh/wehbegroup/blob/main/catalog/views.py): `catalog/views.py`
- [Live search](https://github.com/gh-yeh/wehbegroup/blob/main/catalog/views.py): `catalog/views.py`
- [Ticket building](https://github.com/gh-yeh/wehbegroup/blob/main/catalog/views.py): `catalog/views.py`
- [Order checkout](https://github.com/gh-yeh/wehbegroup/blob/main/catalog/views.py): `catalog/views.py`
- [Catalog pages](https://github.com/gh-yeh/wehbegroup/tree/main/catalog/templates/catalog): `catalog/templates/catalog`

### Inventory and Admin

- [Inventory sync](https://github.com/gh-yeh/wehbegroup/blob/main/catalog/views.py): `catalog/views.py`
- [Catalog editing](https://github.com/gh-yeh/wehbegroup/blob/main/catalog/views.py): `catalog/views.py`
- [Admin registration](https://github.com/gh-yeh/wehbegroup/blob/main/catalog/admin.py): `catalog/admin.py`

### Clients and Sales

- [Client records](https://github.com/gh-yeh/wehbegroup/blob/main/catalog/views.py): `catalog/views.py`
- [Order records](https://github.com/gh-yeh/wehbegroup/blob/main/catalog/views.py): `catalog/views.py`
- [Salesman pricing](https://github.com/gh-yeh/wehbegroup/blob/main/catalog/views.py): `catalog/views.py`
- [Sales dashboard](https://github.com/gh-yeh/wehbegroup/blob/main/catalog/views.py): `catalog/views.py`

### Shared Backend

- [URL routing](https://github.com/gh-yeh/wehbegroup/blob/main/catalog/urls.py): `catalog/urls.py`
- [Item form](https://github.com/gh-yeh/wehbegroup/blob/main/catalog/forms.py): `catalog/forms.py`
- [Domain models](https://github.com/gh-yeh/wehbegroup/blob/main/catalog/models.py): `catalog/models.py`
- [SQLite database](https://github.com/gh-yeh/wehbegroup/blob/main/wehbe_backend/settings.py): `wehbe_backend/settings.py`
- [PDF rendering](https://github.com/gh-yeh/wehbegroup/blob/main/catalog/utils.py): `catalog/utils.py`
- [PDF templates](https://github.com/gh-yeh/wehbegroup/tree/main/catalog/templates/catalog): `catalog/templates/catalog`

### Other components

- **Staff user**

## Connections

- Staff user → URL routing: sends requests (evidence: `catalog/urls.py`)
- URL routing → Catalog browsing: routes catalog (evidence: `catalog/urls.py`)
- URL routing → Live search: routes search (evidence: `catalog/urls.py`)
- URL routing → Ticket building: routes ticket actions (evidence: `catalog/urls.py`)
- URL routing → Order checkout: routes checkout (evidence: `catalog/urls.py`)
- URL routing → Inventory sync: routes sync (evidence: `catalog/urls.py`)
- URL routing → Catalog editing: routes editing (evidence: `catalog/urls.py`)
- URL routing → Client records: routes clients (evidence: `catalog/urls.py`)
- URL routing → Order records: routes orders (evidence: `catalog/urls.py`)
- URL routing → Salesman pricing: routes pricing (evidence: `catalog/urls.py`)
- URL routing → Sales dashboard: routes dashboard (evidence: `catalog/urls.py`)
- Catalog browsing → Domain models: queries catalog (evidence: `catalog/views.py`)
- Live search → Domain models: queries items (evidence: `catalog/views.py`)
- Ticket building → Domain models: loads items (evidence: `catalog/views.py`)
- Order checkout → Domain models: creates orders (evidence: `catalog/views.py`)
- Inventory sync → Domain models: syncs inventory (evidence: `README.md`)
- Catalog editing → Item form: uses form (evidence: `catalog/views.py`)
- Item form → Domain models: models item (evidence: `catalog/forms.py`)
- Admin registration → Domain models: registers models (evidence: `catalog/admin.py`)
- Client records → Domain models: manages clients (evidence: `catalog/views.py`)
- Order records → Domain models: manages orders (evidence: `catalog/views.py`)
- Salesman pricing → Domain models: updates overrides (evidence: `catalog/views.py`)
- Sales dashboard → Domain models: manages profiles (evidence: `catalog/views.py`)
- Domain models → SQLite database: persists records (evidence: `wehbe_backend/settings.py`)
- Catalog browsing → Catalog pages: renders catalog (evidence: `README.md`)
- Catalog browsing → PDF rendering: generates catalog PDF (evidence: `README.md`)
- Order records → PDF rendering: generates receipts (evidence: `README.md`)
- PDF rendering → PDF templates: renders templates (evidence: `catalog/utils.py`)
