# aristoteleso/numero-secreto architecture

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

## Overview

This is a small browser-based secret-number guessing game. The main script selects a secret number, evaluates guesses, updates the page with hints or a win message, and resets the round; displayed text is also sent to ResponsiveVoice for speech. The excerpts do not show how user actions are wired to the game functions, so that interaction is left unconnected.

Main entry points: [`app.js`](https://github.com/aristoteleso/numero-secreto/blob/main/app.js) (Page display)

## Diagram (Mermaid)

```mermaid
flowchart TD

node_player(("Player"))
node_game["Guess handling<br/>[app.js]"]
node_number["Number selection<br/>[app.js]"]
node_display["Page display<br/>[app.js]"]
node_dom["Browser DOM"]
node_voice["ResponsiveVoice"]

node_game -->|"selects on reset"| node_number
node_game -->|"requests messages"| node_display
node_display -->|"updates elements"| node_dom
node_display -->|"speaks text"| node_voice

click node_game "https://github.com/aristoteleso/numero-secreto/blob/main/app.js"
click node_number "https://github.com/aristoteleso/numero-secreto/blob/main/app.js"
click node_display "https://github.com/aristoteleso/numero-secreto/blob/main/app.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,node_voice toneIndigo
class node_game,node_number,node_display toneTeal
class node_dom toneBlue
```

## Components

### Other components

- **Player**
- [Guess handling](https://github.com/aristoteleso/numero-secreto/blob/main/app.js): `app.js`
- [Number selection](https://github.com/aristoteleso/numero-secreto/blob/main/app.js): `app.js`
- [Page display](https://github.com/aristoteleso/numero-secreto/blob/main/app.js): `app.js`
- **Browser DOM**
- **ResponsiveVoice**

## Connections

- Guess handling → Number selection: selects on reset (evidence: `app.js`)
- Guess handling → Page display: requests messages (evidence: `app.js`)
- Page display → Browser DOM: updates elements (evidence: `app.js`)
- Page display → ResponsiveVoice: speaks text (evidence: `app.js`)
