# kcarloshl/sistema-funcionarios-dependentes architecture

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

- Interactive diagram: https://gitdiagram.com/kcarloshl/sistema-funcionarios-dependentes
- Repository: https://github.com/kcarloshl/sistema-funcionarios-dependentes

## Overview

This is a small interactive C++ employee-and-dependent registry. A user selects an operation in the terminal; `main` dispatches it to the corresponding record operation, which reads or changes in-memory vectors. Dependent registration checks the responsible employee’s CPF, and successful employee deletion triggers removal of that employee’s dependents. The README documents the full capability set and confirms there is no persistent storage. Relationships shown are supported by the excerpts and README.

Main entry points: [`programa.cpp`](https://github.com/kcarloshl/sistema-funcionarios-dependentes/blob/main/programa.cpp) (Application loop), [`menu.cpp`](https://github.com/kcarloshl/sistema-funcionarios-dependentes/blob/main/menu.cpp) (Interactive menu), [`dados.cpp`](https://github.com/kcarloshl/sistema-funcionarios-dependentes/blob/main/dados.cpp) (Dependent registration)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_control["Interaction and control"]
  node_menu["Interactive menu<br/>[menu.cpp]"]
  node_main["Application loop<br/>[programa.cpp]"]
end

subgraph group_records["Record operations"]
  node_employee_registration["Employee registration<br/>[dados.cpp]"]
  node_dependent_registration["Dependent registration<br/>[dados.cpp]"]
  node_employee_listing["Employee listing<br/>[dados.cpp]"]
  node_dependent_listing["Dependent listing<br/>[dados.cpp]"]
  node_employee_editing["Employee editing<br/>[dados.cpp]"]
  node_dependent_editing["Dependent editing<br/>[dados.cpp]"]
  node_employee_deletion["Employee deletion<br/>[dados.cpp]"]
  node_dependent_cleanup["Dependent cleanup<br/>[dados.cpp]"]
end

subgraph group_state["Runtime state"]
  node_vectors[("Record vectors<br/>[programa.cpp]")]
end

node_user(("Terminal user"))

node_user -->|"chooses option"| node_menu
node_main -->|"calls"| node_menu
node_menu -->|"returns option"| node_main
node_main -->|"initializes"| node_vectors
node_main -->|"dispatches registration"| node_employee_registration
node_main -->|"dispatches registration"| node_dependent_registration
node_main -->|"dispatches listing"| node_employee_listing
node_main -->|"dispatches listing"| node_dependent_listing
node_main -->|"dispatches editing"| node_employee_editing
node_main -->|"dispatches editing"| node_dependent_editing
node_main -->|"dispatches deletion"| node_employee_deletion
node_main -->|"dispatches cleanup"| node_dependent_cleanup
node_dependent_registration -->|"checks employee CPF"| node_vectors
node_main -->|"stores records"| node_vectors
node_employee_deletion -->|"returns deleted CPF"| node_dependent_cleanup

click node_menu "https://github.com/kcarloshl/sistema-funcionarios-dependentes/blob/main/menu.cpp"
click node_main "https://github.com/kcarloshl/sistema-funcionarios-dependentes/blob/main/programa.cpp"
click node_vectors "https://github.com/kcarloshl/sistema-funcionarios-dependentes/blob/main/programa.cpp"
click node_employee_registration "https://github.com/kcarloshl/sistema-funcionarios-dependentes/blob/main/dados.cpp"
click node_dependent_registration "https://github.com/kcarloshl/sistema-funcionarios-dependentes/blob/main/dados.cpp"
click node_employee_listing "https://github.com/kcarloshl/sistema-funcionarios-dependentes/blob/main/dados.cpp"
click node_dependent_listing "https://github.com/kcarloshl/sistema-funcionarios-dependentes/blob/main/dados.cpp"
click node_employee_editing "https://github.com/kcarloshl/sistema-funcionarios-dependentes/blob/main/dados.cpp"
click node_dependent_editing "https://github.com/kcarloshl/sistema-funcionarios-dependentes/blob/main/dados.cpp"
click node_employee_deletion "https://github.com/kcarloshl/sistema-funcionarios-dependentes/blob/main/dados.cpp"
click node_dependent_cleanup "https://github.com/kcarloshl/sistema-funcionarios-dependentes/blob/main/dados.cpp"

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_menu,node_main,node_user toneBlue
class node_employee_registration,node_dependent_registration,node_employee_listing,node_dependent_listing,node_employee_editing,node_dependent_editing,node_employee_deletion,node_dependent_cleanup toneAmber
class node_vectors toneMint
```

## Components

### Interaction and control

- [Interactive menu](https://github.com/kcarloshl/sistema-funcionarios-dependentes/blob/main/menu.cpp): `menu.cpp`
- [Application loop](https://github.com/kcarloshl/sistema-funcionarios-dependentes/blob/main/programa.cpp): `programa.cpp`

### Record operations

- [Employee registration](https://github.com/kcarloshl/sistema-funcionarios-dependentes/blob/main/dados.cpp): `dados.cpp`
- [Dependent registration](https://github.com/kcarloshl/sistema-funcionarios-dependentes/blob/main/dados.cpp): `dados.cpp`
- [Employee listing](https://github.com/kcarloshl/sistema-funcionarios-dependentes/blob/main/dados.cpp): `dados.cpp`
- [Dependent listing](https://github.com/kcarloshl/sistema-funcionarios-dependentes/blob/main/dados.cpp): `dados.cpp`
- [Employee editing](https://github.com/kcarloshl/sistema-funcionarios-dependentes/blob/main/dados.cpp): `dados.cpp`
- [Dependent editing](https://github.com/kcarloshl/sistema-funcionarios-dependentes/blob/main/dados.cpp): `dados.cpp`
- [Employee deletion](https://github.com/kcarloshl/sistema-funcionarios-dependentes/blob/main/dados.cpp): `dados.cpp`
- [Dependent cleanup](https://github.com/kcarloshl/sistema-funcionarios-dependentes/blob/main/dados.cpp): `dados.cpp`

### Runtime state

- [Record vectors](https://github.com/kcarloshl/sistema-funcionarios-dependentes/blob/main/programa.cpp): `programa.cpp`

### Other components

- **Terminal user**

## Connections

- Terminal user → Interactive menu: chooses option (evidence: `menu.cpp`)
- Application loop → Interactive menu: calls (evidence: `programa.cpp`)
- Interactive menu → Application loop: returns option (evidence: `menu.cpp`)
- Application loop → Record vectors: initializes (evidence: `programa.cpp`)
- Application loop → Employee registration: dispatches registration (evidence: `programa.cpp`)
- Application loop → Dependent registration: dispatches registration (evidence: `programa.cpp`)
- Application loop → Employee listing: dispatches listing (evidence: `programa.cpp`)
- Application loop → Dependent listing: dispatches listing (evidence: `programa.cpp`)
- Application loop → Employee editing: dispatches editing (evidence: `programa.cpp`)
- Application loop → Dependent editing: dispatches editing (evidence: `programa.cpp`)
- Application loop → Employee deletion: dispatches deletion (evidence: `programa.cpp`)
- Application loop → Dependent cleanup: dispatches cleanup (evidence: `programa.cpp`)
- Dependent registration → Record vectors: checks employee CPF (evidence: `dados.cpp`)
- Application loop → Record vectors: stores records (evidence: `programa.cpp`)
- Employee deletion → Dependent cleanup: returns deleted CPF (evidence: `programa.cpp`)
