# leothomsneves/calculadora-de-atributos architecture

> Architecture diagram of the GitHub repository leothomsneves/calculadora-de-atributos, 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/leothomsneves/calculadora-de-atributos
- Repository: https://github.com/leothomsneves/calculadora-de-atributos

## Overview

This is a browser-based Tormenta20 character-creation calculator. The user selects a race, applies its attribute modifiers, distributes the base attribute points, and adds optional bonuses; the calculator updates attribute totals. The sampled JavaScript shows race modifiers and bonus actions feeding total-calculation logic. The README documents the overall workflow, but the HTML and the rest of the JavaScript were not sampled, so UI wiring and unsampled implementation details are not mapped.

Main entry points: [`index.html`](https://github.com/leothomsneves/calculadora-de-atributos/blob/master/index.html) (Calculator interface), [`Script.js`](https://github.com/leothomsneves/calculadora-de-atributos/blob/master/Script.js) (Race modifiers)

## Diagram (Mermaid)

```mermaid
flowchart TD

node_player(("Player"))
node_interface["Calculator interface<br/>[index.html]"]
node_race["Race modifiers<br/>[Script.js]"]
node_allocation["Point allocation<br/>[Script.js]"]
node_bonuses["Attribute bonuses<br/>[Script.js]"]
node_totals["Attribute totals<br/>[Script.js]"]

node_player -->|"uses"| node_interface
node_interface -->|"selects race"| node_race
node_interface -->|"distributes points"| node_allocation
node_interface -->|"adds bonuses"| node_bonuses
node_race -->|"updates totals"| node_totals
node_bonuses -->|"updates totals"| node_totals

click node_interface "https://github.com/leothomsneves/calculadora-de-atributos/blob/master/index.html"
click node_race "https://github.com/leothomsneves/calculadora-de-atributos/blob/master/Script.js"
click node_allocation "https://github.com/leothomsneves/calculadora-de-atributos/blob/master/Script.js"
click node_bonuses "https://github.com/leothomsneves/calculadora-de-atributos/blob/master/Script.js"
click node_totals "https://github.com/leothomsneves/calculadora-de-atributos/blob/master/Script.js"

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_player toneIndigo
class node_interface,node_race,node_allocation,node_bonuses,node_totals toneTeal
```

## Components

### Other components

- **Player**
- [Calculator interface](https://github.com/leothomsneves/calculadora-de-atributos/blob/master/index.html): `index.html`
- [Race modifiers](https://github.com/leothomsneves/calculadora-de-atributos/blob/master/Script.js): `Script.js`
- [Point allocation](https://github.com/leothomsneves/calculadora-de-atributos/blob/master/Script.js): `Script.js`
- [Attribute bonuses](https://github.com/leothomsneves/calculadora-de-atributos/blob/master/Script.js): `Script.js`
- [Attribute totals](https://github.com/leothomsneves/calculadora-de-atributos/blob/master/Script.js): `Script.js`

## Connections

- Player → Calculator interface: uses (evidence: `README.md`)
- Calculator interface → Race modifiers: selects race (evidence: `README.md`)
- Calculator interface → Point allocation: distributes points (evidence: `README.md`)
- Calculator interface → Attribute bonuses: adds bonuses (evidence: `README.md`)
- Race modifiers → Attribute totals: updates totals (evidence: `Script.js`)
- Attribute bonuses → Attribute totals: updates totals (evidence: `Script.js`)
