# willianmz/sistemagestor architecture

> Architecture diagram of the GitHub repository willianmz/sistemagestor, 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/willianmz/sistemagestor
- Repository: https://github.com/willianmz/sistemagestor

## Overview

Sistema Gestor is a Windows desktop business-management application, with inventory as its documented focus and product catalog screens visible in the sampled source. A product edit or creation is handled by the product form, delegated through a business-logic layer to PostgreSQL-backed DAO operations. The tree also shows separate people, finance, purchasing/stock-entry, and system-configuration areas. The available excerpts establish only part of their wiring, so unsampled subsystem links are omitted rather than inferred.

Main entry points: [`Modelo/Estoque`](https://github.com/willianmz/sistemagestor/tree/master/Modelo/Estoque) (Inventory entities), [`Sistema.Estoque/Interfaces/formProduto.cs`](https://github.com/willianmz/sistemagestor/blob/master/Sistema.Estoque/Interfaces/formProduto.cs) (Product form), [`Sistema.Estoque/Controles/BLL_Produto.cs`](https://github.com/willianmz/sistemagestor/blob/master/Sistema.Estoque/Controles/BLL_Produto.cs) (Product business logic), [`DAO/DAO_Produto.cs`](https://github.com/willianmz/sistemagestor/blob/master/DAO/DAO_Produto.cs) (Product data access)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_inventory["Inventory management"]
  node_product_form["Product form<br/>[formProduto.cs]"]
  node_product_logic["Product business logic<br/>[BLL_Produto.cs]"]
  node_product_data["Product data access<br/>[DAO_Produto.cs]"]
  node_stock_entry["Stock entry"]
  node_stock_movement["Stock movement history"]
  node_inventory_domain["Inventory entities"]
end

subgraph group_people["People management"]
  node_people_form["Person forms<br/>[formPessoa.cs]"]
  node_people_logic["People business logic<br/>[BLL_Pessoa.cs]"]
  node_people_data["People data access<br/>[DAO_Pessoa.cs]"]
  node_people_domain["People entities<br/>[Pessoa.cs]"]
end

subgraph group_finance["Finance"]
  node_finance_forms["Finance screens"]
  node_finance_logic["Finance business logic<br/>[BLL_Financeiro.cs]"]
  node_finance_data["Finance data access<br/>[DAO_Financeiro.cs]"]
  node_finance_domain["Finance entities"]
end

subgraph group_core["Shared domain and system"]
  node_model_core["Shared domain models"]
  node_system_app["Desktop application<br/>[Program.cs]"]
  node_login["Login form<br/>[formLogin.cs]"]
  node_system_logic["System and user services<br/>[Controles]"]
end

node_user(("Desktop user"))
node_database[("PostgreSQL database")]

node_user -->|"edits products"| node_product_form
node_product_form -->|"delegates product operations"| node_product_logic
node_product_form -->|"uses product types"| node_inventory_domain
node_product_logic -->|"calls data operations"| node_product_data
node_product_logic -->|"handles inventory entities"| node_inventory_domain
node_product_data -->|"queries and writes"| node_database
node_product_data -->|"maps product records"| node_inventory_domain
node_people_form -->|"uses person models"| node_people_domain
node_people_logic -->|"handles person models"| node_people_domain
node_finance_forms -->|"uses finance models"| node_finance_domain
node_finance_logic -->|"handles finance models"| node_finance_domain
node_login -->|"uses configuration models"| node_model_core
node_system_logic -->|"uses shared models"| node_model_core
node_stock_entry -->|"uses entry models"| node_inventory_domain

click node_product_form "https://github.com/willianmz/sistemagestor/blob/master/Sistema.Estoque/Interfaces/formProduto.cs"
click node_product_logic "https://github.com/willianmz/sistemagestor/blob/master/Sistema.Estoque/Controles/BLL_Produto.cs"
click node_product_data "https://github.com/willianmz/sistemagestor/blob/master/DAO/DAO_Produto.cs"
click node_stock_entry "https://github.com/willianmz/sistemagestor/blob/master/Sistema.Estoque/Interfaces/formEstoqueEntrada.cs"
click node_stock_movement "https://github.com/willianmz/sistemagestor/blob/master/Sistema.Estoque/Interfaces/formHistoricoMovProduto.cs"
click node_inventory_domain "https://github.com/willianmz/sistemagestor/tree/master/Modelo/Estoque"
click node_people_form "https://github.com/willianmz/sistemagestor/blob/master/Sistema.Pessoas/Interfaces/formPessoa.cs"
click node_people_logic "https://github.com/willianmz/sistemagestor/blob/master/Sistema.Pessoas/Controles/BLL_Pessoa.cs"
click node_people_data "https://github.com/willianmz/sistemagestor/blob/master/DAO/DAO_Pessoa.cs"
click node_people_domain "https://github.com/willianmz/sistemagestor/blob/master/Modelo/Pessoa.cs"
click node_finance_forms "https://github.com/willianmz/sistemagestor/blob/master/Sistema.Financeiro/Interfaces/formCadastroBanco.cs"
click node_finance_logic "https://github.com/willianmz/sistemagestor/blob/master/Sistema.Financeiro/Controles/BLL_Financeiro.cs"
click node_finance_data "https://github.com/willianmz/sistemagestor/blob/master/DAO/DAO_Financeiro.cs"
click node_finance_domain "https://github.com/willianmz/sistemagestor/tree/master/Modelo/Financeiro"
click node_model_core "https://github.com/willianmz/sistemagestor/tree/master/Modelo"
click node_system_app "https://github.com/willianmz/sistemagestor/blob/master/Gestor/Program.cs"
click node_login "https://github.com/willianmz/sistemagestor/blob/master/Gestor/Interfaces/formLogin.cs"
click node_system_logic "https://github.com/willianmz/sistemagestor/tree/master/Sistema.Utilitario/Controles"

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_product_form,node_product_logic,node_product_data,node_stock_entry,node_stock_movement,node_inventory_domain,node_user toneBlue
class node_people_form,node_people_logic,node_people_data,node_people_domain,node_database toneAmber
class node_finance_forms,node_finance_logic,node_finance_data,node_finance_domain toneMint
class node_model_core,node_system_app,node_login,node_system_logic toneRose
```

## Components

### Inventory management

- [Product form](https://github.com/willianmz/sistemagestor/blob/master/Sistema.Estoque/Interfaces/formProduto.cs): `Sistema.Estoque/Interfaces/formProduto.cs`
- [Product business logic](https://github.com/willianmz/sistemagestor/blob/master/Sistema.Estoque/Controles/BLL_Produto.cs): `Sistema.Estoque/Controles/BLL_Produto.cs`
- [Product data access](https://github.com/willianmz/sistemagestor/blob/master/DAO/DAO_Produto.cs): `DAO/DAO_Produto.cs`
- [Stock entry](https://github.com/willianmz/sistemagestor/blob/master/Sistema.Estoque/Interfaces/formEstoqueEntrada.cs): `Sistema.Estoque/Interfaces/formEstoqueEntrada.cs`
- [Stock movement history](https://github.com/willianmz/sistemagestor/blob/master/Sistema.Estoque/Interfaces/formHistoricoMovProduto.cs): `Sistema.Estoque/Interfaces/formHistoricoMovProduto.cs`
- [Inventory entities](https://github.com/willianmz/sistemagestor/tree/master/Modelo/Estoque): `Modelo/Estoque`

### People management

- [Person forms](https://github.com/willianmz/sistemagestor/blob/master/Sistema.Pessoas/Interfaces/formPessoa.cs): `Sistema.Pessoas/Interfaces/formPessoa.cs`
- [People business logic](https://github.com/willianmz/sistemagestor/blob/master/Sistema.Pessoas/Controles/BLL_Pessoa.cs): `Sistema.Pessoas/Controles/BLL_Pessoa.cs`
- [People data access](https://github.com/willianmz/sistemagestor/blob/master/DAO/DAO_Pessoa.cs): `DAO/DAO_Pessoa.cs`
- [People entities](https://github.com/willianmz/sistemagestor/blob/master/Modelo/Pessoa.cs): `Modelo/Pessoa.cs`

### Finance

- [Finance screens](https://github.com/willianmz/sistemagestor/blob/master/Sistema.Financeiro/Interfaces/formCadastroBanco.cs): `Sistema.Financeiro/Interfaces/formCadastroBanco.cs`
- [Finance business logic](https://github.com/willianmz/sistemagestor/blob/master/Sistema.Financeiro/Controles/BLL_Financeiro.cs): `Sistema.Financeiro/Controles/BLL_Financeiro.cs`
- [Finance data access](https://github.com/willianmz/sistemagestor/blob/master/DAO/DAO_Financeiro.cs): `DAO/DAO_Financeiro.cs`
- [Finance entities](https://github.com/willianmz/sistemagestor/tree/master/Modelo/Financeiro): `Modelo/Financeiro`

### Shared domain and system

- [Shared domain models](https://github.com/willianmz/sistemagestor/tree/master/Modelo): `Modelo`
- [Desktop application](https://github.com/willianmz/sistemagestor/blob/master/Gestor/Program.cs): `Gestor/Program.cs`
- [Login form](https://github.com/willianmz/sistemagestor/blob/master/Gestor/Interfaces/formLogin.cs): `Gestor/Interfaces/formLogin.cs`
- [System and user services](https://github.com/willianmz/sistemagestor/tree/master/Sistema.Utilitario/Controles): `Sistema.Utilitario/Controles`

### Other components

- **Desktop user**
- **PostgreSQL database**

## Connections

- Desktop user → Product form: edits products (evidence: `Sistema.Estoque/Interfaces/formProduto.cs`)
- Product form → Product business logic: delegates product operations (evidence: `Sistema.Estoque/Interfaces/formProduto.cs`)
- Product form → Inventory entities: uses product types (evidence: `Sistema.Estoque/Interfaces/formProduto.cs`)
- Product business logic → Product data access: calls data operations (evidence: `Sistema.Estoque/Controles/BLL_Produto.cs`)
- Product business logic → Inventory entities: handles inventory entities (evidence: `Sistema.Estoque/Controles/BLL_Produto.cs`)
- Product data access → PostgreSQL database: queries and writes (evidence: `DAO/DAO_Produto.cs`)
- Product data access → Inventory entities: maps product records (evidence: `DAO/DAO_Produto.cs`)
- Person forms → People entities: uses person models (evidence: `Sistema.Pessoas/Interfaces/formPessoa.cs`)
- People business logic → People entities: handles person models (evidence: `Sistema.Pessoas/Controles/BLL_Pessoa.cs`)
- Finance screens → Finance entities: uses finance models (evidence: `Sistema.Financeiro/Interfaces/formCadastroBanco.cs`)
- Finance business logic → Finance entities: handles finance models (evidence: `Sistema.Financeiro/Controles/BLL_Financeiro.cs`)
- Login form → Shared domain models: uses configuration models (evidence: `Gestor/Interfaces/formLogin.cs`)
- System and user services → Shared domain models: uses shared models (evidence: `Sistema.Utilitario/Controles/BLL_Empresa.cs`)
- Stock entry → Inventory entities: uses entry models (evidence: `Modelo/Estoque/Entrada.cs`)
