# danielknp/tatus-sistem architecture

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

- Interactive diagram: https://gitdiagram.com/danielknp/tatus-sistem
- Repository: https://github.com/danielknp/tatus-sistem

## Overview

This is a Django inventory and invoicing application. Users access authenticated screens for suppliers, customers, products and stock adjustments, then record purchase (entry) and sales (exit) invoices with line items; the application persists these records and provides invoice views. The graph separates the documented domain areas while keeping their shared request handling and data model visible. The README is empty, and the views excerpt is partial, so unsampled relationships are omitted rather than inferred.

Main entry points: [`estoque/views.py`](https://github.com/danielknp/tatus-sistem/blob/main/estoque/views.py) (Request handlers), [`estoque/models.py`](https://github.com/danielknp/tatus-sistem/blob/main/estoque/models.py) (Domain models), [`tatus/urls.py`](https://github.com/danielknp/tatus-sistem/blob/main/tatus/urls.py) (URL routing), [`estoque/forms.py`](https://github.com/danielknp/tatus-sistem/blob/main/estoque/forms.py) (Input validation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web application"]
  node_routes["URL routing<br/>[urls.py]"]
  node_views["Request handlers<br/>[views.py]"]
  node_forms["Input validation<br/>[forms.py]"]
  node_templates["Screen templates"]
end

subgraph group_catalog["Business records"]
  node_supplier["Supplier records<br/>[views.py]"]
  node_customer["Customer records<br/>[views.py]"]
  node_product["Products and stock<br/>[views.py]"]
end

subgraph group_invoices["Invoice workflows"]
  node_entry["Purchase invoices<br/>[views.py]"]
  node_exit["Sales invoices<br/>[views.py]"]
  node_invoice_views["Invoice details and print<br/>[views.py]"]
end

subgraph group_storage["Data and administration"]
  node_models["Domain models<br/>[models.py]"]
  node_database[("SQLite database")]
  node_admin["Django admin<br/>[admin.py]"]
end

node_user(("Staff user"))

node_user -.->|"requests pages"| node_routes
node_routes -->|"dispatches to"| node_views
node_views -->|"uses forms"| node_forms
node_forms -->|"validates and saves"| node_models
node_views -->|"queries and updates"| node_models
node_views -->|"handles supplier records"| node_supplier
node_views -->|"handles customer records"| node_customer
node_views -->|"handles products and inventory"| node_product
node_views -->|"handles entry invoices"| node_entry
node_views -->|"handles exit invoices"| node_exit
node_views -->|"serves invoice pages"| node_invoice_views
node_views -->|"renders screens"| node_templates
node_models -.->|"persists records"| node_database
node_admin -->|"registers records"| node_models

click node_routes "https://github.com/danielknp/tatus-sistem/blob/main/tatus/urls.py"
click node_views "https://github.com/danielknp/tatus-sistem/blob/main/estoque/views.py"
click node_forms "https://github.com/danielknp/tatus-sistem/blob/main/estoque/forms.py"
click node_supplier "https://github.com/danielknp/tatus-sistem/blob/main/estoque/views.py"
click node_customer "https://github.com/danielknp/tatus-sistem/blob/main/estoque/views.py"
click node_product "https://github.com/danielknp/tatus-sistem/blob/main/estoque/views.py"
click node_entry "https://github.com/danielknp/tatus-sistem/blob/main/estoque/views.py"
click node_exit "https://github.com/danielknp/tatus-sistem/blob/main/estoque/views.py"
click node_invoice_views "https://github.com/danielknp/tatus-sistem/blob/main/estoque/views.py"
click node_templates "https://github.com/danielknp/tatus-sistem/tree/main/estoque/templates/estoque"
click node_models "https://github.com/danielknp/tatus-sistem/blob/main/estoque/models.py"
click node_admin "https://github.com/danielknp/tatus-sistem/blob/main/estoque/admin.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_views,node_forms,node_templates,node_user toneBlue
class node_supplier,node_customer,node_product toneAmber
class node_entry,node_exit,node_invoice_views toneMint
class node_models,node_database,node_admin toneRose
```

## Components

### Web application

- [URL routing](https://github.com/danielknp/tatus-sistem/blob/main/tatus/urls.py): `tatus/urls.py`
- [Request handlers](https://github.com/danielknp/tatus-sistem/blob/main/estoque/views.py): `estoque/views.py`
- [Input validation](https://github.com/danielknp/tatus-sistem/blob/main/estoque/forms.py): `estoque/forms.py`
- [Screen templates](https://github.com/danielknp/tatus-sistem/tree/main/estoque/templates/estoque): `estoque/templates/estoque`

### Business records

- [Supplier records](https://github.com/danielknp/tatus-sistem/blob/main/estoque/views.py): `estoque/views.py`
- [Customer records](https://github.com/danielknp/tatus-sistem/blob/main/estoque/views.py): `estoque/views.py`
- [Products and stock](https://github.com/danielknp/tatus-sistem/blob/main/estoque/views.py): `estoque/views.py`

### Invoice workflows

- [Purchase invoices](https://github.com/danielknp/tatus-sistem/blob/main/estoque/views.py): `estoque/views.py`
- [Sales invoices](https://github.com/danielknp/tatus-sistem/blob/main/estoque/views.py): `estoque/views.py`
- [Invoice details and print](https://github.com/danielknp/tatus-sistem/blob/main/estoque/views.py): `estoque/views.py`

### Data and administration

- [Domain models](https://github.com/danielknp/tatus-sistem/blob/main/estoque/models.py): `estoque/models.py`
- **SQLite database**
- [Django admin](https://github.com/danielknp/tatus-sistem/blob/main/estoque/admin.py): `estoque/admin.py`

### Other components

- **Staff user**

## Connections

- Staff user → URL routing: requests pages
- URL routing → Request handlers: dispatches to (evidence: `tatus/urls.py`)
- Request handlers → Input validation: uses forms (evidence: `estoque/views.py`)
- Input validation → Domain models: validates and saves (evidence: `estoque/forms.py`)
- Request handlers → Domain models: queries and updates (evidence: `estoque/views.py`)
- Request handlers → Supplier records: handles supplier records (evidence: `tatus/urls.py`)
- Request handlers → Customer records: handles customer records (evidence: `tatus/urls.py`)
- Request handlers → Products and stock: handles products and inventory (evidence: `tatus/urls.py`)
- Request handlers → Purchase invoices: handles entry invoices (evidence: `tatus/urls.py`)
- Request handlers → Sales invoices: handles exit invoices (evidence: `tatus/urls.py`)
- Request handlers → Invoice details and print: serves invoice pages (evidence: `tatus/urls.py`)
- Request handlers → Screen templates: renders screens (evidence: `estoque/views.py`)
- Domain models → SQLite database: persists records
- Django admin → Domain models: registers records (evidence: `estoque/admin.py`)
