# 23130040/pcmatch architecture

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

- Interactive diagram: https://gitdiagram.com/23130040/pcmatch
- Repository: https://github.com/23130040/pcmatch

## Overview

PCMatch is a Django-served commerce demo whose buyer, shop, and staff experiences primarily use browser-side demo data and storage; Django integration is incremental. The central buyer workflow is to browse component fixtures, assemble a compatible PC, and manage a build/request or shop offer in the browser. A separate Django-backed catalog supports product filtering, comparison, and product administration. The graph also preserves documented page/configuration serving and the sampled order/analytics domain. Several frontend features are documented or indexed but not fully excerpted, so only evidenced connections are drawn.

Main entry points: [`static/js/shop.js`](https://github.com/23130040/pcmatch/blob/main/static/js/shop.js) (Shop portal), [`static/js/builds.js`](https://github.com/23130040/pcmatch/blob/main/static/js/builds.js) (Build compatibility), [`static/js/data.js`](https://github.com/23130040/pcmatch/blob/main/static/js/data.js) (Commerce fixtures), [`PCMatch/urls.py`](https://github.com/23130040/pcmatch/blob/main/PCMatch/urls.py) (Page routes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_django["Django page serving"]
  node_page_registry["Page registry<br/>[pages.py]"]
  node_page_routes["Page routes<br/>[urls.py]"]
  node_frontend_config["Frontend config"]
end

subgraph group_buyer["Buyer experience"]
  node_buyer_build["Build compatibility<br/>[builds.js]"]
  node_demo_fixtures["Commerce fixtures<br/>[data.js]"]
  node_merchandising["Merchandising data"]
  node_browser_store["Browser state<br/>[store.js]"]
  node_buyer_catalog_ui["Buyer catalog UI<br/>[catalog.js]"]
  node_buyer_commerce_ui["Buyer commerce UI<br/>[commerce.js]"]
  node_frontend_routing["URL helpers<br/>[routing.js]"]
end

subgraph group_shop["Shop experience"]
  node_shop_portal["Shop portal<br/>[shop.js]"]
  node_after_sale_data["After-sale data<br/>[aftersale-data.js]"]
end

subgraph group_catalog["Database catalog"]
  node_product_views["Catalog and product views<br/>[views.py]"]
  node_product_filters["Catalog forms<br/>[forms.py]"]
  node_product_records[("Product records<br/>[models.py]")]
end

subgraph group_commerce["Commerce domains"]
  node_shop_records[("Shop records<br/>[models.py]")]
  node_order_records[("Order records<br/>[models.py]")]
  node_analytics_views["Order analytics<br/>[views.py]"]
end

node_browser(("Browser visitor"))

node_browser -->|"requests pages"| node_page_routes
node_page_routes -->|"serves pages"| node_page_registry
node_frontend_config -->|"reads page groups"| node_page_registry
node_page_routes -.->|"publishes URLs"| node_frontend_config
node_buyer_build -->|"reads fixtures"| node_demo_fixtures
node_buyer_build -->|"updates state"| node_browser_store
node_buyer_build -->|"uses page name"| node_frontend_routing
node_demo_fixtures -->|"loads merchandising"| node_merchandising
node_browser_store -->|"reads fixtures"| node_demo_fixtures
node_shop_portal -->|"reads commerce data"| node_demo_fixtures
node_shop_portal -->|"reads and updates"| node_browser_store
node_shop_portal -->|"checks compatibility"| node_buyer_build
node_shop_portal -->|"uses case data"| node_after_sale_data
node_shop_portal -->|"builds page links"| node_frontend_routing
node_product_views -->|"validates filters"| node_product_filters
node_product_views -->|"queries products"| node_product_records
node_product_filters -->|"filters fields"| node_product_records
node_product_records -->|"references shop"| node_shop_records
node_analytics_views -->|"reads orders"| node_order_records

click node_page_registry "https://github.com/23130040/pcmatch/blob/main/PCMatch/pages.py"
click node_page_routes "https://github.com/23130040/pcmatch/blob/main/PCMatch/urls.py"
click node_frontend_config "https://github.com/23130040/pcmatch/blob/main/PCMatch/context_processors.py"
click node_buyer_build "https://github.com/23130040/pcmatch/blob/main/static/js/builds.js"
click node_demo_fixtures "https://github.com/23130040/pcmatch/blob/main/static/js/data.js"
click node_merchandising "https://github.com/23130040/pcmatch/blob/main/static/js/merchandising-data.js"
click node_browser_store "https://github.com/23130040/pcmatch/blob/main/static/js/store.js"
click node_buyer_catalog_ui "https://github.com/23130040/pcmatch/blob/main/static/js/catalog.js"
click node_buyer_commerce_ui "https://github.com/23130040/pcmatch/blob/main/static/js/commerce.js"
click node_shop_portal "https://github.com/23130040/pcmatch/blob/main/static/js/shop.js"
click node_after_sale_data "https://github.com/23130040/pcmatch/blob/main/static/js/aftersale-data.js"
click node_frontend_routing "https://github.com/23130040/pcmatch/blob/main/static/js/routing.js"
click node_product_views "https://github.com/23130040/pcmatch/blob/main/products/views.py"
click node_product_filters "https://github.com/23130040/pcmatch/blob/main/products/forms.py"
click node_product_records "https://github.com/23130040/pcmatch/blob/main/products/models.py"
click node_shop_records "https://github.com/23130040/pcmatch/blob/main/shops/models.py"
click node_order_records "https://github.com/23130040/pcmatch/blob/main/orders/models.py"
click node_analytics_views "https://github.com/23130040/pcmatch/blob/main/analytics/views.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_page_registry,node_page_routes,node_frontend_config,node_browser toneBlue
class node_buyer_build,node_demo_fixtures,node_merchandising,node_browser_store,node_buyer_catalog_ui,node_buyer_commerce_ui,node_frontend_routing toneAmber
class node_shop_portal,node_after_sale_data toneMint
class node_product_views,node_product_filters,node_product_records toneRose
class node_shop_records,node_order_records,node_analytics_views toneIndigo
```

## Components

### Django page serving

- [Page registry](https://github.com/23130040/pcmatch/blob/main/PCMatch/pages.py): `PCMatch/pages.py`
- [Page routes](https://github.com/23130040/pcmatch/blob/main/PCMatch/urls.py): `PCMatch/urls.py`
- [Frontend config](https://github.com/23130040/pcmatch/blob/main/PCMatch/context_processors.py): `PCMatch/context_processors.py`

### Buyer experience

- [Build compatibility](https://github.com/23130040/pcmatch/blob/main/static/js/builds.js): `static/js/builds.js`
- [Commerce fixtures](https://github.com/23130040/pcmatch/blob/main/static/js/data.js): `static/js/data.js`
- [Merchandising data](https://github.com/23130040/pcmatch/blob/main/static/js/merchandising-data.js): `static/js/merchandising-data.js`
- [Browser state](https://github.com/23130040/pcmatch/blob/main/static/js/store.js): `static/js/store.js`
- [Buyer catalog UI](https://github.com/23130040/pcmatch/blob/main/static/js/catalog.js): `static/js/catalog.js`
- [Buyer commerce UI](https://github.com/23130040/pcmatch/blob/main/static/js/commerce.js): `static/js/commerce.js`
- [URL helpers](https://github.com/23130040/pcmatch/blob/main/static/js/routing.js): `static/js/routing.js`

### Shop experience

- [Shop portal](https://github.com/23130040/pcmatch/blob/main/static/js/shop.js): `static/js/shop.js`
- [After-sale data](https://github.com/23130040/pcmatch/blob/main/static/js/aftersale-data.js): `static/js/aftersale-data.js`

### Database catalog

- [Catalog and product views](https://github.com/23130040/pcmatch/blob/main/products/views.py): `products/views.py`
- [Catalog forms](https://github.com/23130040/pcmatch/blob/main/products/forms.py): `products/forms.py`
- [Product records](https://github.com/23130040/pcmatch/blob/main/products/models.py): `products/models.py`

### Commerce domains

- [Shop records](https://github.com/23130040/pcmatch/blob/main/shops/models.py): `shops/models.py`
- [Order records](https://github.com/23130040/pcmatch/blob/main/orders/models.py): `orders/models.py`
- [Order analytics](https://github.com/23130040/pcmatch/blob/main/analytics/views.py): `analytics/views.py`

### Other components

- **Browser visitor**

## Connections

- Browser visitor → Page routes: requests pages
- Page routes → Page registry: serves pages
- Frontend config → Page registry: reads page groups (evidence: `PCMatch/context_processors.py`)
- Page routes → Frontend config: publishes URLs
- Build compatibility → Commerce fixtures: reads fixtures (evidence: `static/js/builds.js`)
- Build compatibility → Browser state: updates state (evidence: `static/js/builds.js`)
- Build compatibility → URL helpers: uses page name (evidence: `static/js/builds.js`)
- Commerce fixtures → Merchandising data: loads merchandising (evidence: `static/js/data.js`)
- Browser state → Commerce fixtures: reads fixtures (evidence: `static/js/store.js`)
- Shop portal → Commerce fixtures: reads commerce data (evidence: `static/js/shop.js`)
- Shop portal → Browser state: reads and updates (evidence: `static/js/shop.js`)
- Shop portal → Build compatibility: checks compatibility (evidence: `static/js/shop.js`)
- Shop portal → After-sale data: uses case data (evidence: `static/js/shop.js`)
- Shop portal → URL helpers: builds page links (evidence: `static/js/shop.js`)
- Catalog and product views → Catalog forms: validates filters (evidence: `products/views.py`)
- Catalog and product views → Product records: queries products (evidence: `products/views.py`)
- Catalog forms → Product records: filters fields (evidence: `products/forms.py`)
- Product records → Shop records: references shop (evidence: `products/models.py`)
- Order analytics → Order records: reads orders (evidence: `analytics/views.py`)
