# ereasai/dummy-dashboard architecture

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

- Interactive diagram: https://gitdiagram.com/ereasai/dummy-dashboard
- Repository: https://github.com/ereasai/dummy-dashboard

## Overview

This repository implements an IoT data-monitoring stack: a Python crawler receives middleware messages and records device metadata and sensor readings; an Express API exposes recent value logs; and a React UI polls that API and displays values. The excerpts support these main runtime links, but the README is empty and nginx, deployment wiring, and much of the crawler are unsampled, so those connections are omitted.

Main entry points: [`python_script/src/crawler.py`](https://github.com/ereasai/dummy-dashboard/blob/master/python_script/src/crawler.py) (Message crawler), [`backend/src/index.js`](https://github.com/ereasai/dummy-dashboard/blob/master/backend/src/index.js) (Values API), [`frontend/src/index.js`](https://github.com/ereasai/dummy-dashboard/blob/master/frontend/src/index.js) (React entry point), [`frontend/src/App.js`](https://github.com/ereasai/dummy-dashboard/blob/master/frontend/src/App.js) (Polling values UI)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_collection["Device collection"]
  node_crawler["Message crawler<br/>[crawler.py]"]
end

subgraph group_storage["Persistence"]
  node_orm["Data models<br/>[models.py]"]
  node_database[("PostgreSQL database<br/>[init.sql]")]
end

subgraph group_api["API service"]
  node_backend["Values API<br/>[index.js]"]
end

subgraph group_ui["Web interface"]
  node_app["Polling values UI<br/>[App.js]"]
  node_react_entry["React entry point<br/>[index.js]"]
  node_vitals["Performance reporting<br/>[reportWebVitals.js]"]
end

node_middleware(("IoT middleware"))
node_browser(("User browser"))

node_middleware -->|"sends messages"| node_crawler
node_crawler -->|"uses models"| node_orm
node_crawler -->|"writes logs"| node_database
node_backend -->|"queries logs"| node_database
node_browser -.->|"opens app"| node_react_entry
node_react_entry -->|"renders"| node_app
node_react_entry -->|"invokes"| node_vitals
node_app -->|"polls values"| node_backend
node_backend -->|"returns rows"| node_app

click node_crawler "https://github.com/ereasai/dummy-dashboard/blob/master/python_script/src/crawler.py"
click node_orm "https://github.com/ereasai/dummy-dashboard/blob/master/python_script/src/model/models.py"
click node_database "https://github.com/ereasai/dummy-dashboard/blob/master/db/init.sql"
click node_backend "https://github.com/ereasai/dummy-dashboard/blob/master/backend/src/index.js"
click node_app "https://github.com/ereasai/dummy-dashboard/blob/master/frontend/src/App.js"
click node_react_entry "https://github.com/ereasai/dummy-dashboard/blob/master/frontend/src/index.js"
click node_vitals "https://github.com/ereasai/dummy-dashboard/blob/master/frontend/src/reportWebVitals.js"

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_crawler,node_browser toneBlue
class node_orm,node_database toneAmber
class node_backend toneMint
class node_app,node_react_entry,node_vitals toneRose
class node_middleware toneIndigo
```

## Components

### Device collection

- [Message crawler](https://github.com/ereasai/dummy-dashboard/blob/master/python_script/src/crawler.py): `python_script/src/crawler.py`

### Persistence

- [Data models](https://github.com/ereasai/dummy-dashboard/blob/master/python_script/src/model/models.py): `python_script/src/model/models.py`
- [PostgreSQL database](https://github.com/ereasai/dummy-dashboard/blob/master/db/init.sql): `db/init.sql`

### API service

- [Values API](https://github.com/ereasai/dummy-dashboard/blob/master/backend/src/index.js): `backend/src/index.js`

### Web interface

- [Polling values UI](https://github.com/ereasai/dummy-dashboard/blob/master/frontend/src/App.js): `frontend/src/App.js`
- [React entry point](https://github.com/ereasai/dummy-dashboard/blob/master/frontend/src/index.js): `frontend/src/index.js`
- [Performance reporting](https://github.com/ereasai/dummy-dashboard/blob/master/frontend/src/reportWebVitals.js): `frontend/src/reportWebVitals.js`

### Other components

- **IoT middleware**
- **User browser**

## Connections

- IoT middleware → Message crawler: sends messages (evidence: `python_script/src/crawler.py`)
- Message crawler → Data models: uses models (evidence: `python_script/src/crawler.py`)
- Message crawler → PostgreSQL database: writes logs (evidence: `python_script/src/crawler.py`)
- Values API → PostgreSQL database: queries logs (evidence: `backend/src/index.js`)
- User browser → React entry point: opens app
- React entry point → Polling values UI: renders (evidence: `frontend/src/index.js`)
- React entry point → Performance reporting: invokes (evidence: `frontend/src/index.js`)
- Polling values UI → Values API: polls values (evidence: `frontend/src/App.js`)
- Values API → Polling values UI: returns rows (evidence: `backend/src/index.js`)
