# kevinrcorrales/momento3 architecture

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

- Interactive diagram: https://gitdiagram.com/kevinrcorrales/momento3
- Repository: https://github.com/kevinrcorrales/momento3

## Overview

1. **Project purpose**
   - This repository is a **plain Java elevator simulator** (“Sistema de Ascensor Java”).
   - The architecture is centered on modeling elevator behavior as interacting objects rather than using a framework or distributed system.

2. **Core domain model**
   - The main stateful entities are likely:
     - **Ascensor**: the elevator unit itself.
     - **Piso**: a floor in the building.
     - **Puerta**: the elevator door.
     - **Usuario**: a passenger or actor interacting with the system.
   - These classes represent the physical world of the elevator system.

3. **Control and orchestration**
   - **SistemaControl** is the likely coordination layer.
   - It probably receives requests, updates elevator state, and decides movement/door actions.
   - In the architecture diagram, this is the central logic boundary between user actions and the elevator’s internal state.

4. **Input abstraction through buttons**
   - The **Boton** hierarchy suggests a command/event model:
     - **BotonAscensor**
     - **BotonPiso**
     - **BotonEmergencia**
     - **BotonTiempoPuertas**
   - These classes likely encapsulate different kinds of interactions or signals that affect the system.

5. **Specialized behaviors**
   - The presence of **BotonEmergencia** and **BotonTiempoPuertas** shows that safety and door timing are treated as separate behaviors.
   - This is important architecturally: emergency handling and door-duration logic are not embedded directly into the elevator model, but isolated as distinct controls.

6. **Execution entry points**
   - There are three runnable classes:
     - **EjecutarAscensor**
     - **EjecutarAscensor2**
     - **EjecutarAscensor3**
   - These are likely different simulations, test scenarios, or manual demos of the same elevator system.
   - They form the application boundary, where the program starts.

7. **Likely data flow**
   - A user or scenario class triggers a button action.
   - The button action is interpreted by **SistemaControl**.
   - The control layer updates **Ascensor**, **Piso**, and **Puerta** state.
   - **Usuario** may be used to represent who requested service or who is riding the elevator.

8. **Subsystem boundaries**
   - The repository appears to separate the system into:
     - **Domain entities**: elevator, floors, doors, user.
     - **Interaction objects**: buttons.
     - **Coordinator**: system control.
     - **Launcher classes**: runnable demos.
   - This is a clean object-oriented split suitable for an architecture diagram.

9. **Technology/runtime**
   - The project is **Java-only** and appears to use no visible external libraries or frameworks.
   - The code is organized under `SistemaAscensor/src`, suggesting a simple standalone Java application.

10. **Documentation artifact**
   - The file **SistemaAscensor.drawio** is likely the conceptual design diagram for the system.
   - It probably reflects the same object relationships implied by the class names, making it useful as a reference for the architecture.

11. **What to emphasize in a diagram**
   - Put **SistemaControl** at the center.
   - Show **Ascensor**, **Piso**, **Puerta**, and **Usuario** as domain entities around it.
   - Show the **Boton** subclasses as input/event sources feeding into control.
   - Show the three **EjecutarAscensor*** classes as separate entry points into the same model.

12. **Overall architectural style**
   - This is best described as a **single-process, object-oriented simulation** of an elevator system.
   - The main concern is modeling state transitions and interactions, not networking, persistence, or UI frameworks.

