# hardless-lgtm/av5-programacao architecture

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

- Interactive diagram: https://gitdiagram.com/hardless-lgtm/av5-programacao
- Repository: https://github.com/hardless-lgtm/av5-programacao

## Overview

This is a Portuguese-language command-line app for managing voice actors, characters, and their contracts in either SQLite or MySQL. The user selects a database, then uses menus to create, list, or delete those records; the functions module handles database setup and CRUD operations, while classes.py defines the relational models and cascade behavior. The source excerpts show these main paths. The package entry point in src/meu_projeto is a separate greeting stub, not the workflow described by README.

Main entry points: [`classes.py`](https://github.com/hardless-lgtm/av5-programacao/blob/main/classes.py) (ORM models), [`main.py`](https://github.com/hardless-lgtm/av5-programacao/blob/main/main.py) (Menus), [`functions.py`](https://github.com/hardless-lgtm/av5-programacao/blob/main/functions.py) (Connection setup)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_cli["Command-line interface"]
  node_menus["Menus<br/>[main.py]"]
end

subgraph group_operations["Record operations"]
  node_connection["Connection setup<br/>[functions.py]"]
  node_actor_ops["Voice actor operations<br/>[functions.py]"]
  node_character_ops["Character operations<br/>[functions.py]"]
  node_contract_ops["Contract operations<br/>[functions.py]"]
end

subgraph group_data["Data model"]
  node_models["ORM models<br/>[classes.py]"]
end

subgraph group_databases["Database backends"]
  node_sqlite[("SQLite database")]
  node_mysql[("MySQL database")]
end

node_user(("User"))

node_user -->|"chooses options"| node_menus
node_menus -->|"selects database"| node_connection
node_menus -->|"routes actor actions"| node_actor_ops
node_menus -->|"routes character actions"| node_character_ops
node_menus -->|"routes contract actions"| node_contract_ops
node_connection -->|"creates tables"| node_models
node_connection -->|"configures"| node_sqlite
node_connection -->|"configures"| node_mysql
node_actor_ops -->|"queries and writes"| node_models
node_character_ops -->|"queries and writes"| node_models
node_contract_ops -->|"queries and writes"| node_models
node_models -->|"relates contract entities"| node_models

click node_menus "https://github.com/hardless-lgtm/av5-programacao/blob/main/main.py"
click node_connection "https://github.com/hardless-lgtm/av5-programacao/blob/main/functions.py"
click node_actor_ops "https://github.com/hardless-lgtm/av5-programacao/blob/main/functions.py"
click node_character_ops "https://github.com/hardless-lgtm/av5-programacao/blob/main/functions.py"
click node_contract_ops "https://github.com/hardless-lgtm/av5-programacao/blob/main/functions.py"
click node_models "https://github.com/hardless-lgtm/av5-programacao/blob/main/classes.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_menus,node_user toneBlue
class node_connection,node_actor_ops,node_character_ops,node_contract_ops toneAmber
class node_models toneMint
class node_sqlite,node_mysql toneRose
```

## Components

### Command-line interface

- [Menus](https://github.com/hardless-lgtm/av5-programacao/blob/main/main.py): `main.py`

### Record operations

- [Connection setup](https://github.com/hardless-lgtm/av5-programacao/blob/main/functions.py): `functions.py`
- [Voice actor operations](https://github.com/hardless-lgtm/av5-programacao/blob/main/functions.py): `functions.py`
- [Character operations](https://github.com/hardless-lgtm/av5-programacao/blob/main/functions.py): `functions.py`
- [Contract operations](https://github.com/hardless-lgtm/av5-programacao/blob/main/functions.py): `functions.py`

### Data model

- [ORM models](https://github.com/hardless-lgtm/av5-programacao/blob/main/classes.py): `classes.py`

### Database backends

- **SQLite database**
- **MySQL database**

### Other components

- **User**

## Connections

- User → Menus: chooses options (evidence: `main.py`)
- Menus → Connection setup: selects database (evidence: `main.py`)
- Menus → Voice actor operations: routes actor actions (evidence: `main.py`)
- Menus → Character operations: routes character actions (evidence: `main.py`)
- Menus → Contract operations: routes contract actions (evidence: `main.py`)
- Connection setup → ORM models: creates tables (evidence: `functions.py`)
- Connection setup → SQLite database: configures (evidence: `functions.py`)
- Connection setup → MySQL database: configures (evidence: `functions.py`)
- Voice actor operations → ORM models: queries and writes (evidence: `functions.py`)
- Character operations → ORM models: queries and writes (evidence: `functions.py`)
- Contract operations → ORM models: queries and writes (evidence: `functions.py`)
- ORM models → ORM models: relates contract entities (evidence: `classes.py`)
