# laurabernal18/sge-bomberos-cali-bd architecture

> Architecture diagram of the GitHub repository laurabernal18/sge-bomberos-cali-bd, 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/laurabernal18/sge-bomberos-cali-bd
- Repository: https://github.com/laurabernal18/sge-bomberos-cali-bd

## Overview

This is a Django commercial-management system for the Bomberos Voluntarios de Cali business unit. A staff user manages customer and supplier records, products and stock, then creates sales orders, adds line items and finalizes orders as invoices; purchasing supports supplier orders and receipt. The graph preserves the documented management modules and the distinct sales, invoice, and purchasing stages. The README documents PostgreSQL integration and broader payment/delivery capabilities, but those latter workflows are not evidenced in sampled runtime code; app routing details are likewise limited.

Main entry points: [`apps/ventas/views.py`](https://github.com/laurabernal18/sge-bomberos-cali-bd/blob/main/apps/ventas/views.py) (Sales Views), [`apps/inventario/models.py`](https://github.com/laurabernal18/sge-bomberos-cali-bd/blob/main/apps/inventario/models.py) (Product Catalog), [`apps/proveedores/models.py`](https://github.com/laurabernal18/sge-bomberos-cali-bd/blob/main/apps/proveedores/models.py) (Supplier Records), [`apps/inventario/views.py`](https://github.com/laurabernal18/sge-bomberos-cali-bd/blob/main/apps/inventario/views.py) (Product Views)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_customer["Customer Management"]
  node_client_views["Customer Views<br/>[views.py]"]
  node_client_forms["Customer Forms<br/>[forms.py]"]
  node_client_model[("Customer Records<br/>[models.py]")]
end

subgraph group_catalog["Catalog And Stock"]
  node_product_views["Product Views<br/>[views.py]"]
  node_product_forms["Product Forms<br/>[forms.py]"]
  node_product_model[("Product Catalog<br/>[models.py]")]
  node_stock_views["Stock Views<br/>[views.py]"]
  node_stock_model[("Stock Records<br/>[models.py]")]
end

subgraph group_sales["Sales And Billing"]
  node_sales_views["Sales Views<br/>[views.py]"]
  node_sales_forms["Sales Forms<br/>[forms.py]"]
  node_sales_model[("Orders And Lines<br/>[models.py]")]
  node_invoice[("Invoice Records<br/>[models.py]")]
end

subgraph group_purchase["Purchasing"]
  node_supplier_views["Supplier Views<br/>[views.py]"]
  node_supplier_forms["Supplier Forms<br/>[forms.py]"]
  node_supplier_model[("Supplier Records<br/>[models.py]")]
  node_purchase_views["Purchase Views<br/>[views.py]"]
  node_purchase_forms["Purchase Forms<br/>[forms.py]"]
  node_purchase_model[("Purchase Orders<br/>[models.py]")]
end

subgraph group_runtime["Web Runtime"]
  node_django["Django Runtime<br/>[settings.py]"]
  node_postgres[("PostgreSQL")]
end

node_staff(("Staff User"))

node_staff -->|"manages clients"| node_client_views
node_client_views -->|"validates input"| node_client_forms
node_client_views -->|"reads and saves"| node_client_model
node_client_forms -->|"validates against"| node_client_model
node_staff -->|"manages suppliers"| node_supplier_views
node_supplier_views -->|"validates input"| node_supplier_forms
node_supplier_views -->|"reads and saves"| node_supplier_model
node_supplier_forms -->|"forms records"| node_supplier_model
node_staff -->|"manages products"| node_product_views
node_product_views -->|"validates input"| node_product_forms
node_product_views -->|"reads and saves"| node_product_model
node_product_views -->|"reads and saves"| node_stock_model
node_product_model -->|"references supplier"| node_supplier_model
node_staff -->|"creates sales"| node_sales_views
node_sales_views -->|"validates input"| node_sales_forms
node_sales_views -->|"reads and saves"| node_sales_model
node_sales_views -->|"updates stock"| node_stock_model
node_sales_views -->|"creates invoice"| node_invoice
node_sales_model -->|"references customer"| node_client_model
node_sales_model -->|"references product"| node_product_model
node_staff -->|"places purchases"| node_purchase_views
node_purchase_views -->|"validates input"| node_purchase_forms
node_purchase_views -->|"reads and saves"| node_purchase_model
node_purchase_forms -->|"selects supplier"| node_supplier_model
node_purchase_forms -->|"selects products"| node_product_model
node_purchase_model -->|"references supplier"| node_supplier_model
node_purchase_model -->|"references product"| node_product_model
node_django -->|"stores application data"| node_postgres

click node_client_views "https://github.com/laurabernal18/sge-bomberos-cali-bd/blob/main/apps/clientes/views.py"
click node_client_forms "https://github.com/laurabernal18/sge-bomberos-cali-bd/blob/main/apps/clientes/forms.py"
click node_client_model "https://github.com/laurabernal18/sge-bomberos-cali-bd/blob/main/apps/clientes/models.py"
click node_supplier_views "https://github.com/laurabernal18/sge-bomberos-cali-bd/blob/main/apps/proveedores/views.py"
click node_supplier_forms "https://github.com/laurabernal18/sge-bomberos-cali-bd/blob/main/apps/proveedores/forms.py"
click node_supplier_model "https://github.com/laurabernal18/sge-bomberos-cali-bd/blob/main/apps/proveedores/models.py"
click node_product_views "https://github.com/laurabernal18/sge-bomberos-cali-bd/blob/main/apps/inventario/views.py"
click node_product_forms "https://github.com/laurabernal18/sge-bomberos-cali-bd/blob/main/apps/inventario/forms.py"
click node_product_model "https://github.com/laurabernal18/sge-bomberos-cali-bd/blob/main/apps/inventario/models.py"
click node_stock_views "https://github.com/laurabernal18/sge-bomberos-cali-bd/blob/main/apps/inventario/views.py"
click node_stock_model "https://github.com/laurabernal18/sge-bomberos-cali-bd/blob/main/apps/inventario/models.py"
click node_sales_views "https://github.com/laurabernal18/sge-bomberos-cali-bd/blob/main/apps/ventas/views.py"
click node_sales_forms "https://github.com/laurabernal18/sge-bomberos-cali-bd/blob/main/apps/ventas/forms.py"
click node_sales_model "https://github.com/laurabernal18/sge-bomberos-cali-bd/blob/main/apps/ventas/models.py"
click node_invoice "https://github.com/laurabernal18/sge-bomberos-cali-bd/blob/main/apps/ventas/models.py"
click node_purchase_views "https://github.com/laurabernal18/sge-bomberos-cali-bd/blob/main/apps/compras/views.py"
click node_purchase_forms "https://github.com/laurabernal18/sge-bomberos-cali-bd/blob/main/apps/compras/forms.py"
click node_purchase_model "https://github.com/laurabernal18/sge-bomberos-cali-bd/blob/main/apps/compras/models.py"
click node_django "https://github.com/laurabernal18/sge-bomberos-cali-bd/blob/main/core/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_client_views,node_client_forms,node_client_model,node_staff toneBlue
class node_product_views,node_product_forms,node_product_model,node_stock_views,node_stock_model toneAmber
class node_sales_views,node_sales_forms,node_sales_model,node_invoice toneMint
class node_supplier_views,node_supplier_forms,node_supplier_model,node_purchase_views,node_purchase_forms,node_purchase_model toneRose
class node_django,node_postgres toneIndigo
```

## Components

### Customer Management

- [Customer Views](https://github.com/laurabernal18/sge-bomberos-cali-bd/blob/main/apps/clientes/views.py): `apps/clientes/views.py`
- [Customer Forms](https://github.com/laurabernal18/sge-bomberos-cali-bd/blob/main/apps/clientes/forms.py): `apps/clientes/forms.py`
- [Customer Records](https://github.com/laurabernal18/sge-bomberos-cali-bd/blob/main/apps/clientes/models.py): `apps/clientes/models.py`

### Catalog And Stock

- [Product Views](https://github.com/laurabernal18/sge-bomberos-cali-bd/blob/main/apps/inventario/views.py): `apps/inventario/views.py`
- [Product Forms](https://github.com/laurabernal18/sge-bomberos-cali-bd/blob/main/apps/inventario/forms.py): `apps/inventario/forms.py`
- [Product Catalog](https://github.com/laurabernal18/sge-bomberos-cali-bd/blob/main/apps/inventario/models.py): `apps/inventario/models.py`
- [Stock Views](https://github.com/laurabernal18/sge-bomberos-cali-bd/blob/main/apps/inventario/views.py): `apps/inventario/views.py`
- [Stock Records](https://github.com/laurabernal18/sge-bomberos-cali-bd/blob/main/apps/inventario/models.py): `apps/inventario/models.py`

### Sales And Billing

- [Sales Views](https://github.com/laurabernal18/sge-bomberos-cali-bd/blob/main/apps/ventas/views.py): `apps/ventas/views.py`
- [Sales Forms](https://github.com/laurabernal18/sge-bomberos-cali-bd/blob/main/apps/ventas/forms.py): `apps/ventas/forms.py`
- [Orders And Lines](https://github.com/laurabernal18/sge-bomberos-cali-bd/blob/main/apps/ventas/models.py): `apps/ventas/models.py`
- [Invoice Records](https://github.com/laurabernal18/sge-bomberos-cali-bd/blob/main/apps/ventas/models.py): `apps/ventas/models.py`

### Purchasing

- [Supplier Views](https://github.com/laurabernal18/sge-bomberos-cali-bd/blob/main/apps/proveedores/views.py): `apps/proveedores/views.py`
- [Supplier Forms](https://github.com/laurabernal18/sge-bomberos-cali-bd/blob/main/apps/proveedores/forms.py): `apps/proveedores/forms.py`
- [Supplier Records](https://github.com/laurabernal18/sge-bomberos-cali-bd/blob/main/apps/proveedores/models.py): `apps/proveedores/models.py`
- [Purchase Views](https://github.com/laurabernal18/sge-bomberos-cali-bd/blob/main/apps/compras/views.py): `apps/compras/views.py`
- [Purchase Forms](https://github.com/laurabernal18/sge-bomberos-cali-bd/blob/main/apps/compras/forms.py): `apps/compras/forms.py`
- [Purchase Orders](https://github.com/laurabernal18/sge-bomberos-cali-bd/blob/main/apps/compras/models.py): `apps/compras/models.py`

### Web Runtime

- [Django Runtime](https://github.com/laurabernal18/sge-bomberos-cali-bd/blob/main/core/settings.py): `core/settings.py`
- **PostgreSQL**

### Other components

- **Staff User**

## Connections

- Staff User → Customer Views: manages clients
- Customer Views → Customer Forms: validates input (evidence: `apps/clientes/views.py`)
- Customer Views → Customer Records: reads and saves (evidence: `apps/clientes/views.py`)
- Customer Forms → Customer Records: validates against (evidence: `apps/clientes/forms.py`)
- Staff User → Supplier Views: manages suppliers
- Supplier Views → Supplier Forms: validates input (evidence: `apps/proveedores/views.py`)
- Supplier Views → Supplier Records: reads and saves (evidence: `apps/proveedores/views.py`)
- Supplier Forms → Supplier Records: forms records (evidence: `apps/proveedores/forms.py`)
- Staff User → Product Views: manages products
- Product Views → Product Forms: validates input (evidence: `apps/inventario/views.py`)
- Product Views → Product Catalog: reads and saves (evidence: `apps/inventario/views.py`)
- Product Views → Stock Records: reads and saves (evidence: `apps/inventario/views.py`)
- Product Catalog → Supplier Records: references supplier (evidence: `apps/inventario/models.py`)
- Staff User → Sales Views: creates sales
- Sales Views → Sales Forms: validates input (evidence: `apps/ventas/views.py`)
- Sales Views → Orders And Lines: reads and saves (evidence: `apps/ventas/views.py`)
- Sales Views → Stock Records: updates stock (evidence: `apps/ventas/views.py`)
- Sales Views → Invoice Records: creates invoice (evidence: `apps/ventas/views.py`)
- Orders And Lines → Customer Records: references customer (evidence: `apps/ventas/models.py`)
- Orders And Lines → Product Catalog: references product (evidence: `apps/ventas/models.py`)
- Staff User → Purchase Views: places purchases
- Purchase Views → Purchase Forms: validates input (evidence: `apps/compras/views.py`)
- Purchase Views → Purchase Orders: reads and saves (evidence: `apps/compras/views.py`)
- Purchase Forms → Supplier Records: selects supplier (evidence: `apps/compras/forms.py`)
- Purchase Forms → Product Catalog: selects products (evidence: `apps/compras/forms.py`)
- Purchase Orders → Supplier Records: references supplier (evidence: `apps/compras/models.py`)
- Purchase Orders → Product Catalog: references product (evidence: `apps/compras/models.py`)
- Django Runtime → PostgreSQL: stores application data
