# medranosteven777/parkugb-monitor architecture

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

- Interactive diagram: https://gitdiagram.com/medranosteven777/parkugb-monitor
- Repository: https://github.com/medranosteven777/parkugb-monitor

## Overview

ParkUGB Monitor is a Streamlit dashboard for live parking occupancy. Users choose a simulation scenario or reset the spaces; the app initializes or updates in-memory occupancy, then renders overall and per-zone status, teacher-reserved spaces, and full-lot guidance including the waiting zone. Occupancy summaries and display components form the main internal layers. Sensor data is simulated, and the README says data is not persisted. The graph reflects the shown calls and documented user-facing workflow; it does not imply real sensors, storage, or teacher-space assignment.

Main entry points: [`app.py`](https://github.com/medranosteven777/parkugb-monitor/blob/main/app.py) (Streamlit dashboard), [`datos/config.py`](https://github.com/medranosteven777/parkugb-monitor/blob/main/datos/config.py) (Zones and scenarios), [`interfaz/componentes.py`](https://github.com/medranosteven777/parkugb-monitor/blob/main/interfaz/componentes.py) (Dashboard components), [`fuente_datos/simulador.py`](https://github.com/medranosteven777/parkugb-monitor/blob/main/fuente_datos/simulador.py) (Occupancy simulator)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Dashboard runtime"]
  node_dashboard["Streamlit dashboard<br/>[app.py]"]
end

subgraph group_domain["Occupancy domain"]
  node_simulation["Occupancy simulator<br/>[simulador.py]"]
  node_configuration["Zones and scenarios<br/>[config.py]"]
  node_occupancy["Occupancy summaries<br/>[ocupacion.py]"]
end

subgraph group_presentation["Dashboard presentation"]
  node_components["Dashboard components<br/>[componentes.py]"]
  node_styles["Dashboard styling<br/>[estilos.py]"]
end

node_campus_users(("Drivers and guards"))

node_campus_users -->|"use controls"| node_dashboard
node_dashboard -->|"initialize spaces"| node_simulation
node_dashboard -->|"simulate occupancy"| node_simulation
node_dashboard -->|"select scenarios"| node_configuration
node_dashboard -->|"render dashboard"| node_components
node_dashboard -->|"apply CSS"| node_styles
node_simulation -->|"read zone definitions"| node_configuration
node_components -->|"request summaries"| node_occupancy
node_components -->|"read zone labels"| node_configuration
node_occupancy -->|"read thresholds"| node_configuration

click node_dashboard "https://github.com/medranosteven777/parkugb-monitor/blob/main/app.py"
click node_simulation "https://github.com/medranosteven777/parkugb-monitor/blob/main/fuente_datos/simulador.py"
click node_configuration "https://github.com/medranosteven777/parkugb-monitor/blob/main/datos/config.py"
click node_occupancy "https://github.com/medranosteven777/parkugb-monitor/blob/main/logica/ocupacion.py"
click node_components "https://github.com/medranosteven777/parkugb-monitor/blob/main/interfaz/componentes.py"
click node_styles "https://github.com/medranosteven777/parkugb-monitor/blob/main/interfaz/estilos.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_dashboard toneBlue
class node_simulation,node_configuration,node_occupancy toneAmber
class node_components,node_styles toneMint
class node_campus_users toneIndigo
```

## Components

### Dashboard runtime

- [Streamlit dashboard](https://github.com/medranosteven777/parkugb-monitor/blob/main/app.py): `app.py`

### Occupancy domain

- [Occupancy simulator](https://github.com/medranosteven777/parkugb-monitor/blob/main/fuente_datos/simulador.py): `fuente_datos/simulador.py`
- [Zones and scenarios](https://github.com/medranosteven777/parkugb-monitor/blob/main/datos/config.py): `datos/config.py`
- [Occupancy summaries](https://github.com/medranosteven777/parkugb-monitor/blob/main/logica/ocupacion.py): `logica/ocupacion.py`

### Dashboard presentation

- [Dashboard components](https://github.com/medranosteven777/parkugb-monitor/blob/main/interfaz/componentes.py): `interfaz/componentes.py`
- [Dashboard styling](https://github.com/medranosteven777/parkugb-monitor/blob/main/interfaz/estilos.py): `interfaz/estilos.py`

### Other components

- **Drivers and guards**

## Connections

- Drivers and guards → Streamlit dashboard: use controls (evidence: `README.md`)
- Streamlit dashboard → Occupancy simulator: initialize spaces (evidence: `app.py`)
- Streamlit dashboard → Occupancy simulator: simulate occupancy (evidence: `app.py`)
- Streamlit dashboard → Zones and scenarios: select scenarios (evidence: `app.py`)
- Streamlit dashboard → Dashboard components: render dashboard (evidence: `app.py`)
- Streamlit dashboard → Dashboard styling: apply CSS (evidence: `app.py`)
- Occupancy simulator → Zones and scenarios: read zone definitions (evidence: `fuente_datos/simulador.py`)
- Dashboard components → Occupancy summaries: request summaries (evidence: `interfaz/componentes.py`)
- Dashboard components → Zones and scenarios: read zone labels (evidence: `interfaz/componentes.py`)
- Occupancy summaries → Zones and scenarios: read thresholds (evidence: `logica/ocupacion.py`)
