# giullialima13/gerenciamento-de-estoque architecture

> Architecture diagram of the GitHub repository giullialima13/gerenciamento-de-estoque, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-20). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/giullialima13/gerenciamento-de-estoque
- Repository: https://github.com/giullialima13/gerenciamento-de-estoque

## Overview

This is a single-file, interactive Portuguese CLI for managing stock. The main workflow is menu selection followed by product operations that read or update JSON inventory; the code also includes expiry monitoring and stock saving. The excerpt confirms menu dispatch for adding and listing, and shows JSON initialization and product updates. Other menu routes and parts of the save flow are not fully sampled, so their connections are omitted.

Main entry points: [`estoque.py`](https://github.com/giullialima13/gerenciamento-de-estoque/blob/main/estoque.py) (Main loop)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_cli["CLI"]
  node_main["Main loop<br/>[estoque.py]"]
  node_menus["Inventory menus<br/>[estoque.py]"]
end

subgraph group_inventory["Inventory management"]
  node_add["Add product<br/>[estoque.py]"]
  node_list["List products<br/>[estoque.py]"]
  node_update["Update product<br/>[estoque.py]"]
  node_delete["Delete product<br/>[estoque.py]"]
  node_expiry["Expiry alerts<br/>[estoque.py]"]
  node_save["Save stock<br/>[estoque.py]"]
end

subgraph group_data["Inventory data"]
  node_json[("Product JSON")]
end

node_user(("Operator"))

node_user -->|"chooses options"| node_main
node_main -->|"displays menus"| node_menus
node_main -->|"dispatches"| node_add
node_main -->|"dispatches"| node_list
node_add -->|"writes products"| node_json
node_update -->|"writes updates"| node_json
node_list -->|"reads products"| node_json
node_delete -->|"reads products"| node_json
node_save -->|"reads stock"| node_json
node_expiry -.->|"checks dates"| node_json

click node_main "https://github.com/giullialima13/gerenciamento-de-estoque/blob/main/estoque.py"
click node_menus "https://github.com/giullialima13/gerenciamento-de-estoque/blob/main/estoque.py"
click node_add "https://github.com/giullialima13/gerenciamento-de-estoque/blob/main/estoque.py"
click node_list "https://github.com/giullialima13/gerenciamento-de-estoque/blob/main/estoque.py"
click node_update "https://github.com/giullialima13/gerenciamento-de-estoque/blob/main/estoque.py"
click node_delete "https://github.com/giullialima13/gerenciamento-de-estoque/blob/main/estoque.py"
click node_expiry "https://github.com/giullialima13/gerenciamento-de-estoque/blob/main/estoque.py"
click node_save "https://github.com/giullialima13/gerenciamento-de-estoque/blob/main/estoque.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_main,node_menus toneBlue
class node_add,node_list,node_update,node_delete,node_expiry,node_save toneAmber
class node_json toneMint
class node_user toneIndigo
```

## Components

### CLI

- [Main loop](https://github.com/giullialima13/gerenciamento-de-estoque/blob/main/estoque.py): `estoque.py`
- [Inventory menus](https://github.com/giullialima13/gerenciamento-de-estoque/blob/main/estoque.py): `estoque.py`

### Inventory management

- [Add product](https://github.com/giullialima13/gerenciamento-de-estoque/blob/main/estoque.py): `estoque.py`
- [List products](https://github.com/giullialima13/gerenciamento-de-estoque/blob/main/estoque.py): `estoque.py`
- [Update product](https://github.com/giullialima13/gerenciamento-de-estoque/blob/main/estoque.py): `estoque.py`
- [Delete product](https://github.com/giullialima13/gerenciamento-de-estoque/blob/main/estoque.py): `estoque.py`
- [Expiry alerts](https://github.com/giullialima13/gerenciamento-de-estoque/blob/main/estoque.py): `estoque.py`
- [Save stock](https://github.com/giullialima13/gerenciamento-de-estoque/blob/main/estoque.py): `estoque.py`

### Inventory data

- **Product JSON**

### Other components

- **Operator**

## Connections

- Operator → Main loop: chooses options (evidence: `estoque.py`)
- Main loop → Inventory menus: displays menus (evidence: `estoque.py`)
- Main loop → Add product: dispatches (evidence: `estoque.py`)
- Main loop → List products: dispatches (evidence: `estoque.py`)
- Add product → Product JSON: writes products (evidence: `estoque.py`)
- Update product → Product JSON: writes updates (evidence: `estoque.py`)
- List products → Product JSON: reads products (evidence: `estoque.py`)
- Delete product → Product JSON: reads products (evidence: `estoque.py`)
- Save stock → Product JSON: reads stock (evidence: `estoque.py`)
- Expiry alerts → Product JSON: checks dates
