# d0nb0t69/tarjeta-perforada1 architecture

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

- Interactive diagram: https://gitdiagram.com/d0nb0t69/tarjeta-perforada1
- Repository: https://github.com/d0nb0t69/tarjeta-perforada1

## Overview

This is a small client/server web app that simulates IBM 029 punched-card encoding. The user enters text in the browser; JavaScript posts it to the local Flask server, which validates the input, looks up each character’s Hollerith rows, and returns columns for the browser to draw. The Python launcher starts the server and opens the local page. The tree identifies the template, but its contents were not sampled, so its links to browser assets are not asserted.

Main entry points: [`servidor.py`](https://github.com/d0nb0t69/tarjeta-perforada1/blob/main/servidor.py) (Flask routes), [`static/js/tarjeta.js`](https://github.com/d0nb0t69/tarjeta-perforada1/blob/main/static/js/tarjeta.js) (Card interface), [`main.py`](https://github.com/d0nb0t69/tarjeta-perforada1/blob/main/main.py) (App launcher), [`templates/index.html`](https://github.com/d0nb0t69/tarjeta-perforada1/blob/main/templates/index.html) (Page template)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Local server"]
  node_launcher["App launcher<br/>[main.py]"]
  node_server["Flask routes<br/>[servidor.py]"]
end

subgraph group_client["Browser interface"]
  node_page["Page template<br/>[index.html]"]
  node_client_js["Card interface<br/>[tarjeta.js]"]
end

subgraph group_encoding["Card encoding"]
  node_hollerith["Hollerith codes<br/>[codigos.py]"]
end

node_user(("User"))

node_launcher -->|"starts"| node_server
node_launcher -->|"opens browser"| node_user
node_user -->|"enters text"| node_client_js
node_client_js -->|"posts text"| node_server
node_server -->|"renders"| node_page
node_server -->|"looks up rows"| node_hollerith
node_server -->|"returns columns"| node_client_js
node_client_js -->|"draws card"| node_user

click node_launcher "https://github.com/d0nb0t69/tarjeta-perforada1/blob/main/main.py"
click node_server "https://github.com/d0nb0t69/tarjeta-perforada1/blob/main/servidor.py"
click node_page "https://github.com/d0nb0t69/tarjeta-perforada1/blob/main/templates/index.html"
click node_client_js "https://github.com/d0nb0t69/tarjeta-perforada1/blob/main/static/js/tarjeta.js"
click node_hollerith "https://github.com/d0nb0t69/tarjeta-perforada1/blob/main/codigos.py"

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_launcher,node_server,node_user toneBlue
class node_page,node_client_js toneAmber
class node_hollerith toneMint
```

## Components

### Local server

- [App launcher](https://github.com/d0nb0t69/tarjeta-perforada1/blob/main/main.py): `main.py`
- [Flask routes](https://github.com/d0nb0t69/tarjeta-perforada1/blob/main/servidor.py): `servidor.py`

### Browser interface

- [Page template](https://github.com/d0nb0t69/tarjeta-perforada1/blob/main/templates/index.html): `templates/index.html`
- [Card interface](https://github.com/d0nb0t69/tarjeta-perforada1/blob/main/static/js/tarjeta.js): `static/js/tarjeta.js`

### Card encoding

- [Hollerith codes](https://github.com/d0nb0t69/tarjeta-perforada1/blob/main/codigos.py): `codigos.py`

### Other components

- **User**

## Connections

- App launcher → Flask routes: starts (evidence: `main.py`)
- App launcher → User: opens browser (evidence: `main.py`)
- User → Card interface: enters text (evidence: `static/js/tarjeta.js`)
- Card interface → Flask routes: posts text (evidence: `static/js/tarjeta.js`)
- Flask routes → Page template: renders (evidence: `servidor.py`)
- Flask routes → Hollerith codes: looks up rows (evidence: `servidor.py`)
- Flask routes → Card interface: returns columns (evidence: `servidor.py`)
- Card interface → User: draws card (evidence: `static/js/tarjeta.js`)
