# temples-dev/depotledger architecture

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

- Interactive diagram: https://gitdiagram.com/temples-dev/depotledger
- Repository: https://github.com/temples-dev/depotledger

## Overview

depotledger is an early-stage, multi-warehouse inventory and fulfilment platform. The implemented user-to-result path is a dashboard loading API health and database status: the React app calls its typed API client, which requests the backend health endpoint, which checks database connectivity. Catalogue endpoints and models are implemented; inventory, procurement, sales, fulfilment, and transfers are documented product capabilities, not sampled implementations. Those roadmap branches are shown as documented scope, not as verified runtime flows. The source excerpts do not establish routing from the root API URLs to catalogue endpoints.

Main entry points: [`backend/apps`](https://github.com/temples-dev/depotledger/tree/main/backend/apps) (Inventory ledger), [`backend/apps/catalogue/views.py`](https://github.com/temples-dev/depotledger/blob/main/backend/apps/catalogue/views.py) (Catalogue endpoints), [`frontend/src/App.tsx`](https://github.com/temples-dev/depotledger/blob/main/frontend/src/App.tsx) (Dashboard app), [`frontend/src/lib/api.ts`](https://github.com/temples-dev/depotledger/blob/main/frontend/src/lib/api.ts) (Health API client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui_api["User interface and API"]
  node_app["Dashboard app<br/>[App.tsx]"]
  node_api_client["Health API client<br/>[api.ts]"]
end

subgraph group_backend["Backend foundation"]
  node_health["Health endpoint<br/>[views.py]"]
  node_settings["Django settings<br/>[base.py]"]
  node_permissions["Active-user permission<br/>[permissions.py]"]
  node_celery["Celery application<br/>[celery.py]"]
end

subgraph group_catalogue["Catalogue master data"]
  node_catalogue_views["Catalogue endpoints<br/>[views.py]"]
  node_catalogue_serializers["Catalogue serializers<br/>[serializers.py]"]
  node_catalogue_models[("Catalogue records<br/>[models.py]")]
end

subgraph group_operations["Operations domain"]
  node_inventory["Inventory ledger"]
  node_procurement["Procurement and receiving"]
  node_sales["Sales and backorders"]
  node_fulfilment["Fulfilment and dispatch"]
  node_transfers["Warehouse transfers"]
  node_platform["Platform capabilities"]
end

node_operator(("Operator"))
node_postgres[("PostgreSQL")]
node_redis["Redis broker"]

node_operator -->|"uses"| node_app
node_app -->|"calls"| node_api_client
node_api_client -->|"requests health"| node_health
node_health -->|"checks connection"| node_postgres
node_settings -->|"configures"| node_postgres
node_catalogue_views -->|"requires access"| node_permissions
node_catalogue_views -->|"uses"| node_catalogue_serializers
node_catalogue_views -->|"queries"| node_catalogue_models
node_catalogue_serializers -->|"serializes"| node_catalogue_models
node_celery -->|"uses broker"| node_redis
node_procurement -->|"receipts affect stock"| node_inventory
node_sales -->|"allocates reservations"| node_inventory
node_fulfilment -->|"dispatch deducts stock"| node_inventory
node_transfers -->|"records movements"| node_inventory
node_platform -->|"supports transactions"| node_inventory

click node_app "https://github.com/temples-dev/depotledger/blob/main/frontend/src/App.tsx"
click node_api_client "https://github.com/temples-dev/depotledger/blob/main/frontend/src/lib/api.ts"
click node_health "https://github.com/temples-dev/depotledger/blob/main/backend/config/views.py"
click node_settings "https://github.com/temples-dev/depotledger/blob/main/backend/config/settings/base.py"
click node_permissions "https://github.com/temples-dev/depotledger/blob/main/backend/common/permissions.py"
click node_celery "https://github.com/temples-dev/depotledger/blob/main/backend/config/celery.py"
click node_catalogue_views "https://github.com/temples-dev/depotledger/blob/main/backend/apps/catalogue/views.py"
click node_catalogue_serializers "https://github.com/temples-dev/depotledger/blob/main/backend/apps/catalogue/serializers.py"
click node_catalogue_models "https://github.com/temples-dev/depotledger/blob/main/backend/apps/catalogue/models.py"
click node_inventory "https://github.com/temples-dev/depotledger/tree/main/backend/apps"
click node_procurement "https://github.com/temples-dev/depotledger/tree/main/backend/apps"
click node_sales "https://github.com/temples-dev/depotledger/tree/main/backend/apps"
click node_fulfilment "https://github.com/temples-dev/depotledger/tree/main/backend/apps"
click node_transfers "https://github.com/temples-dev/depotledger/tree/main/backend/apps"
click node_platform "https://github.com/temples-dev/depotledger/tree/main/backend"

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_app,node_api_client toneBlue
class node_health,node_settings,node_permissions,node_celery,node_postgres,node_redis toneAmber
class node_catalogue_views,node_catalogue_serializers,node_catalogue_models toneMint
class node_inventory,node_procurement,node_sales,node_fulfilment,node_transfers,node_platform toneRose
class node_operator toneIndigo
```

## Components

### User interface and API

- [Dashboard app](https://github.com/temples-dev/depotledger/blob/main/frontend/src/App.tsx): `frontend/src/App.tsx`
- [Health API client](https://github.com/temples-dev/depotledger/blob/main/frontend/src/lib/api.ts): `frontend/src/lib/api.ts`

### Backend foundation

- [Health endpoint](https://github.com/temples-dev/depotledger/blob/main/backend/config/views.py): `backend/config/views.py`
- [Django settings](https://github.com/temples-dev/depotledger/blob/main/backend/config/settings/base.py): `backend/config/settings/base.py`
- [Active-user permission](https://github.com/temples-dev/depotledger/blob/main/backend/common/permissions.py): `backend/common/permissions.py`
- [Celery application](https://github.com/temples-dev/depotledger/blob/main/backend/config/celery.py): `backend/config/celery.py`

### Catalogue master data

- [Catalogue endpoints](https://github.com/temples-dev/depotledger/blob/main/backend/apps/catalogue/views.py): `backend/apps/catalogue/views.py`
- [Catalogue serializers](https://github.com/temples-dev/depotledger/blob/main/backend/apps/catalogue/serializers.py): `backend/apps/catalogue/serializers.py`
- [Catalogue records](https://github.com/temples-dev/depotledger/blob/main/backend/apps/catalogue/models.py): `backend/apps/catalogue/models.py`

### Operations domain

- [Inventory ledger](https://github.com/temples-dev/depotledger/tree/main/backend/apps): `backend/apps`
- [Procurement and receiving](https://github.com/temples-dev/depotledger/tree/main/backend/apps): `backend/apps`
- [Sales and backorders](https://github.com/temples-dev/depotledger/tree/main/backend/apps): `backend/apps`
- [Fulfilment and dispatch](https://github.com/temples-dev/depotledger/tree/main/backend/apps): `backend/apps`
- [Warehouse transfers](https://github.com/temples-dev/depotledger/tree/main/backend/apps): `backend/apps`
- [Platform capabilities](https://github.com/temples-dev/depotledger/tree/main/backend): `backend`

### Other components

- **Operator**
- **PostgreSQL**
- **Redis broker**

## Connections

- Operator → Dashboard app: uses (evidence: `frontend/src/App.tsx`)
- Dashboard app → Health API client: calls (evidence: `frontend/src/App.tsx`)
- Health API client → Health endpoint: requests health (evidence: `frontend/src/lib/api.ts`)
- Health endpoint → PostgreSQL: checks connection (evidence: `backend/config/views.py`)
- Django settings → PostgreSQL: configures (evidence: `backend/config/settings/base.py`)
- Catalogue endpoints → Active-user permission: requires access (evidence: `backend/apps/catalogue/views.py`)
- Catalogue endpoints → Catalogue serializers: uses (evidence: `backend/apps/catalogue/views.py`)
- Catalogue endpoints → Catalogue records: queries (evidence: `backend/apps/catalogue/views.py`)
- Catalogue serializers → Catalogue records: serializes (evidence: `backend/apps/catalogue/serializers.py`)
- Celery application → Redis broker: uses broker
- Procurement and receiving → Inventory ledger: receipts affect stock (evidence: `README.md`)
- Sales and backorders → Inventory ledger: allocates reservations (evidence: `README.md`)
- Fulfilment and dispatch → Inventory ledger: dispatch deducts stock (evidence: `README.md`)
- Warehouse transfers → Inventory ledger: records movements (evidence: `README.md`)
- Platform capabilities → Inventory ledger: supports transactions (evidence: `README.md`)
