# hamzakaddi/tp-coo architecture

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

- Interactive diagram: https://gitdiagram.com/hamzakaddi/tp-coo
- Repository: https://github.com/hamzakaddi/tp-coo

## Overview

Boissons is a Django application for modeling production and sales costs. Its principal workflow is an HTTP request to a resource detail URL, a JSON detail view, and serialization of the selected domain record; model methods also calculate costs across facilities, machines, products, and points of sale. The project additionally exposes Django admin. Domain nodes share the sampled models file, which defines their relationships and calculations; database access is configured in settings. The README is empty, so capabilities are inferred from sampled routes and models.

Main entry points: [`boissons/high_level/models.py`](https://github.com/hamzakaddi/tp-coo/blob/main/boissons/high_level/models.py) (Model JSON), [`boissons/boissons/urls.py`](https://github.com/hamzakaddi/tp-coo/blob/main/boissons/boissons/urls.py) (Resource routing), [`boissons/high_level/views.py`](https://github.com/hamzakaddi/tp-coo/blob/main/boissons/high_level/views.py) (JSON detail views), [`boissons/high_level/admin.py`](https://github.com/hamzakaddi/tp-coo/blob/main/boissons/high_level/admin.py) (Admin registration)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web application"]
  node_routing["Resource routing<br/>[urls.py]"]
  node_detail["JSON detail views<br/>[views.py]"]
  node_admin["Admin registration<br/>[admin.py]"]
  node_serialization["Model JSON<br/>[models.py]"]
  node_configuration["Django configuration<br/>[settings.py]"]
end

subgraph group_domain["Cost domain"]
  node_geography["Countries and cities<br/>[models.py]"]
  node_facilities["Sites and machines<br/>[models.py]"]
  node_products["Products and suppliers<br/>[models.py]"]
  node_costs["Cost calculations<br/>[models.py]"]
end

subgraph group_operations["Operations and sales"]
  node_inventory["Stock quantities<br/>[models.py]"]
  node_operations["Production operations<br/>[models.py]"]
  node_transport["Site transport<br/>[models.py]"]
  node_sales["Sales points<br/>[models.py]"]
  node_invoices["Customer invoices<br/>[models.py]"]
end

subgraph group_persistence["Persistence"]
  node_database[("SQLite database<br/>[db.sqlite3]")]
end

node_user(("API client"))
node_adminui["Django admin"]

node_user -->|"requests resource"| node_routing
node_routing -->|"routes requests"| node_detail
node_detail -->|"serializes object"| node_serialization
node_serialization -->|"serializes model"| node_geography
node_serialization -->|"serializes model"| node_facilities
node_serialization -->|"serializes model"| node_products
node_serialization -->|"serializes model"| node_inventory
node_serialization -->|"serializes model"| node_operations
node_serialization -->|"serializes model"| node_transport
node_serialization -->|"serializes model"| node_sales
node_serialization -->|"serializes model"| node_invoices
node_admin -->|"registers models"| node_adminui
node_routing -->|"routes admin"| node_adminui
node_geography -->|"provides site context"| node_facilities
node_facilities -->|"holds quantities"| node_inventory
node_products -->|"supplies stock"| node_inventory
node_products -->|"provides purchase prices"| node_costs
node_facilities -->|"calculates site costs"| node_costs
node_inventory -->|"calculates stock costs"| node_costs
node_sales -->|"calculates sales costs"| node_costs
node_configuration -->|"configures SQLite"| node_database

click node_routing "https://github.com/hamzakaddi/tp-coo/blob/main/boissons/boissons/urls.py"
click node_detail "https://github.com/hamzakaddi/tp-coo/blob/main/boissons/high_level/views.py"
click node_admin "https://github.com/hamzakaddi/tp-coo/blob/main/boissons/high_level/admin.py"
click node_geography "https://github.com/hamzakaddi/tp-coo/blob/main/boissons/high_level/models.py"
click node_facilities "https://github.com/hamzakaddi/tp-coo/blob/main/boissons/high_level/models.py"
click node_products "https://github.com/hamzakaddi/tp-coo/blob/main/boissons/high_level/models.py"
click node_inventory "https://github.com/hamzakaddi/tp-coo/blob/main/boissons/high_level/models.py"
click node_operations "https://github.com/hamzakaddi/tp-coo/blob/main/boissons/high_level/models.py"
click node_transport "https://github.com/hamzakaddi/tp-coo/blob/main/boissons/high_level/models.py"
click node_sales "https://github.com/hamzakaddi/tp-coo/blob/main/boissons/high_level/models.py"
click node_invoices "https://github.com/hamzakaddi/tp-coo/blob/main/boissons/high_level/models.py"
click node_costs "https://github.com/hamzakaddi/tp-coo/blob/main/boissons/high_level/models.py"
click node_serialization "https://github.com/hamzakaddi/tp-coo/blob/main/boissons/high_level/models.py"
click node_database "https://github.com/hamzakaddi/tp-coo/blob/main/boissons/db.sqlite3"
click node_configuration "https://github.com/hamzakaddi/tp-coo/blob/main/boissons/boissons/settings.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_routing,node_detail,node_admin,node_serialization,node_configuration,node_user toneBlue
class node_geography,node_facilities,node_products,node_costs toneAmber
class node_inventory,node_operations,node_transport,node_sales,node_invoices toneMint
class node_database toneRose
class node_adminui toneIndigo
```

## Components

### Web application

- [Resource routing](https://github.com/hamzakaddi/tp-coo/blob/main/boissons/boissons/urls.py): `boissons/boissons/urls.py`
- [JSON detail views](https://github.com/hamzakaddi/tp-coo/blob/main/boissons/high_level/views.py): `boissons/high_level/views.py`
- [Admin registration](https://github.com/hamzakaddi/tp-coo/blob/main/boissons/high_level/admin.py): `boissons/high_level/admin.py`
- [Model JSON](https://github.com/hamzakaddi/tp-coo/blob/main/boissons/high_level/models.py): `boissons/high_level/models.py`
- [Django configuration](https://github.com/hamzakaddi/tp-coo/blob/main/boissons/boissons/settings.py): `boissons/boissons/settings.py`

### Cost domain

- [Countries and cities](https://github.com/hamzakaddi/tp-coo/blob/main/boissons/high_level/models.py): `boissons/high_level/models.py`
- [Sites and machines](https://github.com/hamzakaddi/tp-coo/blob/main/boissons/high_level/models.py): `boissons/high_level/models.py`
- [Products and suppliers](https://github.com/hamzakaddi/tp-coo/blob/main/boissons/high_level/models.py): `boissons/high_level/models.py`
- [Cost calculations](https://github.com/hamzakaddi/tp-coo/blob/main/boissons/high_level/models.py): `boissons/high_level/models.py`

### Operations and sales

- [Stock quantities](https://github.com/hamzakaddi/tp-coo/blob/main/boissons/high_level/models.py): `boissons/high_level/models.py`
- [Production operations](https://github.com/hamzakaddi/tp-coo/blob/main/boissons/high_level/models.py): `boissons/high_level/models.py`
- [Site transport](https://github.com/hamzakaddi/tp-coo/blob/main/boissons/high_level/models.py): `boissons/high_level/models.py`
- [Sales points](https://github.com/hamzakaddi/tp-coo/blob/main/boissons/high_level/models.py): `boissons/high_level/models.py`
- [Customer invoices](https://github.com/hamzakaddi/tp-coo/blob/main/boissons/high_level/models.py): `boissons/high_level/models.py`

### Persistence

- [SQLite database](https://github.com/hamzakaddi/tp-coo/blob/main/boissons/db.sqlite3): `boissons/db.sqlite3`

### Other components

- **API client**
- **Django admin**

## Connections

- API client → Resource routing: requests resource (evidence: `boissons/boissons/urls.py`)
- Resource routing → JSON detail views: routes requests (evidence: `boissons/boissons/urls.py`)
- JSON detail views → Model JSON: serializes object (evidence: `boissons/high_level/views.py`)
- Model JSON → Countries and cities: serializes model (evidence: `boissons/high_level/models.py`)
- Model JSON → Sites and machines: serializes model (evidence: `boissons/high_level/models.py`)
- Model JSON → Products and suppliers: serializes model (evidence: `boissons/high_level/models.py`)
- Model JSON → Stock quantities: serializes model (evidence: `boissons/high_level/models.py`)
- Model JSON → Production operations: serializes model (evidence: `boissons/high_level/models.py`)
- Model JSON → Site transport: serializes model (evidence: `boissons/high_level/models.py`)
- Model JSON → Sales points: serializes model (evidence: `boissons/high_level/models.py`)
- Model JSON → Customer invoices: serializes model (evidence: `boissons/high_level/models.py`)
- Admin registration → Django admin: registers models (evidence: `boissons/high_level/admin.py`)
- Resource routing → Django admin: routes admin (evidence: `boissons/boissons/urls.py`)
- Countries and cities → Sites and machines: provides site context (evidence: `boissons/high_level/models.py`)
- Sites and machines → Stock quantities: holds quantities (evidence: `boissons/high_level/models.py`)
- Products and suppliers → Stock quantities: supplies stock (evidence: `boissons/high_level/models.py`)
- Products and suppliers → Cost calculations: provides purchase prices (evidence: `boissons/high_level/models.py`)
- Sites and machines → Cost calculations: calculates site costs (evidence: `boissons/high_level/models.py`)
- Stock quantities → Cost calculations: calculates stock costs (evidence: `boissons/high_level/models.py`)
- Sales points → Cost calculations: calculates sales costs (evidence: `boissons/high_level/models.py`)
- Django configuration → SQLite database: configures SQLite (evidence: `boissons/boissons/settings.py`)
