# vmkayser/vivelahistoria architecture

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

- Interactive diagram: https://gitdiagram.com/vmkayser/vivelahistoria
- Repository: https://github.com/vmkayser/vivelahistoria

## Overview

Mi Ciudad Sucre is a browser-based, navigable 3D reconstruction of central Sucre, complemented by a map, historical content, and a community correction workflow. A visitor opens the city experience, navigates the scene, frames a correction, and submits it with images for review; the web app also exposes map and chronicle features. Blender scripts generate city assets, while the README describes a separate educational Casa de la Libertad game whose runtime files are not present in the supplied tree. Edges cite README statements or shown source references; unsampled runtime wiring is omitted.

Main entry points: [`web/src/ciudad/Experiencia.tsx`](https://github.com/vmkayser/vivelahistoria/blob/main/web/src/ciudad/Experiencia.tsx) (City experience), [`blender/kit/nucleo.py`](https://github.com/vmkayser/vivelahistoria/blob/main/blender/kit/nucleo.py) (Geometry toolkit), [`web/src/ciudad/interfaz/revision/useRevision.ts`](https://github.com/vmkayser/vivelahistoria/blob/main/web/src/ciudad/interfaz/revision/useRevision.ts) (Review workflow), [`blender/zonas/claude/piezas_claude.py`](https://github.com/vmkayser/vivelahistoria/blob/main/blender/zonas/claude/piezas_claude.py) (City block models)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web experience"]
  node_webapp["Web application<br/>[layout.tsx]"]
  node_citypage["City page<br/>[page.tsx]"]
end

subgraph group_city["3D city"]
  node_experience["City experience<br/>[Experiencia.tsx]"]
  node_godot["Godot city engine"]
  node_citymodels["City models<br/>[CatalogoModelos.ts]"]
end

subgraph group_review["Corrections"]
  node_reviewui["Review interface"]
  node_reviewstate["Review workflow<br/>[useRevision.ts]"]
  node_reviewclient["Review client"]
  node_images["Review images<br/>[Imagenes.ts]"]
  node_reviewapi["Review endpoints<br/>[route.ts]"]
  node_reviewstore[("Review storage")]
end

subgraph group_mapcontent["Map and history"]
  node_map["Interactive map<br/>[page.tsx]"]
  node_mapgeo["Map geometry<br/>[geo.ts]"]
  node_chronicle["Historical chronicle<br/>[responder.ts]"]
end

subgraph group_assets["Asset creation"]
  node_blenderkit["Geometry toolkit<br/>[nucleo.py]"]
  node_citydata[("Urban data<br/>[datos.py]")]
  node_architecture["Architecture pieces<br/>[arquitectura.py]"]
  node_cityblocks["City block models<br/>[piezas_claude.py]"]
  node_sectionbuild["Pilot section<br/>[construir.py]"]
  node_glbtools["GLB processing<br/>[glb.py]"]
  node_museum["Museum scene assets"]
end

node_visitor(("Visitor"))

node_visitor -->|"opens"| node_webapp
node_webapp -->|"routes to"| node_citypage
node_visitor -->|"navigates"| node_experience
node_citypage -.->|"presents"| node_experience
node_experience -.->|"hosts"| node_godot
node_experience -.->|"loads"| node_citymodels
node_visitor -->|"explores"| node_map
node_map -.->|"uses"| node_mapgeo
node_visitor -->|"asks"| node_chronicle
node_visitor -->|"submits"| node_reviewui
node_reviewui -->|"uses"| node_reviewstate
node_reviewstate -->|"creates client"| node_reviewclient
node_reviewstate -->|"composes"| node_images
node_reviewclient -->|"fetches revisions"| node_reviewapi
node_reviewapi -.->|"persists"| node_reviewstore
node_sectionbuild -->|"uses"| node_citydata
node_sectionbuild -->|"uses"| node_blenderkit
node_cityblocks -->|"uses"| node_architecture
node_cityblocks -->|"uses"| node_blenderkit
node_architecture -->|"builds with"| node_blenderkit
node_blenderkit -->|"uses"| node_citydata
node_glbtools -.->|"supports assets"| node_godot
node_visitor -->|"visits"| node_museum

click node_webapp "https://github.com/vmkayser/vivelahistoria/blob/main/web/src/app/layout.tsx"
click node_citypage "https://github.com/vmkayser/vivelahistoria/blob/main/web/src/app/ciudad/page.tsx"
click node_experience "https://github.com/vmkayser/vivelahistoria/blob/main/web/src/ciudad/Experiencia.tsx"
click node_godot "https://github.com/vmkayser/vivelahistoria/tree/main/ciudad3d"
click node_citymodels "https://github.com/vmkayser/vivelahistoria/blob/main/web/src/ciudad/datos/CatalogoModelos.ts"
click node_map "https://github.com/vmkayser/vivelahistoria/blob/main/web/src/app/mapa/page.tsx"
click node_mapgeo "https://github.com/vmkayser/vivelahistoria/blob/main/web/src/mapa/geo.ts"
click node_chronicle "https://github.com/vmkayser/vivelahistoria/blob/main/web/src/cronista/responder.ts"
click node_reviewui "https://github.com/vmkayser/vivelahistoria/blob/main/web/src/ciudad/interfaz/revision/FormularioRevision.tsx"
click node_reviewstate "https://github.com/vmkayser/vivelahistoria/blob/main/web/src/ciudad/interfaz/revision/useRevision.ts"
click node_reviewclient "https://github.com/vmkayser/vivelahistoria/blob/main/web/src/ciudad/revision/ClienteRevisiones.ts"
click node_images "https://github.com/vmkayser/vivelahistoria/blob/main/web/src/ciudad/revision/Imagenes.ts"
click node_reviewapi "https://github.com/vmkayser/vivelahistoria/blob/main/web/src/app/api/revisiones/route.ts"
click node_reviewstore "https://github.com/vmkayser/vivelahistoria/blob/main/web/src/servidor/AlmacenRevisiones.ts"
click node_blenderkit "https://github.com/vmkayser/vivelahistoria/blob/main/blender/kit/nucleo.py"
click node_citydata "https://github.com/vmkayser/vivelahistoria/blob/main/blender/kit/datos.py"
click node_architecture "https://github.com/vmkayser/vivelahistoria/blob/main/blender/kit/arquitectura.py"
click node_cityblocks "https://github.com/vmkayser/vivelahistoria/blob/main/blender/zonas/claude/piezas_claude.py"
click node_sectionbuild "https://github.com/vmkayser/vivelahistoria/blob/main/blender/secciones/construir.py"
click node_glbtools "https://github.com/vmkayser/vivelahistoria/blob/main/ciudad3d/herramientas/glb.py"
click node_museum "https://github.com/vmkayser/vivelahistoria/blob/main/museo_interior/blender/casa_libertad_1809.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_webapp,node_citypage toneBlue
class node_experience,node_godot,node_citymodels toneAmber
class node_reviewui,node_reviewstate,node_reviewclient,node_images,node_reviewapi,node_reviewstore toneMint
class node_map,node_mapgeo,node_chronicle toneRose
class node_blenderkit,node_citydata,node_architecture,node_cityblocks,node_sectionbuild,node_glbtools,node_museum,node_visitor toneIndigo
```

## Components

### Web experience

- [Web application](https://github.com/vmkayser/vivelahistoria/blob/main/web/src/app/layout.tsx): `web/src/app/layout.tsx`
- [City page](https://github.com/vmkayser/vivelahistoria/blob/main/web/src/app/ciudad/page.tsx): `web/src/app/ciudad/page.tsx`

### 3D city

- [City experience](https://github.com/vmkayser/vivelahistoria/blob/main/web/src/ciudad/Experiencia.tsx): `web/src/ciudad/Experiencia.tsx`
- [Godot city engine](https://github.com/vmkayser/vivelahistoria/tree/main/ciudad3d): `ciudad3d`
- [City models](https://github.com/vmkayser/vivelahistoria/blob/main/web/src/ciudad/datos/CatalogoModelos.ts): `web/src/ciudad/datos/CatalogoModelos.ts`

### Corrections

- [Review interface](https://github.com/vmkayser/vivelahistoria/blob/main/web/src/ciudad/interfaz/revision/FormularioRevision.tsx): `web/src/ciudad/interfaz/revision/FormularioRevision.tsx`
- [Review workflow](https://github.com/vmkayser/vivelahistoria/blob/main/web/src/ciudad/interfaz/revision/useRevision.ts): `web/src/ciudad/interfaz/revision/useRevision.ts`
- [Review client](https://github.com/vmkayser/vivelahistoria/blob/main/web/src/ciudad/revision/ClienteRevisiones.ts): `web/src/ciudad/revision/ClienteRevisiones.ts`
- [Review images](https://github.com/vmkayser/vivelahistoria/blob/main/web/src/ciudad/revision/Imagenes.ts): `web/src/ciudad/revision/Imagenes.ts`
- [Review endpoints](https://github.com/vmkayser/vivelahistoria/blob/main/web/src/app/api/revisiones/route.ts): `web/src/app/api/revisiones/route.ts`
- [Review storage](https://github.com/vmkayser/vivelahistoria/blob/main/web/src/servidor/AlmacenRevisiones.ts): `web/src/servidor/AlmacenRevisiones.ts`

### Map and history

- [Interactive map](https://github.com/vmkayser/vivelahistoria/blob/main/web/src/app/mapa/page.tsx): `web/src/app/mapa/page.tsx`
- [Map geometry](https://github.com/vmkayser/vivelahistoria/blob/main/web/src/mapa/geo.ts): `web/src/mapa/geo.ts`
- [Historical chronicle](https://github.com/vmkayser/vivelahistoria/blob/main/web/src/cronista/responder.ts): `web/src/cronista/responder.ts`

### Asset creation

- [Geometry toolkit](https://github.com/vmkayser/vivelahistoria/blob/main/blender/kit/nucleo.py): `blender/kit/nucleo.py`
- [Urban data](https://github.com/vmkayser/vivelahistoria/blob/main/blender/kit/datos.py): `blender/kit/datos.py`
- [Architecture pieces](https://github.com/vmkayser/vivelahistoria/blob/main/blender/kit/arquitectura.py): `blender/kit/arquitectura.py`
- [City block models](https://github.com/vmkayser/vivelahistoria/blob/main/blender/zonas/claude/piezas_claude.py): `blender/zonas/claude/piezas_claude.py`
- [Pilot section](https://github.com/vmkayser/vivelahistoria/blob/main/blender/secciones/construir.py): `blender/secciones/construir.py`
- [GLB processing](https://github.com/vmkayser/vivelahistoria/blob/main/ciudad3d/herramientas/glb.py): `ciudad3d/herramientas/glb.py`
- [Museum scene assets](https://github.com/vmkayser/vivelahistoria/blob/main/museo_interior/blender/casa_libertad_1809.py): `museo_interior/blender/casa_libertad_1809.py`

### Other components

- **Visitor**

## Connections

- Visitor → Web application: opens
- Web application → City page: routes to
- Visitor → City experience: navigates
- City page → City experience: presents
- City experience → Godot city engine: hosts
- City experience → City models: loads
- Visitor → Interactive map: explores
- Interactive map → Map geometry: uses
- Visitor → Historical chronicle: asks
- Visitor → Review interface: submits
- Review interface → Review workflow: uses (evidence: `web/src/ciudad/interfaz/revision/FormularioRevision.tsx`)
- Review workflow → Review client: creates client (evidence: `web/src/ciudad/interfaz/revision/useRevision.ts`)
- Review workflow → Review images: composes (evidence: `web/src/ciudad/interfaz/revision/useRevision.ts`)
- Review client → Review endpoints: fetches revisions (evidence: `web/src/ciudad/revision/ClienteRevisiones.ts`)
- Review endpoints → Review storage: persists
- Pilot section → Urban data: uses (evidence: `blender/secciones/construir.py`)
- Pilot section → Geometry toolkit: uses (evidence: `blender/secciones/construir.py`)
- City block models → Architecture pieces: uses (evidence: `blender/zonas/claude/piezas_claude.py`)
- City block models → Geometry toolkit: uses (evidence: `blender/zonas/claude/piezas_claude.py`)
- Architecture pieces → Geometry toolkit: builds with (evidence: `blender/kit/arquitectura.py`)
- Geometry toolkit → Urban data: uses (evidence: `blender/kit/arquitectura.py`)
- GLB processing → Godot city engine: supports assets (evidence: `ciudad3d/herramientas/empaquetar.py`)
- Visitor → Museum scene assets: visits
