# bylopezz/simulador-memoria architecture

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

- Interactive diagram: https://gitdiagram.com/bylopezz/simulador-memoria
- Repository: https://github.com/bylopezz/simulador-memoria

## Overview

This is a Spanish-language educational systems simulator with three principal capabilities: a computer-science glossary, RAM process simulation, and an airline-seat concurrency simulation. Users interact through the browser; glossary data is served by Flask and stored in SQLite, while the sampled browser code also contains its own RAM simulator. Backend RAM endpoints are visible in the server excerpt, but their connection to the browser is not established by the sampled client code. The flight simulation uses threaded agents and synchronized or unsynchronized reservations. Evidence is limited to the provided source excerpts; the README is empty.

Main entry points: [`backend/app.py`](https://github.com/bylopezz/simulador-memoria/blob/main/backend/app.py) (Flight API), [`frontend/app.js`](https://github.com/bylopezz/simulador-memoria/blob/main/frontend/app.js) (Browser UI), [`backend/wiki.db`](https://github.com/bylopezz/simulador-memoria/blob/main/backend/wiki.db) (Publication Store)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_learning["Learning Library"]
  node_browser["Browser UI<br/>[app.js]"]
  node_glossary["Glossary<br/>[app.js]"]
end

subgraph group_memory["RAM Simulation"]
  node_browser_ram["Browser RAM Simulator<br/>[app.js]"]
  node_backend_ram["Backend RAM API<br/>[app.py]"]
  node_ram_state["RAM State<br/>[app.py]"]
end

subgraph group_flight["Flight Concurrency"]
  node_flight_ui["Flight Simulator UI<br/>[app.js]"]
  node_flight_api["Flight API<br/>[app.py]"]
  node_reservation_system["Reservation System<br/>[app.py]"]
  node_seat_locks["Seat Locks<br/>[app.py]"]
  node_agent_threads["Agent Threads<br/>[app.py]"]
end

subgraph group_server["Web Backend"]
  node_publications_api["Publications API<br/>[app.py]"]
  node_publication_store[("Publication Store<br/>[wiki.db]")]
end

node_learner(("User"))

node_learner -->|"uses"| node_browser
node_browser -->|"selects"| node_glossary
node_glossary -->|"fetches"| node_publications_api
node_publications_api -->|"reads and writes"| node_publication_store
node_learner -->|"uses"| node_browser_ram
node_browser_ram -->|"renders"| node_browser
node_backend_ram -->|"updates"| node_ram_state
node_learner -->|"uses"| node_flight_ui
node_flight_ui -->|"requests state and actions"| node_flight_api
node_flight_api -->|"dispatches reservations"| node_reservation_system
node_reservation_system -->|"locks seats"| node_seat_locks
node_flight_api -->|"starts agents"| node_agent_threads
node_agent_threads -->|"compete for seats"| node_reservation_system

click node_browser "https://github.com/bylopezz/simulador-memoria/blob/main/frontend/app.js"
click node_glossary "https://github.com/bylopezz/simulador-memoria/blob/main/frontend/app.js"
click node_publications_api "https://github.com/bylopezz/simulador-memoria/blob/main/backend/app.py"
click node_publication_store "https://github.com/bylopezz/simulador-memoria/blob/main/backend/wiki.db"
click node_browser_ram "https://github.com/bylopezz/simulador-memoria/blob/main/frontend/app.js"
click node_backend_ram "https://github.com/bylopezz/simulador-memoria/blob/main/backend/app.py"
click node_ram_state "https://github.com/bylopezz/simulador-memoria/blob/main/backend/app.py"
click node_flight_ui "https://github.com/bylopezz/simulador-memoria/blob/main/frontend/app.js"
click node_flight_api "https://github.com/bylopezz/simulador-memoria/blob/main/backend/app.py"
click node_reservation_system "https://github.com/bylopezz/simulador-memoria/blob/main/backend/app.py"
click node_seat_locks "https://github.com/bylopezz/simulador-memoria/blob/main/backend/app.py"
click node_agent_threads "https://github.com/bylopezz/simulador-memoria/blob/main/backend/app.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_browser,node_glossary,node_learner toneBlue
class node_browser_ram,node_backend_ram,node_ram_state toneAmber
class node_flight_ui,node_flight_api,node_reservation_system,node_seat_locks,node_agent_threads toneMint
class node_publications_api,node_publication_store toneRose
```

## Components

### Learning Library

- [Browser UI](https://github.com/bylopezz/simulador-memoria/blob/main/frontend/app.js): `frontend/app.js`
- [Glossary](https://github.com/bylopezz/simulador-memoria/blob/main/frontend/app.js): `frontend/app.js`

### RAM Simulation

- [Browser RAM Simulator](https://github.com/bylopezz/simulador-memoria/blob/main/frontend/app.js): `frontend/app.js`
- [Backend RAM API](https://github.com/bylopezz/simulador-memoria/blob/main/backend/app.py): `backend/app.py`
- [RAM State](https://github.com/bylopezz/simulador-memoria/blob/main/backend/app.py): `backend/app.py`

### Flight Concurrency

- [Flight Simulator UI](https://github.com/bylopezz/simulador-memoria/blob/main/frontend/app.js): `frontend/app.js`
- [Flight API](https://github.com/bylopezz/simulador-memoria/blob/main/backend/app.py): `backend/app.py`
- [Reservation System](https://github.com/bylopezz/simulador-memoria/blob/main/backend/app.py): `backend/app.py`
- [Seat Locks](https://github.com/bylopezz/simulador-memoria/blob/main/backend/app.py): `backend/app.py`
- [Agent Threads](https://github.com/bylopezz/simulador-memoria/blob/main/backend/app.py): `backend/app.py`

### Web Backend

- [Publications API](https://github.com/bylopezz/simulador-memoria/blob/main/backend/app.py): `backend/app.py`
- [Publication Store](https://github.com/bylopezz/simulador-memoria/blob/main/backend/wiki.db): `backend/wiki.db`

### Other components

- **User**

## Connections

- User → Browser UI: uses (evidence: `frontend/app.js`)
- Browser UI → Glossary: selects (evidence: `frontend/app.js`)
- Glossary → Publications API: fetches (evidence: `frontend/app.js`)
- Publications API → Publication Store: reads and writes (evidence: `backend/app.py`)
- User → Browser RAM Simulator: uses (evidence: `frontend/app.js`)
- Browser RAM Simulator → Browser UI: renders (evidence: `frontend/app.js`)
- Backend RAM API → RAM State: updates (evidence: `backend/app.py`)
- User → Flight Simulator UI: uses (evidence: `frontend/app.js`)
- Flight Simulator UI → Flight API: requests state and actions (evidence: `frontend/app.js`)
- Flight API → Reservation System: dispatches reservations (evidence: `backend/app.py`)
- Reservation System → Seat Locks: locks seats (evidence: `backend/app.py`)
- Flight API → Agent Threads: starts agents (evidence: `backend/app.py`)
- Agent Threads → Reservation System: compete for seats (evidence: `backend/app.py`)
