# fabian-4vila/encriptador architecture

> Architecture diagram of the GitHub repository fabian-4vila/encriptador, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-05-06). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/fabian-4vila/encriptador
- Repository: https://github.com/fabian-4vila/encriptador

## Overview

##### Project type and purpose
- This is a simple, front-end only web application (“Encriptador de Texto”) that runs entirely in the browser.
- Purpose: allow users to enter text, apply a basic JavaScript-based encryption algorithm, and reverse it (decryption) in the UI.

##### File structure
- Top-level files:
- index.html – main HTML page
- logica.js – contains the encryption/decryption logic
- reset.css, styleResponsive.css – CSS for styling and responsive layout
- README.md – project description and usage
- No backend, database, or build scripts—everything is static and served directly.

##### README for additional insights
- Confirms it is implemented entirely with HTML, CSS, and JavaScript.
- No mention of external services or build tools—just clone and open index.html.

##### Elements
- User
- Browser
- index.html (View)
- CSS files (Presentation)
- logica.js (Logic)
- public/ assets
- User → Browser
- Browser UI → logica.js
- logica.js → Browser UI

##### Detailed capture of essential elements
- Event binding: e.g., “Encrypt button click → logica.encrypt()”
- DOM manipulation: “logica.js writes encrypted text into output textarea”

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Actor
    User["User"]:::actor

    %% Runtime
    Browser["Browser (Runtime)"]:::frontend

    %% Presentation / View
    subgraph "Presentation / View"
        HTML["index.html"]:::frontend
        CSS1["reset.css"]:::frontend
        CSS2["styleResponsive.css"]:::frontend
    end

    %% Business Logic / Controller
    subgraph "Business Logic / Controller"
        Logic["logica.js"]:::logic
    end

    %% Static Resources / Assets
    subgraph "Static Resources / Assets"
        Assets["public/"]:::assets
    end

    %% Documentation
    Doc["README.md"]:::doc

    %% Connections
    User --> Browser
    Browser --> HTML
    Browser --> CSS1
    Browser --> CSS2
    Browser --> Assets
    HTML -->|"button click event"| Logic
    Logic -->|"DOM update with result"| HTML

    %% Click Events
    click HTML "https://github.com/fabian-4vila/encriptador/blob/main/index.html"
    click CSS1 "https://github.com/fabian-4vila/encriptador/blob/main/reset.css"
    click CSS2 "https://github.com/fabian-4vila/encriptador/blob/main/styleResponsive.css"
    click Logic "https://github.com/fabian-4vila/encriptador/blob/main/logica.js"
    click Assets "https://github.com/fabian-4vila/encriptador/tree/main/public/"
    click Doc "https://github.com/fabian-4vila/encriptador/blob/main/README.md"

    %% Styles
    classDef actor fill:#FFD700,stroke:#333,stroke-width:1px
    classDef frontend fill:#87CEFA,stroke:#333,stroke-width:1px
    classDef logic fill:#90EE90,stroke:#333,stroke-width:1px
    classDef assets fill:#FFE4E1,stroke:#333,stroke-width:1px
    classDef doc fill:#FFDEAD,stroke:#333,stroke-width:1px
```
