# research-and-development-ucm/park-vis architecture

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

- Interactive diagram: https://gitdiagram.com/research-and-development-ucm/park-vis
- Repository: https://github.com/research-and-development-ucm/park-vis

## Overview

Park-VIS is a parking-occupancy monitoring and administration application. Its principal workflow is to manage camera sources, acquire video, infer space occupancy, and present live status and history; alert rules evaluate occupancy and camera availability and dispatch notifications. The backend also exposes authentication, layout, settings, and operational diagnostics, while the Vue frontend provides the corresponding operator views. The README gives only a brief product description, so several feature relationships are supported by module references rather than inspected call sites; unverified frontend-to-backend links are omitted.

Main entry points: [`frontend/src/router.js`](https://github.com/research-and-development-ucm/park-vis/blob/main/frontend/src/router.js) (Page routing), [`backend/app.py`](https://github.com/research-and-development-ucm/park-vis/blob/main/backend/app.py) (HTTP application), [`backend/database.py`](https://github.com/research-and-development-ucm/park-vis/blob/main/backend/database.py) (Database access), [`backend/scheduler.py`](https://github.com/research-and-development-ucm/park-vis/blob/main/backend/scheduler.py) (Camera scheduler)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Operator interface"]
  node_router["Page routing<br/>[router.js]"]
  node_live["Live dashboard<br/>[LiveDashboard.vue]"]
  node_history["History view<br/>[HistoryView.vue]"]
  node_layout["Layout editor"]
  node_space["Space editor<br/>[SpaceEditor.vue]"]
  node_settings["Settings<br/>[Settings.vue]"]
  node_alerts_ui["Alert management<br/>[Alerts.vue]"]
  node_storage_ui["Storage diagnostics"]
end

subgraph group_runtime["Backend runtime"]
  node_api["HTTP application<br/>[app.py]"]
  node_auth["Authentication<br/>[auth.py]"]
  node_crud["Data operations<br/>[crud.py]"]
  node_scheduler["Camera scheduler<br/>[scheduler.py]"]
end

subgraph group_alerts["Alerting"]
  node_alert_routes["Alert API<br/>[routes.py]"]
  node_alert_engine["Rule evaluation<br/>[engine.py]"]
  node_dispatcher["Alert dispatch<br/>[dispatcher.py]"]
  node_channels["Notification channels"]
end

subgraph group_persistence["Persistence"]
  node_database[("Database access<br/>[database.py]")]
  node_models["Domain records<br/>[models.py]"]
  node_rolling[("Rolling LMDB<br/>[__init__.py]")]
end

subgraph group_vision["Parking vision"]
  node_streams["Stream manager<br/>[stream_manager.py]"]
  node_inference["Occupancy inference<br/>[inference.py]"]
  node_layout_backend["Parking layout logic<br/>[parking_layout.py]"]
end

node_operator(("Operator"))

node_operator -->|"opens pages"| node_router
node_router -->|"routes to"| node_live
node_router -->|"routes to"| node_history
node_router -->|"routes to"| node_layout
node_router -->|"routes to"| node_space
node_router -->|"routes to"| node_settings
node_router -->|"routes to"| node_alerts_ui
node_router -->|"routes to"| node_storage_ui
node_storage_ui -.->|"requests stats"| node_api
node_api -->|"uses authentication"| node_auth
node_api -->|"uses data operations"| node_crud
node_api -->|"starts scheduler"| node_scheduler
node_api -->|"starts alert engine"| node_alert_engine
node_api -->|"uses dispatch"| node_dispatcher
node_api -->|"registers routes"| node_alert_routes
node_api -->|"uses layout logic"| node_layout_backend
node_scheduler -->|"runs inference"| node_inference
node_scheduler -->|"manages streams"| node_streams
node_scheduler -.->|"reads and writes"| node_database
node_alert_engine -->|"evaluates records"| node_database
node_alert_engine -.->|"fires alerts"| node_dispatcher
node_alert_routes -->|"retries alerts"| node_dispatcher
node_dispatcher -->|"dispatches through"| node_channels
node_database -->|"maps records"| node_models
node_database -->|"creates stores"| node_rolling
node_inference -->|"loads settings"| node_database

click node_router "https://github.com/research-and-development-ucm/park-vis/blob/main/frontend/src/router.js"
click node_live "https://github.com/research-and-development-ucm/park-vis/blob/main/frontend/src/components/LiveDashboard.vue"
click node_history "https://github.com/research-and-development-ucm/park-vis/blob/main/frontend/src/components/HistoryView.vue"
click node_layout "https://github.com/research-and-development-ucm/park-vis/blob/main/frontend/src/components/ParkingLayoutEditor.vue"
click node_space "https://github.com/research-and-development-ucm/park-vis/blob/main/frontend/src/components/SpaceEditor.vue"
click node_settings "https://github.com/research-and-development-ucm/park-vis/blob/main/frontend/src/components/Settings.vue"
click node_alerts_ui "https://github.com/research-and-development-ucm/park-vis/blob/main/frontend/src/components/Alerts.vue"
click node_storage_ui "https://github.com/research-and-development-ucm/park-vis/blob/main/frontend/src/components/StorageDiagnostics.vue"
click node_api "https://github.com/research-and-development-ucm/park-vis/blob/main/backend/app.py"
click node_auth "https://github.com/research-and-development-ucm/park-vis/blob/main/backend/auth.py"
click node_crud "https://github.com/research-and-development-ucm/park-vis/blob/main/backend/crud.py"
click node_scheduler "https://github.com/research-and-development-ucm/park-vis/blob/main/backend/scheduler.py"
click node_streams "https://github.com/research-and-development-ucm/park-vis/blob/main/backend/stream_manager.py"
click node_inference "https://github.com/research-and-development-ucm/park-vis/blob/main/backend/inference.py"
click node_layout_backend "https://github.com/research-and-development-ucm/park-vis/blob/main/backend/parking_layout.py"
click node_alert_routes "https://github.com/research-and-development-ucm/park-vis/blob/main/backend/alerts/routes.py"
click node_alert_engine "https://github.com/research-and-development-ucm/park-vis/blob/main/backend/alerts/engine.py"
click node_dispatcher "https://github.com/research-and-development-ucm/park-vis/blob/main/backend/alerts/dispatcher.py"
click node_channels "https://github.com/research-and-development-ucm/park-vis/tree/main/backend/alerts/channels"
click node_database "https://github.com/research-and-development-ucm/park-vis/blob/main/backend/database.py"
click node_models "https://github.com/research-and-development-ucm/park-vis/blob/main/backend/models.py"
click node_rolling "https://github.com/research-and-development-ucm/park-vis/blob/main/rollinglmdb/__init__.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_router,node_live,node_history,node_layout,node_space,node_settings,node_alerts_ui,node_storage_ui toneBlue
class node_api,node_auth,node_crud,node_scheduler toneAmber
class node_alert_routes,node_alert_engine,node_dispatcher,node_channels toneMint
class node_database,node_models,node_rolling toneRose
class node_streams,node_inference,node_layout_backend,node_operator toneIndigo
```

## Components

### Operator interface

- [Page routing](https://github.com/research-and-development-ucm/park-vis/blob/main/frontend/src/router.js): `frontend/src/router.js`
- [Live dashboard](https://github.com/research-and-development-ucm/park-vis/blob/main/frontend/src/components/LiveDashboard.vue): `frontend/src/components/LiveDashboard.vue`
- [History view](https://github.com/research-and-development-ucm/park-vis/blob/main/frontend/src/components/HistoryView.vue): `frontend/src/components/HistoryView.vue`
- [Layout editor](https://github.com/research-and-development-ucm/park-vis/blob/main/frontend/src/components/ParkingLayoutEditor.vue): `frontend/src/components/ParkingLayoutEditor.vue`
- [Space editor](https://github.com/research-and-development-ucm/park-vis/blob/main/frontend/src/components/SpaceEditor.vue): `frontend/src/components/SpaceEditor.vue`
- [Settings](https://github.com/research-and-development-ucm/park-vis/blob/main/frontend/src/components/Settings.vue): `frontend/src/components/Settings.vue`
- [Alert management](https://github.com/research-and-development-ucm/park-vis/blob/main/frontend/src/components/Alerts.vue): `frontend/src/components/Alerts.vue`
- [Storage diagnostics](https://github.com/research-and-development-ucm/park-vis/blob/main/frontend/src/components/StorageDiagnostics.vue): `frontend/src/components/StorageDiagnostics.vue`

### Backend runtime

- [HTTP application](https://github.com/research-and-development-ucm/park-vis/blob/main/backend/app.py): `backend/app.py`
- [Authentication](https://github.com/research-and-development-ucm/park-vis/blob/main/backend/auth.py): `backend/auth.py`
- [Data operations](https://github.com/research-and-development-ucm/park-vis/blob/main/backend/crud.py): `backend/crud.py`
- [Camera scheduler](https://github.com/research-and-development-ucm/park-vis/blob/main/backend/scheduler.py): `backend/scheduler.py`

### Alerting

- [Alert API](https://github.com/research-and-development-ucm/park-vis/blob/main/backend/alerts/routes.py): `backend/alerts/routes.py`
- [Rule evaluation](https://github.com/research-and-development-ucm/park-vis/blob/main/backend/alerts/engine.py): `backend/alerts/engine.py`
- [Alert dispatch](https://github.com/research-and-development-ucm/park-vis/blob/main/backend/alerts/dispatcher.py): `backend/alerts/dispatcher.py`
- [Notification channels](https://github.com/research-and-development-ucm/park-vis/tree/main/backend/alerts/channels): `backend/alerts/channels`

### Persistence

- [Database access](https://github.com/research-and-development-ucm/park-vis/blob/main/backend/database.py): `backend/database.py`
- [Domain records](https://github.com/research-and-development-ucm/park-vis/blob/main/backend/models.py): `backend/models.py`
- [Rolling LMDB](https://github.com/research-and-development-ucm/park-vis/blob/main/rollinglmdb/__init__.py): `rollinglmdb/__init__.py`

### Parking vision

- [Stream manager](https://github.com/research-and-development-ucm/park-vis/blob/main/backend/stream_manager.py): `backend/stream_manager.py`
- [Occupancy inference](https://github.com/research-and-development-ucm/park-vis/blob/main/backend/inference.py): `backend/inference.py`
- [Parking layout logic](https://github.com/research-and-development-ucm/park-vis/blob/main/backend/parking_layout.py): `backend/parking_layout.py`

### Other components

- **Operator**

## Connections

- Operator → Page routing: opens pages (evidence: `frontend/src/router.js`)
- Page routing → Live dashboard: routes to (evidence: `frontend/src/router.js`)
- Page routing → History view: routes to (evidence: `frontend/src/router.js`)
- Page routing → Layout editor: routes to (evidence: `frontend/src/router.js`)
- Page routing → Space editor: routes to (evidence: `frontend/src/router.js`)
- Page routing → Settings: routes to (evidence: `frontend/src/router.js`)
- Page routing → Alert management: routes to (evidence: `frontend/src/router.js`)
- Page routing → Storage diagnostics: routes to (evidence: `frontend/src/router.js`)
- Storage diagnostics → HTTP application: requests stats
- HTTP application → Authentication: uses authentication (evidence: `backend/app.py`)
- HTTP application → Data operations: uses data operations (evidence: `backend/app.py`)
- HTTP application → Camera scheduler: starts scheduler (evidence: `backend/app.py`)
- HTTP application → Rule evaluation: starts alert engine (evidence: `backend/app.py`)
- HTTP application → Alert dispatch: uses dispatch (evidence: `backend/app.py`)
- HTTP application → Alert API: registers routes (evidence: `backend/app.py`)
- HTTP application → Parking layout logic: uses layout logic (evidence: `backend/app.py`)
- Camera scheduler → Occupancy inference: runs inference (evidence: `backend/scheduler.py`)
- Camera scheduler → Stream manager: manages streams (evidence: `backend/scheduler.py`)
- Camera scheduler → Database access: reads and writes (evidence: `backend/scheduler.py`)
- Rule evaluation → Database access: evaluates records (evidence: `backend/alerts/engine.py`)
- Rule evaluation → Alert dispatch: fires alerts
- Alert API → Alert dispatch: retries alerts (evidence: `backend/alerts/routes.py`)
- Alert dispatch → Notification channels: dispatches through (evidence: `backend/alerts/dispatcher.py`)
- Database access → Domain records: maps records (evidence: `backend/database.py`)
- Database access → Rolling LMDB: creates stores (evidence: `backend/database.py`)
- Occupancy inference → Database access: loads settings (evidence: `backend/inference.py`)
