# jackedosil/estoque_programa architecture

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

- Interactive diagram: https://gitdiagram.com/jackedosil/estoque_programa
- Repository: https://github.com/jackedosil/estoque_programa

## Overview

Estoque_Programa is a Flask-based materials inventory application. Its main workflow is user access, maintaining material and staff/specialty records, dispensing stock, generating barcode-label PDFs, and viewing stock or dispensing reports; material returns are handled through a separate reversal flow. The sampled routes show database access and PDF preview/download behavior. The README provides no further capability details, and unsampled route wiring is not inferred.

Main entry points: [`app.py`](https://github.com/jackedosil/estoque_programa/blob/main/app.py) (Flask application), [`estoque.db`](https://github.com/jackedosil/estoque_programa/blob/main/estoque.db) (Inventory database), [`login.html`](https://github.com/jackedosil/estoque_programa/blob/main/login.html) (Login page), [`Menu.html`](https://github.com/jackedosil/estoque_programa/blob/main/Menu.html) (Menu page)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Access"]
  node_app["Flask application<br/>[app.py]"]
  node_login["Login page<br/>[login.html]"]
  node_menu["Menu page<br/>[Menu.html]"]
end

subgraph group_inventory["Inventory operations"]
  node_db[("Inventory database<br/>[estoque.db]")]
  node_material_entry["Register material"]
  node_dispense["Dispense material"]
  node_reversal["Reverse dispense"]
end

subgraph group_records["Catalog and reporting"]
  node_specialty_entry["Register specialty"]
  node_staff_entry["Register staff"]
  node_catalog_list["List catalogs"]
  node_specialty_edit["Edit specialty"]
  node_staff_edit["Edit staff"]
  node_stock_report["Stock report<br/>[relatorio.html]"]
  node_dispense_report["Dispense report<br/>[app.py]"]
end

subgraph group_labels["Barcode labels"]
  node_pdf_generator["Barcode PDF generation<br/>[app.py]"]
  node_layout["Select layout"]
  node_print_options["Print options"]
  node_printer["Select printer"]
  node_pdf_preview["PDF preview<br/>[app.py]"]
  node_pdf_file["Generated PDF"]
end

node_user(("User"))

node_user -->|"uses"| node_app
node_app -->|"renders"| node_login
node_app -->|"renders"| node_menu
node_app -->|"reads and writes"| node_db
node_app -->|"renders"| node_material_entry
node_app -->|"renders"| node_dispense
node_app -->|"renders"| node_reversal
node_app -->|"renders"| node_specialty_entry
node_app -->|"renders"| node_staff_entry
node_app -->|"renders"| node_catalog_list
node_app -->|"renders"| node_specialty_edit
node_app -->|"renders"| node_staff_edit
node_app -->|"renders"| node_stock_report
node_app -->|"renders"| node_dispense_report
node_app -->|"renders"| node_layout
node_app -->|"calls"| node_pdf_generator
node_pdf_generator -->|"reads"| node_db
node_pdf_generator -->|"generates"| node_pdf_file
node_app -->|"renders"| node_print_options
node_app -->|"renders"| node_printer
node_app -->|"serves"| node_pdf_preview
node_pdf_preview -->|"reads"| node_pdf_file

click node_app "https://github.com/jackedosil/estoque_programa/blob/main/app.py"
click node_login "https://github.com/jackedosil/estoque_programa/blob/main/login.html"
click node_menu "https://github.com/jackedosil/estoque_programa/blob/main/Menu.html"
click node_db "https://github.com/jackedosil/estoque_programa/blob/main/estoque.db"
click node_material_entry "https://github.com/jackedosil/estoque_programa/blob/main/cadastro_material.html"
click node_dispense "https://github.com/jackedosil/estoque_programa/blob/main/dispensa_material.html"
click node_reversal "https://github.com/jackedosil/estoque_programa/blob/main/estorno_material.html"
click node_specialty_entry "https://github.com/jackedosil/estoque_programa/blob/main/cadastro_especialidade.html"
click node_staff_entry "https://github.com/jackedosil/estoque_programa/blob/main/cadastro_funcionario.html"
click node_catalog_list "https://github.com/jackedosil/estoque_programa/blob/main/listar_cadastros.html"
click node_specialty_edit "https://github.com/jackedosil/estoque_programa/blob/main/editar_especialidade.html"
click node_staff_edit "https://github.com/jackedosil/estoque_programa/blob/main/editar_funcionario.html"
click node_stock_report "https://github.com/jackedosil/estoque_programa/blob/main/relatorio.html"
click node_dispense_report "https://github.com/jackedosil/estoque_programa/blob/main/app.py"
click node_pdf_generator "https://github.com/jackedosil/estoque_programa/blob/main/app.py"
click node_layout "https://github.com/jackedosil/estoque_programa/blob/main/selecionar_layout.html"
click node_print_options "https://github.com/jackedosil/estoque_programa/blob/main/preview_options.html"
click node_printer "https://github.com/jackedosil/estoque_programa/blob/main/selecionar_impressora.html"
click node_pdf_preview "https://github.com/jackedosil/estoque_programa/blob/main/app.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_app,node_login,node_menu,node_user toneBlue
class node_db,node_material_entry,node_dispense,node_reversal toneAmber
class node_specialty_entry,node_staff_entry,node_catalog_list,node_specialty_edit,node_staff_edit,node_stock_report,node_dispense_report toneMint
class node_pdf_generator,node_layout,node_print_options,node_printer,node_pdf_preview,node_pdf_file toneRose
```

## Components

### Access

- [Flask application](https://github.com/jackedosil/estoque_programa/blob/main/app.py): `app.py`
- [Login page](https://github.com/jackedosil/estoque_programa/blob/main/login.html): `login.html`
- [Menu page](https://github.com/jackedosil/estoque_programa/blob/main/Menu.html): `Menu.html`

### Inventory operations

- [Inventory database](https://github.com/jackedosil/estoque_programa/blob/main/estoque.db): `estoque.db`
- [Register material](https://github.com/jackedosil/estoque_programa/blob/main/cadastro_material.html): `cadastro_material.html`
- [Dispense material](https://github.com/jackedosil/estoque_programa/blob/main/dispensa_material.html): `dispensa_material.html`
- [Reverse dispense](https://github.com/jackedosil/estoque_programa/blob/main/estorno_material.html): `estorno_material.html`

### Catalog and reporting

- [Register specialty](https://github.com/jackedosil/estoque_programa/blob/main/cadastro_especialidade.html): `cadastro_especialidade.html`
- [Register staff](https://github.com/jackedosil/estoque_programa/blob/main/cadastro_funcionario.html): `cadastro_funcionario.html`
- [List catalogs](https://github.com/jackedosil/estoque_programa/blob/main/listar_cadastros.html): `listar_cadastros.html`
- [Edit specialty](https://github.com/jackedosil/estoque_programa/blob/main/editar_especialidade.html): `editar_especialidade.html`
- [Edit staff](https://github.com/jackedosil/estoque_programa/blob/main/editar_funcionario.html): `editar_funcionario.html`
- [Stock report](https://github.com/jackedosil/estoque_programa/blob/main/relatorio.html): `relatorio.html`
- [Dispense report](https://github.com/jackedosil/estoque_programa/blob/main/app.py): `app.py`

### Barcode labels

- [Barcode PDF generation](https://github.com/jackedosil/estoque_programa/blob/main/app.py): `app.py`
- [Select layout](https://github.com/jackedosil/estoque_programa/blob/main/selecionar_layout.html): `selecionar_layout.html`
- [Print options](https://github.com/jackedosil/estoque_programa/blob/main/preview_options.html): `preview_options.html`
- [Select printer](https://github.com/jackedosil/estoque_programa/blob/main/selecionar_impressora.html): `selecionar_impressora.html`
- [PDF preview](https://github.com/jackedosil/estoque_programa/blob/main/app.py): `app.py`
- **Generated PDF**

### Other components

- **User**

## Connections

- User → Flask application: uses
- Flask application → Login page: renders
- Flask application → Menu page: renders
- Flask application → Inventory database: reads and writes
- Flask application → Register material: renders
- Flask application → Dispense material: renders
- Flask application → Reverse dispense: renders
- Flask application → Register specialty: renders
- Flask application → Register staff: renders
- Flask application → List catalogs: renders
- Flask application → Edit specialty: renders
- Flask application → Edit staff: renders
- Flask application → Stock report: renders
- Flask application → Dispense report: renders
- Flask application → Select layout: renders
- Flask application → Barcode PDF generation: calls
- Barcode PDF generation → Inventory database: reads
- Barcode PDF generation → Generated PDF: generates
- Flask application → Print options: renders
- Flask application → Select printer: renders
- Flask application → PDF preview: serves
- PDF preview → Generated PDF: reads
