# leandro152/calculadora architecture

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

- Interactive diagram: https://gitdiagram.com/leandro152/calculadora
- Repository: https://github.com/leandro152/calculadora

## Overview

Calculadora is a browser-based calculator with arithmetic entry, live result display, editing/reset controls, and a night-mode toggle. The sampled JavaScript shows the event handlers and DOM updates; the README only names the product, and the HTML and CSS were not sampled, so their detailed structure and styling relationships are not inferred.

Main entry points: [`Calculadora-main/index.html`](https://github.com/leandro152/calculadora/blob/main/Calculadora-main/index.html) (Key controls), [`Calculadora-main/main.js`](https://github.com/leandro152/calculadora/blob/main/Calculadora-main/main.js) (Number and sign entry), [`Calculadora-main/style.css`](https://github.com/leandro152/calculadora/blob/main/Calculadora-main/style.css) (Calculator styles)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["Calculator interface"]
  node_page["Calculator page<br/>[index.html]"]
  node_controls["Key controls<br/>[index.html]"]
  node_expression["Expression display<br/>[index.html]"]
  node_result["Result display<br/>[index.html]"]
end

subgraph group_arithmetic["Arithmetic"]
  node_entry["Number and sign entry<br/>[main.js]"]
  node_evaluate["Result calculation<br/>[main.js]"]
  node_edit["Delete and reset<br/>[main.js]"]
end

subgraph group_appearance["Appearance"]
  node_theme["Night mode<br/>[main.js]"]
  node_styles["Calculator styles<br/>[style.css]"]
end

node_user(("User"))

node_user -->|"clicks"| node_controls
node_controls -->|"registers clicks"| node_entry
node_entry -->|"updates"| node_expression
node_entry -->|"calculates"| node_evaluate
node_evaluate -->|"reads expression"| node_expression
node_evaluate -->|"writes result"| node_result
node_controls -->|"registers clicks"| node_edit
node_edit -->|"edits or clears"| node_expression
node_edit -->|"resets display"| node_result
node_controls -->|"registers toggle"| node_theme
node_theme -->|"toggles classes"| node_styles

click node_page "https://github.com/leandro152/calculadora/blob/main/Calculadora-main/index.html"
click node_controls "https://github.com/leandro152/calculadora/blob/main/Calculadora-main/index.html"
click node_expression "https://github.com/leandro152/calculadora/blob/main/Calculadora-main/index.html"
click node_result "https://github.com/leandro152/calculadora/blob/main/Calculadora-main/index.html"
click node_entry "https://github.com/leandro152/calculadora/blob/main/Calculadora-main/main.js"
click node_evaluate "https://github.com/leandro152/calculadora/blob/main/Calculadora-main/main.js"
click node_edit "https://github.com/leandro152/calculadora/blob/main/Calculadora-main/main.js"
click node_theme "https://github.com/leandro152/calculadora/blob/main/Calculadora-main/main.js"
click node_styles "https://github.com/leandro152/calculadora/blob/main/Calculadora-main/style.css"

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_page,node_controls,node_expression,node_result,node_user toneBlue
class node_entry,node_evaluate,node_edit toneAmber
class node_theme,node_styles toneMint
```

## Components

### Calculator interface

- [Calculator page](https://github.com/leandro152/calculadora/blob/main/Calculadora-main/index.html): `Calculadora-main/index.html`
- [Key controls](https://github.com/leandro152/calculadora/blob/main/Calculadora-main/index.html): `Calculadora-main/index.html`
- [Expression display](https://github.com/leandro152/calculadora/blob/main/Calculadora-main/index.html): `Calculadora-main/index.html`
- [Result display](https://github.com/leandro152/calculadora/blob/main/Calculadora-main/index.html): `Calculadora-main/index.html`

### Arithmetic

- [Number and sign entry](https://github.com/leandro152/calculadora/blob/main/Calculadora-main/main.js): `Calculadora-main/main.js`
- [Result calculation](https://github.com/leandro152/calculadora/blob/main/Calculadora-main/main.js): `Calculadora-main/main.js`
- [Delete and reset](https://github.com/leandro152/calculadora/blob/main/Calculadora-main/main.js): `Calculadora-main/main.js`

### Appearance

- [Night mode](https://github.com/leandro152/calculadora/blob/main/Calculadora-main/main.js): `Calculadora-main/main.js`
- [Calculator styles](https://github.com/leandro152/calculadora/blob/main/Calculadora-main/style.css): `Calculadora-main/style.css`

### Other components

- **User**

## Connections

- User → Key controls: clicks
- Key controls → Number and sign entry: registers clicks (evidence: `Calculadora-main/main.js`)
- Number and sign entry → Expression display: updates (evidence: `Calculadora-main/main.js`)
- Number and sign entry → Result calculation: calculates (evidence: `Calculadora-main/main.js`)
- Result calculation → Expression display: reads expression (evidence: `Calculadora-main/main.js`)
- Result calculation → Result display: writes result (evidence: `Calculadora-main/main.js`)
- Key controls → Delete and reset: registers clicks (evidence: `Calculadora-main/main.js`)
- Delete and reset → Expression display: edits or clears (evidence: `Calculadora-main/main.js`)
- Delete and reset → Result display: resets display (evidence: `Calculadora-main/main.js`)
- Key controls → Night mode: registers toggle (evidence: `Calculadora-main/main.js`)
- Night mode → Calculator styles: toggles classes (evidence: `Calculadora-main/main.js`)
