# yenmangu/ms4-prop-house architecture

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

- Interactive diagram: https://gitdiagram.com/yenmangu/ms4-prop-house
- Repository: https://github.com/yenmangu/ms4-prop-house

## Overview

PropHouse is a Django prop-and-equipment hire platform. Its documented customer journey is browse, add to basket, checkout, and hire; account features add saved addresses, order history, and optional discounted membership. The graph preserves catalogue, basket, payment, order, and physical fulfilment as distinct stages, plus account and reporting capabilities. Some view and integration wiring is unsampled, so those links are shown only where the README or source index supports them.

Main entry points: [`catalogue/views.py`](https://github.com/yenmangu/ms4-prop-house/blob/main/catalogue/views.py) (Catalogue browsing), [`commerce/models.py`](https://github.com/yenmangu/ms4-prop-house/blob/main/commerce/models.py) (Orders and order items), [`warehouse/services.py`](https://github.com/yenmangu/ms4-prop-house/blob/main/warehouse/services.py) (Stock fulfilment), [`commerce/services.py`](https://github.com/yenmangu/ms4-prop-house/blob/main/commerce/services.py) (Checkout orchestration)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_discovery["Product discovery"]
  node_catalogue_views["Catalogue browsing<br/>[views.py]"]
  node_catalogue_filters["Catalogue filters<br/>[filters.py]"]
  node_products[("Products and categories<br/>[models.py]")]
end

subgraph group_checkout["Basket and checkout"]
  node_basket_views["Basket interactions<br/>[views.py]"]
  node_basket_service["Basket resolution<br/>[services.py]"]
  node_basket_data[("Basket and lines<br/>[models.py]")]
  node_checkout_service["Checkout orchestration<br/>[services.py]"]
  node_commerce_views["Order and payment views<br/>[views.py]"]
  node_orders[("Orders and order items<br/>[models.py]")]
end

subgraph group_accounts["Customer accounts"]
  node_account_views["Account dashboard<br/>[views.py]"]
  node_account_filters["Order filters<br/>[filters.py]"]
  node_account_forms["Address forms<br/>[forms.py]"]
  node_address_service["Address management<br/>[address_service.py]"]
  node_membership_service["Membership billing"]
  node_account_data[("Users and memberships<br/>[models.py]")]
  node_reports["Account reports<br/>[reports.py]"]
end

subgraph group_fulfilment["Hire fulfilment"]
  node_stock_data[("Stock and hire records<br/>[models.py]")]
  node_stock_service["Stock fulfilment<br/>[services.py]"]
  node_warehouse_views["Warehouse operations<br/>[views.py]"]
end

subgraph group_shared["Shared services"]
  node_pdf_admin["Admin PDF output<br/>[admin_pdf.py]"]
  node_pdf_base["PDF rendering<br/>[base_pdf.py]"]
  node_admin_invoice["Invoice response"]
end

node_customer(("Customer"))
node_stripe["Stripe payments"]

node_customer -->|"browses"| node_catalogue_views
node_catalogue_views -->|"uses filters"| node_catalogue_filters
node_catalogue_views -->|"queries products"| node_products
node_catalogue_views -.->|"adds to basket"| node_basket_views
node_customer -->|"selects items"| node_basket_views
node_basket_views -.->|"resolves basket"| node_basket_service
node_basket_service -->|"loads or creates"| node_basket_data
node_basket_data -->|"references products"| node_products
node_basket_data -->|"checks availability"| node_stock_service
node_customer -->|"checks out"| node_checkout_service
node_checkout_service -->|"validates address"| node_address_service
node_address_service -->|"validates and saves"| node_account_forms
node_address_service -->|"stores address"| node_account_data
node_checkout_service -->|"creates order"| node_orders
node_checkout_service -->|"creates payment intent"| node_stripe
node_customer -->|"pays through"| node_stripe
node_orders -->|"builds from basket"| node_basket_data
node_orders -->|"belongs to user"| node_account_data
node_account_views -->|"requests subscription"| node_membership_service
node_membership_service -->|"provisions tier"| node_account_data
node_membership_service -->|"creates billing intents"| node_stripe
node_account_views -->|"filters orders"| node_account_filters
node_account_views -->|"requests inventory PDF"| node_reports
node_catalogue_views -->|"checks stock"| node_stock_service
node_stock_service -->|"reserves stock"| node_stock_data
node_stock_service -->|"fulfils order items"| node_orders
node_warehouse_views -.->|"manages stock"| node_stock_service
node_admin_invoice -->|"renders invoice for"| node_orders
node_admin_invoice -->|"uses PDF utility"| node_pdf_admin
node_pdf_admin -->|"uses base renderer"| node_pdf_base

click node_catalogue_views "https://github.com/yenmangu/ms4-prop-house/blob/main/catalogue/views.py"
click node_catalogue_filters "https://github.com/yenmangu/ms4-prop-house/blob/main/catalogue/filters.py"
click node_products "https://github.com/yenmangu/ms4-prop-house/blob/main/catalogue/models.py"
click node_basket_views "https://github.com/yenmangu/ms4-prop-house/blob/main/basket/views.py"
click node_basket_service "https://github.com/yenmangu/ms4-prop-house/blob/main/basket/services.py"
click node_basket_data "https://github.com/yenmangu/ms4-prop-house/blob/main/basket/models.py"
click node_checkout_service "https://github.com/yenmangu/ms4-prop-house/blob/main/commerce/services.py"
click node_commerce_views "https://github.com/yenmangu/ms4-prop-house/blob/main/commerce/views.py"
click node_orders "https://github.com/yenmangu/ms4-prop-house/blob/main/commerce/models.py"
click node_account_views "https://github.com/yenmangu/ms4-prop-house/blob/main/accounts/views.py"
click node_account_filters "https://github.com/yenmangu/ms4-prop-house/blob/main/accounts/filters.py"
click node_account_forms "https://github.com/yenmangu/ms4-prop-house/blob/main/accounts/forms.py"
click node_address_service "https://github.com/yenmangu/ms4-prop-house/blob/main/accounts/services/address_service.py"
click node_membership_service "https://github.com/yenmangu/ms4-prop-house/blob/main/accounts/services/membership_service.py"
click node_account_data "https://github.com/yenmangu/ms4-prop-house/blob/main/accounts/models.py"
click node_reports "https://github.com/yenmangu/ms4-prop-house/blob/main/accounts/reports.py"
click node_stock_data "https://github.com/yenmangu/ms4-prop-house/blob/main/warehouse/models.py"
click node_stock_service "https://github.com/yenmangu/ms4-prop-house/blob/main/warehouse/services.py"
click node_warehouse_views "https://github.com/yenmangu/ms4-prop-house/blob/main/warehouse/views.py"
click node_pdf_admin "https://github.com/yenmangu/ms4-prop-house/blob/main/core/utils/admin_pdf.py"
click node_pdf_base "https://github.com/yenmangu/ms4-prop-house/blob/main/core/utils/base_pdf.py"
click node_admin_invoice "https://github.com/yenmangu/ms4-prop-house/blob/main/commerce/utils/admin_invoice_pdf_response.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_catalogue_views,node_catalogue_filters,node_products toneBlue
class node_basket_views,node_basket_service,node_basket_data,node_checkout_service,node_commerce_views,node_orders toneAmber
class node_account_views,node_account_filters,node_account_forms,node_address_service,node_membership_service,node_account_data,node_reports toneMint
class node_stock_data,node_stock_service,node_warehouse_views toneRose
class node_pdf_admin,node_pdf_base,node_admin_invoice,node_customer,node_stripe toneIndigo
```

## Components

### Product discovery

- [Catalogue browsing](https://github.com/yenmangu/ms4-prop-house/blob/main/catalogue/views.py): `catalogue/views.py`
- [Catalogue filters](https://github.com/yenmangu/ms4-prop-house/blob/main/catalogue/filters.py): `catalogue/filters.py`
- [Products and categories](https://github.com/yenmangu/ms4-prop-house/blob/main/catalogue/models.py): `catalogue/models.py`

### Basket and checkout

- [Basket interactions](https://github.com/yenmangu/ms4-prop-house/blob/main/basket/views.py): `basket/views.py`
- [Basket resolution](https://github.com/yenmangu/ms4-prop-house/blob/main/basket/services.py): `basket/services.py`
- [Basket and lines](https://github.com/yenmangu/ms4-prop-house/blob/main/basket/models.py): `basket/models.py`
- [Checkout orchestration](https://github.com/yenmangu/ms4-prop-house/blob/main/commerce/services.py): `commerce/services.py`
- [Order and payment views](https://github.com/yenmangu/ms4-prop-house/blob/main/commerce/views.py): `commerce/views.py`
- [Orders and order items](https://github.com/yenmangu/ms4-prop-house/blob/main/commerce/models.py): `commerce/models.py`

### Customer accounts

- [Account dashboard](https://github.com/yenmangu/ms4-prop-house/blob/main/accounts/views.py): `accounts/views.py`
- [Order filters](https://github.com/yenmangu/ms4-prop-house/blob/main/accounts/filters.py): `accounts/filters.py`
- [Address forms](https://github.com/yenmangu/ms4-prop-house/blob/main/accounts/forms.py): `accounts/forms.py`
- [Address management](https://github.com/yenmangu/ms4-prop-house/blob/main/accounts/services/address_service.py): `accounts/services/address_service.py`
- [Membership billing](https://github.com/yenmangu/ms4-prop-house/blob/main/accounts/services/membership_service.py): `accounts/services/membership_service.py`
- [Users and memberships](https://github.com/yenmangu/ms4-prop-house/blob/main/accounts/models.py): `accounts/models.py`
- [Account reports](https://github.com/yenmangu/ms4-prop-house/blob/main/accounts/reports.py): `accounts/reports.py`

### Hire fulfilment

- [Stock and hire records](https://github.com/yenmangu/ms4-prop-house/blob/main/warehouse/models.py): `warehouse/models.py`
- [Stock fulfilment](https://github.com/yenmangu/ms4-prop-house/blob/main/warehouse/services.py): `warehouse/services.py`
- [Warehouse operations](https://github.com/yenmangu/ms4-prop-house/blob/main/warehouse/views.py): `warehouse/views.py`

### Shared services

- [Admin PDF output](https://github.com/yenmangu/ms4-prop-house/blob/main/core/utils/admin_pdf.py): `core/utils/admin_pdf.py`
- [PDF rendering](https://github.com/yenmangu/ms4-prop-house/blob/main/core/utils/base_pdf.py): `core/utils/base_pdf.py`
- [Invoice response](https://github.com/yenmangu/ms4-prop-house/blob/main/commerce/utils/admin_invoice_pdf_response.py): `commerce/utils/admin_invoice_pdf_response.py`

### Other components

- **Customer**
- **Stripe payments**

## Connections

- Customer → Catalogue browsing: browses
- Catalogue browsing → Catalogue filters: uses filters (evidence: `catalogue/views.py`)
- Catalogue browsing → Products and categories: queries products (evidence: `catalogue/views.py`)
- Catalogue browsing → Basket interactions: adds to basket
- Customer → Basket interactions: selects items
- Basket interactions → Basket resolution: resolves basket
- Basket resolution → Basket and lines: loads or creates (evidence: `basket/services.py`)
- Basket and lines → Products and categories: references products (evidence: `basket/models.py`)
- Basket and lines → Stock fulfilment: checks availability (evidence: `basket/models.py`)
- Customer → Checkout orchestration: checks out
- Checkout orchestration → Address management: validates address (evidence: `commerce/services.py`)
- Address management → Address forms: validates and saves (evidence: `accounts/services/address_service.py`)
- Address management → Users and memberships: stores address (evidence: `accounts/services/address_service.py`)
- Checkout orchestration → Orders and order items: creates order (evidence: `commerce/services.py`)
- Checkout orchestration → Stripe payments: creates payment intent (evidence: `commerce/services.py`)
- Customer → Stripe payments: pays through
- Orders and order items → Basket and lines: builds from basket (evidence: `commerce/models.py`)
- Orders and order items → Users and memberships: belongs to user (evidence: `commerce/models.py`)
- Account dashboard → Membership billing: requests subscription (evidence: `accounts/views.py`)
- Membership billing → Users and memberships: provisions tier (evidence: `accounts/services/membership_service.py`)
- Membership billing → Stripe payments: creates billing intents (evidence: `accounts/services/membership_service.py`)
- Account dashboard → Order filters: filters orders (evidence: `accounts/views.py`)
- Account dashboard → Account reports: requests inventory PDF (evidence: `accounts/views.py`)
- Catalogue browsing → Stock fulfilment: checks stock (evidence: `catalogue/views.py`)
- Stock fulfilment → Stock and hire records: reserves stock (evidence: `warehouse/services.py`)
- Stock fulfilment → Orders and order items: fulfils order items (evidence: `warehouse/services.py`)
- Warehouse operations → Stock fulfilment: manages stock
- Invoice response → Orders and order items: renders invoice for (evidence: `commerce/utils/admin_invoice_pdf_response.py`)
- Invoice response → Admin PDF output: uses PDF utility (evidence: `commerce/utils/admin_invoice_pdf_response.py`)
- Admin PDF output → PDF rendering: uses base renderer (evidence: `core/utils/admin_pdf.py`)
