# dormouse-925/tp_coo architecture

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

- Interactive diagram: https://gitdiagram.com/dormouse-925/tp_coo
- Repository: https://github.com/dormouse-925/tp_coo

## Overview

Velos is a Django application for representing production, supply, and retail entities and calculating costs. Its visible user-facing workflow routes country and city detail requests to JSON views, which serialize model data; Django admin also exposes the domain models for management. The models cover locations, production operations, products, inventory, and sales records. The repository also contains a separate `tp-coo` greeting stub, but it does not appear connected to Velos. The README is empty, so capabilities and links here are limited to the supplied source excerpts.

Main entry points: [`velos/high_level/admin.py`](https://github.com/dormouse-925/tp_coo/blob/main/velos/high_level/admin.py) (Model admin), [`velos/db.sqlite3`](https://github.com/dormouse-925/tp_coo/blob/main/velos/db.sqlite3) (SQLite database), [`velos/high_level/models.py`](https://github.com/dormouse-925/tp_coo/blob/main/velos/high_level/models.py) (Production locations), [`velos/velos/settings.py`](https://github.com/dormouse-925/tp_coo/blob/main/velos/velos/settings.py) (Django settings)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web access"]
  node_routes["URL routes<br/>[urls.py]"]
  node_detail_views["Detail views<br/>[views.py]"]
  node_admin["Model admin<br/>[admin.py]"]
end

subgraph group_domain["Cost domain"]
  node_places["Country and city<br/>[models.py]"]
  node_facilities["Production locations<br/>[models.py]"]
  node_equipment["Machines and quantities<br/>[models.py]"]
  node_operations["Production operations<br/>[models.py]"]
  node_products["Products and pricing<br/>[models.py]"]
  node_supply["Suppliers and transport<br/>[models.py]"]
  node_inventory["Stock quantities<br/>[models.py]"]
  node_retail["Sales locations<br/>[models.py]"]
  node_invoices["Customer invoices<br/>[models.py]"]
end

subgraph group_runtime["Persistence and runtime"]
  node_sqlite[("SQLite database<br/>[db.sqlite3]")]
  node_settings["Django settings<br/>[settings.py]"]
  node_asgi["ASGI entrypoint<br/>[asgi.py]"]
  node_wsgi["WSGI entrypoint<br/>[wsgi.py]"]
end

node_client(("API client"))
node_admin_user(("Admin user"))

node_client -->|"requests"| node_routes
node_routes -->|"routes to"| node_detail_views
node_detail_views -->|"loads and serializes"| node_places
node_admin_user -->|"manages"| node_admin
node_admin -->|"registers models"| node_places
node_admin -->|"registers models"| node_facilities
node_admin -->|"registers models"| node_equipment
node_admin -->|"registers models"| node_operations
node_admin -->|"registers models"| node_products
node_admin -->|"registers models"| node_supply
node_admin -->|"registers models"| node_inventory
node_admin -->|"registers models"| node_retail
node_admin -->|"registers models"| node_invoices
node_facilities -->|"references city"| node_places
node_facilities -->|"costs quantities"| node_equipment
node_equipment -->|"supplies machine cost"| node_operations
node_operations -->|"costs product operations"| node_products
node_supply -->|"prices products"| node_products
node_inventory -->|"costs quantities"| node_products
node_retail -->|"references location"| node_facilities
node_retail -->|"references stock"| node_inventory
node_invoices -->|"references sales location"| node_retail
node_invoices -->|"references quantities"| node_inventory
node_settings -->|"configures database"| node_sqlite
node_asgi -->|"selects settings"| node_settings
node_wsgi -->|"selects settings"| node_settings
node_places -.->|"persists through ORM"| node_sqlite
node_facilities -.->|"persists through ORM"| node_sqlite
node_equipment -.->|"persists through ORM"| node_sqlite
node_operations -.->|"persists through ORM"| node_sqlite
node_products -.->|"persists through ORM"| node_sqlite
node_supply -.->|"persists through ORM"| node_sqlite
node_inventory -.->|"persists through ORM"| node_sqlite
node_retail -.->|"persists through ORM"| node_sqlite
node_invoices -.->|"persists through ORM"| node_sqlite

click node_routes "https://github.com/dormouse-925/tp_coo/blob/main/velos/velos/urls.py"
click node_detail_views "https://github.com/dormouse-925/tp_coo/blob/main/velos/high_level/views.py"
click node_admin "https://github.com/dormouse-925/tp_coo/blob/main/velos/high_level/admin.py"
click node_places "https://github.com/dormouse-925/tp_coo/blob/main/velos/high_level/models.py"
click node_facilities "https://github.com/dormouse-925/tp_coo/blob/main/velos/high_level/models.py"
click node_equipment "https://github.com/dormouse-925/tp_coo/blob/main/velos/high_level/models.py"
click node_operations "https://github.com/dormouse-925/tp_coo/blob/main/velos/high_level/models.py"
click node_products "https://github.com/dormouse-925/tp_coo/blob/main/velos/high_level/models.py"
click node_supply "https://github.com/dormouse-925/tp_coo/blob/main/velos/high_level/models.py"
click node_inventory "https://github.com/dormouse-925/tp_coo/blob/main/velos/high_level/models.py"
click node_retail "https://github.com/dormouse-925/tp_coo/blob/main/velos/high_level/models.py"
click node_invoices "https://github.com/dormouse-925/tp_coo/blob/main/velos/high_level/models.py"
click node_sqlite "https://github.com/dormouse-925/tp_coo/blob/main/velos/db.sqlite3"
click node_settings "https://github.com/dormouse-925/tp_coo/blob/main/velos/velos/settings.py"
click node_asgi "https://github.com/dormouse-925/tp_coo/blob/main/velos/velos/asgi.py"
click node_wsgi "https://github.com/dormouse-925/tp_coo/blob/main/velos/velos/wsgi.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_routes,node_detail_views,node_admin,node_client,node_admin_user toneBlue
class node_places,node_facilities,node_equipment,node_operations,node_products,node_supply,node_inventory,node_retail,node_invoices toneAmber
class node_sqlite,node_settings,node_asgi,node_wsgi toneMint
```

## Components

### Web access

- [URL routes](https://github.com/dormouse-925/tp_coo/blob/main/velos/velos/urls.py): `velos/velos/urls.py`
- [Detail views](https://github.com/dormouse-925/tp_coo/blob/main/velos/high_level/views.py): `velos/high_level/views.py`
- [Model admin](https://github.com/dormouse-925/tp_coo/blob/main/velos/high_level/admin.py): `velos/high_level/admin.py`

### Cost domain

- [Country and city](https://github.com/dormouse-925/tp_coo/blob/main/velos/high_level/models.py): `velos/high_level/models.py`
- [Production locations](https://github.com/dormouse-925/tp_coo/blob/main/velos/high_level/models.py): `velos/high_level/models.py`
- [Machines and quantities](https://github.com/dormouse-925/tp_coo/blob/main/velos/high_level/models.py): `velos/high_level/models.py`
- [Production operations](https://github.com/dormouse-925/tp_coo/blob/main/velos/high_level/models.py): `velos/high_level/models.py`
- [Products and pricing](https://github.com/dormouse-925/tp_coo/blob/main/velos/high_level/models.py): `velos/high_level/models.py`
- [Suppliers and transport](https://github.com/dormouse-925/tp_coo/blob/main/velos/high_level/models.py): `velos/high_level/models.py`
- [Stock quantities](https://github.com/dormouse-925/tp_coo/blob/main/velos/high_level/models.py): `velos/high_level/models.py`
- [Sales locations](https://github.com/dormouse-925/tp_coo/blob/main/velos/high_level/models.py): `velos/high_level/models.py`
- [Customer invoices](https://github.com/dormouse-925/tp_coo/blob/main/velos/high_level/models.py): `velos/high_level/models.py`

### Persistence and runtime

- [SQLite database](https://github.com/dormouse-925/tp_coo/blob/main/velos/db.sqlite3): `velos/db.sqlite3`
- [Django settings](https://github.com/dormouse-925/tp_coo/blob/main/velos/velos/settings.py): `velos/velos/settings.py`
- [ASGI entrypoint](https://github.com/dormouse-925/tp_coo/blob/main/velos/velos/asgi.py): `velos/velos/asgi.py`
- [WSGI entrypoint](https://github.com/dormouse-925/tp_coo/blob/main/velos/velos/wsgi.py): `velos/velos/wsgi.py`

### Other components

- **API client**
- **Admin user**

## Connections

- API client → URL routes: requests (evidence: `velos/velos/urls.py`)
- URL routes → Detail views: routes to (evidence: `velos/velos/urls.py`)
- Detail views → Country and city: loads and serializes (evidence: `velos/high_level/views.py`)
- Admin user → Model admin: manages (evidence: `velos/high_level/admin.py`)
- Model admin → Country and city: registers models (evidence: `velos/high_level/admin.py`)
- Model admin → Production locations: registers models (evidence: `velos/high_level/admin.py`)
- Model admin → Machines and quantities: registers models (evidence: `velos/high_level/admin.py`)
- Model admin → Production operations: registers models (evidence: `velos/high_level/admin.py`)
- Model admin → Products and pricing: registers models (evidence: `velos/high_level/admin.py`)
- Model admin → Suppliers and transport: registers models (evidence: `velos/high_level/admin.py`)
- Model admin → Stock quantities: registers models (evidence: `velos/high_level/admin.py`)
- Model admin → Sales locations: registers models (evidence: `velos/high_level/admin.py`)
- Model admin → Customer invoices: registers models (evidence: `velos/high_level/admin.py`)
- Production locations → Country and city: references city (evidence: `velos/high_level/models.py`)
- Production locations → Machines and quantities: costs quantities (evidence: `velos/high_level/models.py`)
- Machines and quantities → Production operations: supplies machine cost (evidence: `velos/high_level/models.py`)
- Production operations → Products and pricing: costs product operations (evidence: `velos/high_level/models.py`)
- Suppliers and transport → Products and pricing: prices products (evidence: `velos/high_level/models.py`)
- Stock quantities → Products and pricing: costs quantities (evidence: `velos/high_level/models.py`)
- Sales locations → Production locations: references location (evidence: `velos/high_level/models.py`)
- Sales locations → Stock quantities: references stock (evidence: `velos/high_level/models.py`)
- Customer invoices → Sales locations: references sales location (evidence: `velos/high_level/models.py`)
- Customer invoices → Stock quantities: references quantities (evidence: `velos/high_level/models.py`)
- Django settings → SQLite database: configures database (evidence: `velos/velos/settings.py`)
- ASGI entrypoint → Django settings: selects settings (evidence: `velos/velos/asgi.py`)
- WSGI entrypoint → Django settings: selects settings (evidence: `velos/velos/wsgi.py`)
- Country and city → SQLite database: persists through ORM
- Production locations → SQLite database: persists through ORM
- Machines and quantities → SQLite database: persists through ORM
- Production operations → SQLite database: persists through ORM
- Products and pricing → SQLite database: persists through ORM
- Suppliers and transport → SQLite database: persists through ORM
- Stock quantities → SQLite database: persists through ORM
- Sales locations → SQLite database: persists through ORM
- Customer invoices → SQLite database: persists through ORM
