# stanfte/tp_m2_coo architecture

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

- Interactive diagram: https://gitdiagram.com/stanfte/tp_m2_coo
- Repository: https://github.com/stanfte/tp_m2_coo

## Overview

Velo is a Django application whose visible product is a domain model for a location-based production and retail operation, exposed through Django’s admin. An administrator reaches the admin route, where registered records can be maintained and persisted in SQLite. The model spans geography, facilities and production, supply and inventory, and retail and sales. The README is empty and the app views are unimplemented; the graph therefore reflects the documented route, admin registrations, model relationships, and configured database, not an application-specific workflow beyond admin CRUD.

Main entry points: [`velo/high_level/admin.py`](https://github.com/stanfte/tp_m2_coo/blob/main/velo/high_level/admin.py) (Django admin), [`velo/high_level/models.py`](https://github.com/stanfte/tp_m2_coo/blob/main/velo/high_level/models.py) (Operations), [`velo/velo/urls.py`](https://github.com/stanfte/tp_m2_coo/blob/main/velo/velo/urls.py) (URL routing), [`velo/db.sqlite3`](https://github.com/stanfte/tp_m2_coo/blob/main/velo/db.sqlite3) (SQLite database)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_geo["Geography"]
  node_country_city["Countries and cities<br/>[models.py]"]
end

subgraph group_production["Facilities and production"]
  node_machine["Machines<br/>[models.py]"]
  node_machine_qty["Machine quantities<br/>[models.py]"]
  node_site["Sites<br/>[models.py]"]
  node_transport["Transport<br/>[models.py]"]
  node_operation["Operations<br/>[models.py]"]
end

subgraph group_supply["Supply and inventory"]
  node_product["Products<br/>[models.py]"]
  node_product_qty["Product quantities<br/>[models.py]"]
  node_supplier_price["Supplier pricing<br/>[models.py]"]
  node_supplier["Suppliers<br/>[models.py]"]
  node_stock["Stock<br/>[models.py]"]
end

subgraph group_retail["Retail and sales"]
  node_store["Points of sale<br/>[models.py]"]
  node_invoice["Invoices<br/>[models.py]"]
end

subgraph group_runtime["Django runtime"]
  node_routes["URL routing<br/>[urls.py]"]
  node_admin_site["Django admin<br/>[admin.py]"]
  node_orm["Django ORM<br/>[models.py]"]
  node_sqlite[("SQLite database<br/>[db.sqlite3]")]
end

node_admin_user(("Administrator"))

node_admin_user -->|"requests admin"| node_routes
node_routes -->|"routes admin"| node_admin_site
node_admin_site -->|"registers"| node_country_city
node_admin_site -->|"registers"| node_machine
node_admin_site -->|"registers"| node_machine_qty
node_admin_site -->|"registers"| node_site
node_admin_site -->|"registers"| node_transport
node_admin_site -->|"registers"| node_operation
node_admin_site -->|"registers"| node_product
node_admin_site -->|"registers"| node_product_qty
node_admin_site -->|"registers"| node_supplier_price
node_admin_site -->|"registers"| node_supplier
node_admin_site -->|"registers"| node_stock
node_admin_site -->|"registers"| node_store
node_admin_site -->|"registers"| node_invoice
node_country_city -->|"city reference"| node_site
node_machine_qty -->|"machine reference"| node_machine
node_site -->|"tracks quantities"| node_machine_qty
node_transport -->|"origin and destination"| node_site
node_operation -->|"uses machine"| node_machine
node_operation -->|"next operation"| node_operation
node_operation -->|"tracks quantities"| node_product_qty
node_product -->|"has operations"| node_operation
node_product_qty -->|"product reference"| node_product
node_supplier_price -->|"product reference"| node_product
node_supplier -->|"offers prices"| node_supplier_price
node_stock -->|"tracks quantities"| node_product_qty
node_store -->|"located at"| node_site
node_store -->|"uses stock"| node_stock
node_invoice -->|"point of sale"| node_store
node_invoice -->|"records quantities"| node_product_qty
node_admin_site -->|"maintains records"| node_orm
node_orm -->|"reads and writes"| node_sqlite

click node_routes "https://github.com/stanfte/tp_m2_coo/blob/main/velo/velo/urls.py"
click node_admin_site "https://github.com/stanfte/tp_m2_coo/blob/main/velo/high_level/admin.py"
click node_orm "https://github.com/stanfte/tp_m2_coo/blob/main/velo/high_level/models.py"
click node_sqlite "https://github.com/stanfte/tp_m2_coo/blob/main/velo/db.sqlite3"
click node_country_city "https://github.com/stanfte/tp_m2_coo/blob/main/velo/high_level/models.py"
click node_machine "https://github.com/stanfte/tp_m2_coo/blob/main/velo/high_level/models.py"
click node_machine_qty "https://github.com/stanfte/tp_m2_coo/blob/main/velo/high_level/models.py"
click node_site "https://github.com/stanfte/tp_m2_coo/blob/main/velo/high_level/models.py"
click node_transport "https://github.com/stanfte/tp_m2_coo/blob/main/velo/high_level/models.py"
click node_operation "https://github.com/stanfte/tp_m2_coo/blob/main/velo/high_level/models.py"
click node_product "https://github.com/stanfte/tp_m2_coo/blob/main/velo/high_level/models.py"
click node_product_qty "https://github.com/stanfte/tp_m2_coo/blob/main/velo/high_level/models.py"
click node_supplier_price "https://github.com/stanfte/tp_m2_coo/blob/main/velo/high_level/models.py"
click node_supplier "https://github.com/stanfte/tp_m2_coo/blob/main/velo/high_level/models.py"
click node_stock "https://github.com/stanfte/tp_m2_coo/blob/main/velo/high_level/models.py"
click node_store "https://github.com/stanfte/tp_m2_coo/blob/main/velo/high_level/models.py"
click node_invoice "https://github.com/stanfte/tp_m2_coo/blob/main/velo/high_level/models.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_country_city toneBlue
class node_machine,node_machine_qty,node_site,node_transport,node_operation toneAmber
class node_product,node_product_qty,node_supplier_price,node_supplier,node_stock toneMint
class node_store,node_invoice toneRose
class node_routes,node_admin_site,node_orm,node_sqlite,node_admin_user toneIndigo
```

## Components

### Geography

- [Countries and cities](https://github.com/stanfte/tp_m2_coo/blob/main/velo/high_level/models.py): `velo/high_level/models.py`

### Facilities and production

- [Machines](https://github.com/stanfte/tp_m2_coo/blob/main/velo/high_level/models.py): `velo/high_level/models.py`
- [Machine quantities](https://github.com/stanfte/tp_m2_coo/blob/main/velo/high_level/models.py): `velo/high_level/models.py`
- [Sites](https://github.com/stanfte/tp_m2_coo/blob/main/velo/high_level/models.py): `velo/high_level/models.py`
- [Transport](https://github.com/stanfte/tp_m2_coo/blob/main/velo/high_level/models.py): `velo/high_level/models.py`
- [Operations](https://github.com/stanfte/tp_m2_coo/blob/main/velo/high_level/models.py): `velo/high_level/models.py`

### Supply and inventory

- [Products](https://github.com/stanfte/tp_m2_coo/blob/main/velo/high_level/models.py): `velo/high_level/models.py`
- [Product quantities](https://github.com/stanfte/tp_m2_coo/blob/main/velo/high_level/models.py): `velo/high_level/models.py`
- [Supplier pricing](https://github.com/stanfte/tp_m2_coo/blob/main/velo/high_level/models.py): `velo/high_level/models.py`
- [Suppliers](https://github.com/stanfte/tp_m2_coo/blob/main/velo/high_level/models.py): `velo/high_level/models.py`
- [Stock](https://github.com/stanfte/tp_m2_coo/blob/main/velo/high_level/models.py): `velo/high_level/models.py`

### Retail and sales

- [Points of sale](https://github.com/stanfte/tp_m2_coo/blob/main/velo/high_level/models.py): `velo/high_level/models.py`
- [Invoices](https://github.com/stanfte/tp_m2_coo/blob/main/velo/high_level/models.py): `velo/high_level/models.py`

### Django runtime

- [URL routing](https://github.com/stanfte/tp_m2_coo/blob/main/velo/velo/urls.py): `velo/velo/urls.py`
- [Django admin](https://github.com/stanfte/tp_m2_coo/blob/main/velo/high_level/admin.py): `velo/high_level/admin.py`
- [Django ORM](https://github.com/stanfte/tp_m2_coo/blob/main/velo/high_level/models.py): `velo/high_level/models.py`
- [SQLite database](https://github.com/stanfte/tp_m2_coo/blob/main/velo/db.sqlite3): `velo/db.sqlite3`

### Other components

- **Administrator**

## Connections

- Administrator → URL routing: requests admin
- URL routing → Django admin: routes admin
- Django admin → Countries and cities: registers
- Django admin → Machines: registers
- Django admin → Machine quantities: registers
- Django admin → Sites: registers
- Django admin → Transport: registers
- Django admin → Operations: registers
- Django admin → Products: registers
- Django admin → Product quantities: registers
- Django admin → Supplier pricing: registers
- Django admin → Suppliers: registers
- Django admin → Stock: registers
- Django admin → Points of sale: registers
- Django admin → Invoices: registers
- Countries and cities → Sites: city reference
- Machine quantities → Machines: machine reference
- Sites → Machine quantities: tracks quantities
- Transport → Sites: origin and destination
- Operations → Machines: uses machine
- Operations → Operations: next operation
- Operations → Product quantities: tracks quantities
- Products → Operations: has operations
- Product quantities → Products: product reference
- Supplier pricing → Products: product reference
- Suppliers → Supplier pricing: offers prices
- Stock → Product quantities: tracks quantities
- Points of sale → Sites: located at
- Points of sale → Stock: uses stock
- Invoices → Points of sale: point of sale
- Invoices → Product quantities: records quantities
- Django admin → Django ORM: maintains records
- Django ORM → SQLite database: reads and writes
