# johnlopf/encriptador-de-texto architecture

> Architecture diagram of the GitHub repository johnlopf/encriptador-de-texto, 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/johnlopf/encriptador-de-texto
- Repository: https://github.com/johnlopf/encriptador-de-texto

## Overview

This is a small browser-based text encrypter/decrypter. The user enters text in the page, chooses encryption or decryption, and sees the transformed result in the result area. The JavaScript validates input and applies the substitution rules; the same script updates the displayed result. The README also describes copying results, but the shown copy handler is commented out, so that capability is documented rather than confirmed in the sampled runtime code.

Main entry points: [`index.html`](https://github.com/johnlopf/encriptador-de-texto/blob/main/index.html) (Text interface), [`script.js`](https://github.com/johnlopf/encriptador-de-texto/blob/main/script.js) (Encrypt / decrypt)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["Page interface"]
  node_page["Text interface<br/>[index.html]"]
  node_styles["Page styling<br/>[style.css]"]
end

subgraph group_logic["Text processing"]
  node_transform["Encrypt / decrypt<br/>[script.js]"]
end

subgraph group_presentation["Presentation"]
  node_result["Result display<br/>[script.js]"]
end

node_user(("User"))
node_clipboard["Browser clipboard"]

node_user -->|"enters text"| node_page
node_page -->|"dispatches action"| node_transform
node_transform -->|"shows result"| node_result
node_user -.->|"requests copy"| node_page
node_page -.->|"copies result"| node_clipboard

click node_page "https://github.com/johnlopf/encriptador-de-texto/blob/main/index.html"
click node_styles "https://github.com/johnlopf/encriptador-de-texto/blob/main/style.css"
click node_transform "https://github.com/johnlopf/encriptador-de-texto/blob/main/script.js"
click node_result "https://github.com/johnlopf/encriptador-de-texto/blob/main/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_page,node_styles,node_user,node_clipboard toneBlue
class node_transform toneAmber
class node_result toneMint
```

## Components

### Page interface

- [Text interface](https://github.com/johnlopf/encriptador-de-texto/blob/main/index.html): `index.html`
- [Page styling](https://github.com/johnlopf/encriptador-de-texto/blob/main/style.css): `style.css`

### Text processing

- [Encrypt / decrypt](https://github.com/johnlopf/encriptador-de-texto/blob/main/script.js): `script.js`

### Presentation

- [Result display](https://github.com/johnlopf/encriptador-de-texto/blob/main/script.js): `script.js`

### Other components

- **User**
- **Browser clipboard**

## Connections

- User → Text interface: enters text (evidence: `README.md`)
- Text interface → Encrypt / decrypt: dispatches action (evidence: `README.md`)
- Encrypt / decrypt → Result display: shows result (evidence: `script.js`)
- User → Text interface: requests copy (evidence: `README.md`)
- Text interface → Browser clipboard: copies result (evidence: `README.md`)
