# danagomz/a02_misconfiguration_bomberos architecture

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

- Interactive diagram: https://gitdiagram.com/danagomz/a02_misconfiguration_bomberos
- Repository: https://github.com/danagomz/a02_misconfiguration_bomberos

## Overview

This is a Django commercial-management system for Bomberos Voluntarios de Cali. Its documented user workflow covers maintaining customer, supplier and product records, then processing sales orders through invoicing and purchases through receipt into inventory. The README also documents CRUD, search, pagination and validation, but the sampled implementation excerpts chiefly show customer and supplier CRUD, inventory/product operations, and sales/purchase order handling. Cross-app links are included only where the excerpts or source index support them; app-level URL wiring into the project router was not verified.

Main entry points: [`apps/inventario/models.py`](https://github.com/danagomz/a02_misconfiguration_bomberos/blob/main/apps/inventario/models.py) (Products and stock data), [`apps/clientes/views.py`](https://github.com/danagomz/a02_misconfiguration_bomberos/blob/main/apps/clientes/views.py) (Customer management), [`apps/ventas/views.py`](https://github.com/danagomz/a02_misconfiguration_bomberos/blob/main/apps/ventas/views.py) (Sales order handling), [`apps/compras/views.py`](https://github.com/danagomz/a02_misconfiguration_bomberos/blob/main/apps/compras/views.py) (Purchase order handling)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_records["Business records"]
  node_customer_views["Customer management<br/>[views.py]"]
  node_customer_forms["Customer forms<br/>[forms.py]"]
  node_customer_models["Customer records<br/>[models.py]"]
  node_supplier_views["Supplier management<br/>[views.py]"]
  node_supplier_forms["Supplier forms<br/>[forms.py]"]
  node_supplier_models["Supplier records<br/>[models.py]"]
end

subgraph group_stock["Products and inventory"]
  node_inventory_views["Product and stock<br/>[views.py]"]
  node_inventory_forms["Product forms<br/>[forms.py]"]
  node_inventory_models["Products and stock data<br/>[models.py]"]
end

subgraph group_sales["Sales operations"]
  node_sales_views["Sales order handling<br/>[views.py]"]
  node_sales_forms["Sales forms<br/>[forms.py]"]
  node_sales_models["Orders and invoices<br/>[models.py]"]
end

subgraph group_purchases["Purchasing operations"]
  node_purchase_views["Purchase order handling<br/>[views.py]"]
  node_purchase_forms["Purchase forms<br/>[forms.py]"]
  node_purchase_models["Supplier orders<br/>[models.py]"]
end

subgraph group_platform["Django platform"]
  node_core_urls["Project URL routing<br/>[urls.py]"]
  node_core_views["Core views<br/>[views.py]"]
  node_settings["Runtime settings<br/>[base.py]"]
end

node_user(("Staff user"))
node_postgres[("PostgreSQL")]

node_user -->|"sends requests"| node_core_urls
node_core_urls -->|"routes to"| node_core_views
node_customer_views -->|"uses"| node_customer_forms
node_customer_views -->|"queries and saves"| node_customer_models
node_customer_views -->|"renders responses"| node_customer_views
node_supplier_views -->|"uses"| node_supplier_forms
node_supplier_views -->|"queries and saves"| node_supplier_models
node_inventory_views -->|"uses"| node_inventory_forms
node_inventory_views -->|"queries and updates"| node_inventory_models
node_sales_views -->|"uses"| node_sales_forms
node_sales_views -->|"queries and updates"| node_sales_models
node_sales_views -->|"adjusts stock"| node_inventory_models
node_purchase_views -->|"uses"| node_purchase_forms
node_purchase_views -->|"queries and updates"| node_purchase_models
node_purchase_views -->|"increases stock"| node_inventory_models
node_purchase_forms -->|"selects suppliers"| node_supplier_models
node_purchase_forms -->|"selects products"| node_inventory_models
node_sales_models -->|"references customers"| node_customer_models
node_purchase_models -->|"references suppliers"| node_supplier_models
node_purchase_models -->|"references products"| node_inventory_models
node_settings -->|"configures connection"| node_postgres

click node_customer_views "https://github.com/danagomz/a02_misconfiguration_bomberos/blob/main/apps/clientes/views.py"
click node_customer_forms "https://github.com/danagomz/a02_misconfiguration_bomberos/blob/main/apps/clientes/forms.py"
click node_customer_models "https://github.com/danagomz/a02_misconfiguration_bomberos/blob/main/apps/clientes/models.py"
click node_supplier_views "https://github.com/danagomz/a02_misconfiguration_bomberos/blob/main/apps/proveedores/views.py"
click node_supplier_forms "https://github.com/danagomz/a02_misconfiguration_bomberos/blob/main/apps/proveedores/forms.py"
click node_supplier_models "https://github.com/danagomz/a02_misconfiguration_bomberos/blob/main/apps/proveedores/models.py"
click node_inventory_views "https://github.com/danagomz/a02_misconfiguration_bomberos/blob/main/apps/inventario/views.py"
click node_inventory_forms "https://github.com/danagomz/a02_misconfiguration_bomberos/blob/main/apps/inventario/forms.py"
click node_inventory_models "https://github.com/danagomz/a02_misconfiguration_bomberos/blob/main/apps/inventario/models.py"
click node_sales_views "https://github.com/danagomz/a02_misconfiguration_bomberos/blob/main/apps/ventas/views.py"
click node_sales_forms "https://github.com/danagomz/a02_misconfiguration_bomberos/blob/main/apps/ventas/forms.py"
click node_sales_models "https://github.com/danagomz/a02_misconfiguration_bomberos/blob/main/apps/ventas/models.py"
click node_purchase_views "https://github.com/danagomz/a02_misconfiguration_bomberos/blob/main/apps/compras/views.py"
click node_purchase_forms "https://github.com/danagomz/a02_misconfiguration_bomberos/blob/main/apps/compras/forms.py"
click node_purchase_models "https://github.com/danagomz/a02_misconfiguration_bomberos/blob/main/apps/compras/models.py"
click node_core_urls "https://github.com/danagomz/a02_misconfiguration_bomberos/blob/main/core/urls.py"
click node_core_views "https://github.com/danagomz/a02_misconfiguration_bomberos/blob/main/core/views.py"
click node_settings "https://github.com/danagomz/a02_misconfiguration_bomberos/blob/main/core/settings/base.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_customer_views,node_customer_forms,node_customer_models,node_supplier_views,node_supplier_forms,node_supplier_models,node_user toneBlue
class node_inventory_views,node_inventory_forms,node_inventory_models,node_postgres toneAmber
class node_sales_views,node_sales_forms,node_sales_models toneMint
class node_purchase_views,node_purchase_forms,node_purchase_models toneRose
class node_core_urls,node_core_views,node_settings toneIndigo
```

## Components

### Business records

- [Customer management](https://github.com/danagomz/a02_misconfiguration_bomberos/blob/main/apps/clientes/views.py): `apps/clientes/views.py`
- [Customer forms](https://github.com/danagomz/a02_misconfiguration_bomberos/blob/main/apps/clientes/forms.py): `apps/clientes/forms.py`
- [Customer records](https://github.com/danagomz/a02_misconfiguration_bomberos/blob/main/apps/clientes/models.py): `apps/clientes/models.py`
- [Supplier management](https://github.com/danagomz/a02_misconfiguration_bomberos/blob/main/apps/proveedores/views.py): `apps/proveedores/views.py`
- [Supplier forms](https://github.com/danagomz/a02_misconfiguration_bomberos/blob/main/apps/proveedores/forms.py): `apps/proveedores/forms.py`
- [Supplier records](https://github.com/danagomz/a02_misconfiguration_bomberos/blob/main/apps/proveedores/models.py): `apps/proveedores/models.py`

### Products and inventory

- [Product and stock](https://github.com/danagomz/a02_misconfiguration_bomberos/blob/main/apps/inventario/views.py): `apps/inventario/views.py`
- [Product forms](https://github.com/danagomz/a02_misconfiguration_bomberos/blob/main/apps/inventario/forms.py): `apps/inventario/forms.py`
- [Products and stock data](https://github.com/danagomz/a02_misconfiguration_bomberos/blob/main/apps/inventario/models.py): `apps/inventario/models.py`

### Sales operations

- [Sales order handling](https://github.com/danagomz/a02_misconfiguration_bomberos/blob/main/apps/ventas/views.py): `apps/ventas/views.py`
- [Sales forms](https://github.com/danagomz/a02_misconfiguration_bomberos/blob/main/apps/ventas/forms.py): `apps/ventas/forms.py`
- [Orders and invoices](https://github.com/danagomz/a02_misconfiguration_bomberos/blob/main/apps/ventas/models.py): `apps/ventas/models.py`

### Purchasing operations

- [Purchase order handling](https://github.com/danagomz/a02_misconfiguration_bomberos/blob/main/apps/compras/views.py): `apps/compras/views.py`
- [Purchase forms](https://github.com/danagomz/a02_misconfiguration_bomberos/blob/main/apps/compras/forms.py): `apps/compras/forms.py`
- [Supplier orders](https://github.com/danagomz/a02_misconfiguration_bomberos/blob/main/apps/compras/models.py): `apps/compras/models.py`

### Django platform

- [Project URL routing](https://github.com/danagomz/a02_misconfiguration_bomberos/blob/main/core/urls.py): `core/urls.py`
- [Core views](https://github.com/danagomz/a02_misconfiguration_bomberos/blob/main/core/views.py): `core/views.py`
- [Runtime settings](https://github.com/danagomz/a02_misconfiguration_bomberos/blob/main/core/settings/base.py): `core/settings/base.py`

### Other components

- **Staff user**
- **PostgreSQL**

## Connections

- Staff user → Project URL routing: sends requests (evidence: `README.md`)
- Project URL routing → Core views: routes to (evidence: `core/urls.py`)
- Customer management → Customer forms: uses (evidence: `apps/clientes/views.py`)
- Customer management → Customer records: queries and saves (evidence: `apps/clientes/views.py`)
- Customer management → Customer management: renders responses (evidence: `apps/clientes/views.py`)
- Supplier management → Supplier forms: uses (evidence: `apps/proveedores/views.py`)
- Supplier management → Supplier records: queries and saves (evidence: `apps/proveedores/views.py`)
- Product and stock → Product forms: uses (evidence: `apps/inventario/views.py`)
- Product and stock → Products and stock data: queries and updates (evidence: `apps/inventario/views.py`)
- Sales order handling → Sales forms: uses (evidence: `apps/ventas/views.py`)
- Sales order handling → Orders and invoices: queries and updates (evidence: `apps/ventas/views.py`)
- Sales order handling → Products and stock data: adjusts stock (evidence: `apps/ventas/views.py`)
- Purchase order handling → Purchase forms: uses (evidence: `apps/compras/views.py`)
- Purchase order handling → Supplier orders: queries and updates (evidence: `apps/compras/views.py`)
- Purchase order handling → Products and stock data: increases stock (evidence: `apps/compras/views.py`)
- Purchase forms → Supplier records: selects suppliers (evidence: `apps/compras/forms.py`)
- Purchase forms → Products and stock data: selects products (evidence: `apps/compras/forms.py`)
- Orders and invoices → Customer records: references customers (evidence: `apps/ventas/models.py`)
- Supplier orders → Supplier records: references suppliers (evidence: `apps/compras/models.py`)
- Supplier orders → Products and stock data: references products (evidence: `apps/compras/models.py`)
- Runtime settings → PostgreSQL: configures connection (evidence: `core/settings/base.py`)
