# gustavohenriquedemoura/trabalho architecture

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

## Overview

This is a small interactive RPG campaign and player manager. The user selects a database, then uses a menu to create, list, associate, and delete sessions and players. The single source file contains the menu, actions, ORM models, and connection setup. SQLite and MySQL are selectable through environment-configured SQLAlchemy URLs. The README is empty, so capabilities and relationships are based on the RPG.py excerpt; the graph does not imply unshown database configuration details.

Main entry points: [`RPG.py`](https://github.com/gustavohenriquedemoura/trabalho/blob/main/RPG.py) (Interactive menu)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Campaign manager"]
  node_menu["Interactive menu<br/>[RPG.py]"]
  node_actions["Campaign and player actions<br/>[RPG.py]"]
end

subgraph group_data["Persistence"]
  node_models["Session and player models<br/>[RPG.py]"]
  node_connection["Database connection<br/>[RPG.py]"]
  node_database[("SQLite or MySQL")]
end

node_user(("User"))

node_user -->|"uses"| node_menu
node_menu -->|"selects database"| node_connection
node_menu -->|"dispatches"| node_actions
node_actions -->|"queries and updates"| node_models
node_connection -->|"creates tables"| node_models
node_connection -->|"connects"| node_database
node_actions -->|"reads and writes"| node_database

click node_menu "https://github.com/gustavohenriquedemoura/trabalho/blob/main/RPG.py"
click node_actions "https://github.com/gustavohenriquedemoura/trabalho/blob/main/RPG.py"
click node_models "https://github.com/gustavohenriquedemoura/trabalho/blob/main/RPG.py"
click node_connection "https://github.com/gustavohenriquedemoura/trabalho/blob/main/RPG.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_menu,node_actions,node_user toneBlue
class node_models,node_connection,node_database toneAmber
```

## Components

### Campaign manager

- [Interactive menu](https://github.com/gustavohenriquedemoura/trabalho/blob/main/RPG.py): `RPG.py`
- [Campaign and player actions](https://github.com/gustavohenriquedemoura/trabalho/blob/main/RPG.py): `RPG.py`

### Persistence

- [Session and player models](https://github.com/gustavohenriquedemoura/trabalho/blob/main/RPG.py): `RPG.py`
- [Database connection](https://github.com/gustavohenriquedemoura/trabalho/blob/main/RPG.py): `RPG.py`
- **SQLite or MySQL**

### Other components

- **User**

## Connections

- User → Interactive menu: uses (evidence: `RPG.py`)
- Interactive menu → Database connection: selects database (evidence: `RPG.py`)
- Interactive menu → Campaign and player actions: dispatches (evidence: `RPG.py`)
- Campaign and player actions → Session and player models: queries and updates (evidence: `RPG.py`)
- Database connection → Session and player models: creates tables (evidence: `RPG.py`)
- Database connection → SQLite or MySQL: connects (evidence: `RPG.py`)
- Campaign and player actions → SQLite or MySQL: reads and writes (evidence: `RPG.py`)