Main entry points: [`SistemaAscensor/src/SistemaControl.java`](https://github.com/kevinrcorrales/momento3/blob/main/SistemaAscensor/src/SistemaControl.java) (SistemaControl), [`SistemaAscensor/src/Boton.java`](https://github.com/kevinrcorrales/momento3/blob/main/SistemaAscensor/src/Boton.java) (Boton), [`SistemaAscensor.drawio`](https://github.com/kevinrcorrales/momento3/blob/main/SistemaAscensor.drawio) (SistemaAscensor.drawio), [`SistemaAscensor/src/BotonAscensor.java`](https://github.com/kevinrcorrales/momento3/blob/main/SistemaAscensor/src/BotonAscensor.java) (BotonAscensor)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Runtimes"]
  node_ejecutar_ascensor(("EjecutarAscensor<br/>launcher"))
  node_ejecutar_ascensor_2(("EjecutarAscensor2<br/>launcher"))
  node_ejecutar_ascensor_3(("EjecutarAscensor3<br/>launcher"))
end

subgraph group_domain["Domain"]
  node_sistema_control["SistemaControl<br/>orchestrator"]
  node_ascensor["Ascensor<br/>elevator<br/>[Ascensor.java]"]
  node_piso["Piso<br/>floor<br/>[Piso.java]"]
  node_puerta["Puerta<br/>door<br/>[Puerta.java]"]
  node_usuario(("Usuario<br/>rider<br/>[Usuario.java]"))
end

subgraph group_interaction["Interaction"]
  node_boton["Boton<br/>input base<br/>[Boton.java]"]
  node_boton_ascensor["BotonAscensor<br/>cab button<br/>[BotonAscensor.java]"]
  node_boton_piso["BotonPiso<br/>hall button<br/>[BotonPiso.java]"]
  node_boton_emergencia["BotonEmergencia<br/>safety button"]
  node_boton_tiempo_puertas["BotonTiempoPuertas<br/>timing button"]
end

subgraph group_docs["Docs"]
  node_sistema_diseno["SistemaAscensor.drawio<br/>design diagram"]
end

node_boton -.->|"specializes"| node_boton_ascensor
node_boton -.->|"specializes"| node_boton_piso
node_boton -.->|"specializes"| node_boton_emergencia
node_boton -.->|"specializes"| node_boton_tiempo_puertas
node_ejecutar_ascensor -->|"starts"| node_sistema_control
node_ejecutar_ascensor_2 -->|"starts"| node_sistema_control
node_ejecutar_ascensor_3 -->|"starts"| node_sistema_control
node_boton_ascensor -->|"signals"| node_sistema_control
node_boton_piso -->|"signals"| node_sistema_control
node_boton_emergencia -->|"alerts"| node_sistema_control
node_boton_tiempo_puertas -->|"tunes"| node_sistema_control
node_sistema_control -->|"updates"| node_ascensor
node_sistema_control -->|"consults"| node_piso
node_sistema_control -->|"controls"| node_puerta
node_sistema_control -->|"serves"| node_usuario
node_sistema_diseno -.->|"documents"| node_sistema_control
node_sistema_diseno -.->|"documents"| node_ascensor
node_sistema_diseno -.->|"documents"| node_piso
node_sistema_diseno -.->|"documents"| node_puerta

click node_sistema_control "https://github.com/kevinrcorrales/momento3/blob/main/SistemaAscensor/src/SistemaControl.java"
click node_ascensor "https://github.com/kevinrcorrales/momento3/blob/main/SistemaAscensor/src/Ascensor.java"
click node_piso "https://github.com/kevinrcorrales/momento3/blob/main/SistemaAscensor/src/Piso.java"
click node_puerta "https://github.com/kevinrcorrales/momento3/blob/main/SistemaAscensor/src/Puerta.java"
click node_usuario "https://github.com/kevinrcorrales/momento3/blob/main/SistemaAscensor/src/Usuario.java"
click node_boton "https://github.com/kevinrcorrales/momento3/blob/main/SistemaAscensor/src/Boton.java"
click node_boton_ascensor "https://github.com/kevinrcorrales/momento3/blob/main/SistemaAscensor/src/BotonAscensor.java"
click node_boton_piso "https://github.com/kevinrcorrales/momento3/blob/main/SistemaAscensor/src/BotonPiso.java"
click node_boton_emergencia "https://github.com/kevinrcorrales/momento3/blob/main/SistemaAscensor/src/BotonEmergencia.java"
click node_boton_tiempo_puertas "https://github.com/kevinrcorrales/momento3/blob/main/SistemaAscensor/src/BotonTiempoPuertas.java"
click node_ejecutar_ascensor "https://github.com/kevinrcorrales/momento3/blob/main/SistemaAscensor/src/EjecutarAscensor.java"
click node_ejecutar_ascensor_2 "https://github.com/kevinrcorrales/momento3/blob/main/SistemaAscensor/src/EjecutarAscensor2.java"
click node_ejecutar_ascensor_3 "https://github.com/kevinrcorrales/momento3/blob/main/SistemaAscensor/src/EjecutarAscensor3.java"
click node_sistema_diseno "https://github.com/kevinrcorrales/momento3/blob/main/SistemaAscensor.drawio"

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_ejecutar_ascensor,node_ejecutar_ascensor_2,node_ejecutar_ascensor_3 toneBlue
class node_sistema_control,node_ascensor,node_piso,node_puerta,node_usuario toneAmber
class node_boton,node_boton_ascensor,node_boton_piso,node_boton_emergencia,node_boton_tiempo_puertas toneMint
class node_sistema_diseno toneRose
```

## Components

### Runtimes

Executable simulation entry points

- [EjecutarAscensor](https://github.com/kevinrcorrales/momento3/blob/main/SistemaAscensor/src/EjecutarAscensor.java): launcher · Primary simulation entry point · `SistemaAscensor/src/EjecutarAscensor.java`
- [EjecutarAscensor2](https://github.com/kevinrcorrales/momento3/blob/main/SistemaAscensor/src/EjecutarAscensor2.java): launcher · Alternative simulation scenario · `SistemaAscensor/src/EjecutarAscensor2.java`
- [EjecutarAscensor3](https://github.com/kevinrcorrales/momento3/blob/main/SistemaAscensor/src/EjecutarAscensor3.java): launcher · Alternative simulation scenario · `SistemaAscensor/src/EjecutarAscensor3.java`

### Domain

Core elevator state and entities

- [SistemaControl](https://github.com/kevinrcorrales/momento3/blob/main/SistemaAscensor/src/SistemaControl.java): orchestrator · Coordinates requests and state transitions · `SistemaAscensor/src/SistemaControl.java`
- [Ascensor](https://github.com/kevinrcorrales/momento3/blob/main/SistemaAscensor/src/Ascensor.java): elevator · Elevator state and movement · `SistemaAscensor/src/Ascensor.java`
- [Piso](https://github.com/kevinrcorrales/momento3/blob/main/SistemaAscensor/src/Piso.java): floor · Building floor model · `SistemaAscensor/src/Piso.java`
- [Puerta](https://github.com/kevinrcorrales/momento3/blob/main/SistemaAscensor/src/Puerta.java): door · Elevator door behavior · `SistemaAscensor/src/Puerta.java`
- [Usuario](https://github.com/kevinrcorrales/momento3/blob/main/SistemaAscensor/src/Usuario.java): rider · Passenger or actor in the system · `SistemaAscensor/src/Usuario.java`

### Interaction

Buttons and input abstractions

- [Boton](https://github.com/kevinrcorrales/momento3/blob/main/SistemaAscensor/src/Boton.java): input base · Common abstraction for button-driven actions · `SistemaAscensor/src/Boton.java`
- [BotonAscensor](https://github.com/kevinrcorrales/momento3/blob/main/SistemaAscensor/src/BotonAscensor.java): cab button · Elevator cabin button · `SistemaAscensor/src/BotonAscensor.java`
- [BotonPiso](https://github.com/kevinrcorrales/momento3/blob/main/SistemaAscensor/src/BotonPiso.java): hall button · Floor call button · `SistemaAscensor/src/BotonPiso.java`
- [BotonEmergencia](https://github.com/kevinrcorrales/momento3/blob/main/SistemaAscensor/src/BotonEmergencia.java): safety button · Emergency action button · `SistemaAscensor/src/BotonEmergencia.java`
- [BotonTiempoPuertas](https://github.com/kevinrcorrales/momento3/blob/main/SistemaAscensor/src/BotonTiempoPuertas.java): timing button · Door timing control · `SistemaAscensor/src/BotonTiempoPuertas.java`

### Docs

Conceptual design artifact

- [SistemaAscensor.drawio](https://github.com/kevinrcorrales/momento3/blob/main/SistemaAscensor.drawio): design diagram · Conceptual architecture sketch · `SistemaAscensor.drawio`

## Connections

- Boton → BotonAscensor: specializes · Base button abstraction
- Boton → BotonPiso: specializes · Base button abstraction
- Boton → BotonEmergencia: specializes · Base button abstraction
- Boton → BotonTiempoPuertas: specializes · Base button abstraction
- EjecutarAscensor → SistemaControl: starts · Bootstraps the simulation
- EjecutarAscensor2 → SistemaControl: starts · Bootstraps the simulation
- EjecutarAscensor3 → SistemaControl: starts · Bootstraps the simulation
- BotonAscensor → SistemaControl: signals · Cabin request reaches control
- BotonPiso → SistemaControl: signals · Hall request reaches control
- BotonEmergencia → SistemaControl: alerts · Emergency handling path
- BotonTiempoPuertas → SistemaControl: tunes · Door timing behavior
- SistemaControl → Ascensor: updates · Moves and manages elevator state
- SistemaControl → Piso: consults · Reads floor state and requests
- SistemaControl → Puerta: controls · Opens and closes the door
- SistemaControl → Usuario: serves · Responds to passenger interactions
- SistemaAscensor.drawio → SistemaControl: documents · Conceptual reference for the model
- SistemaAscensor.drawio → Ascensor: documents · Conceptual reference for the model
- SistemaAscensor.drawio → Piso: documents · Conceptual reference for the model
- SistemaAscensor.drawio → Puerta: documents · Conceptual reference for the model
