# wanabro227/lab_dashboard architecture

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

- Interactive diagram: https://gitdiagram.com/wanabro227/lab_dashboard
- Repository: https://github.com/wanabro227/lab_dashboard

## Overview

LabDashboard is a React interface for monitoring atmospheric telemetry from an ESP32 via Firebase Realtime Database. The user-facing flow subscribes to readings, orders them newest-first, and presents device status, the latest sample, and a load-more history table. The README provides no additional product capabilities, and the supplied excerpts do not show sensor-side ingestion; the external device-to-database link is therefore shown as unverified.

Main entry points: [`src/components/Dashboard.jsx`](https://github.com/wanabro227/lab_dashboard/blob/main/src/components/Dashboard.jsx) (Dashboard controller), [`src/index.js`](https://github.com/wanabro227/lab_dashboard/blob/main/src/index.js) (React entry), [`src/App.js`](https://github.com/wanabro227/lab_dashboard/blob/main/src/App.js) (App shell), [`src/firebase.js`](https://github.com/wanabro227/lab_dashboard/blob/main/src/firebase.js) (Firebase client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["App runtime"]
  node_entry["React entry<br/>[index.js]"]
  node_app["App shell<br/>[App.js]"]
end

subgraph group_telemetry["Telemetry dashboard"]
  node_dashboard["Dashboard controller<br/>[Dashboard.jsx]"]
  node_header["Connection header<br/>[Header.jsx]"]
  node_device["Device status<br/>[DeviceStatus.jsx]"]
  node_current["Current reading<br/>[CurrentReading.jsx]"]
  node_history["Reading history<br/>[HistoryTable.jsx]"]
end

subgraph group_backend["Realtime data"]
  node_firebase["Firebase client<br/>[firebase.js]"]
  node_rtdb[("Realtime Database")]
end

node_operator(("Dashboard user"))
node_sensor(("ESP32 sensor"))

node_operator -->|"opens dashboard"| node_entry
node_entry -->|"renders"| node_app
node_app -->|"renders"| node_dashboard
node_dashboard -->|"renders"| node_header
node_dashboard -->|"renders"| node_device
node_dashboard -->|"renders"| node_current
node_dashboard -->|"renders"| node_history
node_dashboard -->|"uses client"| node_firebase
node_firebase -->|"initializes"| node_rtdb
node_dashboard -->|"subscribes readings"| node_rtdb
node_sensor -.->|"sends telemetry"| node_rtdb

click node_entry "https://github.com/wanabro227/lab_dashboard/blob/main/src/index.js"
click node_app "https://github.com/wanabro227/lab_dashboard/blob/main/src/App.js"
click node_dashboard "https://github.com/wanabro227/lab_dashboard/blob/main/src/components/Dashboard.jsx"
click node_header "https://github.com/wanabro227/lab_dashboard/blob/main/src/components/Header.jsx"
click node_device "https://github.com/wanabro227/lab_dashboard/blob/main/src/components/DeviceStatus.jsx"
click node_current "https://github.com/wanabro227/lab_dashboard/blob/main/src/components/CurrentReading.jsx"
click node_history "https://github.com/wanabro227/lab_dashboard/blob/main/src/components/HistoryTable.jsx"
click node_firebase "https://github.com/wanabro227/lab_dashboard/blob/main/src/firebase.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_entry,node_app,node_operator toneBlue
class node_dashboard,node_header,node_device,node_current,node_history toneAmber
class node_firebase,node_rtdb toneMint
class node_sensor toneIndigo
```

## Components

### App runtime

- [React entry](https://github.com/wanabro227/lab_dashboard/blob/main/src/index.js): `src/index.js`
- [App shell](https://github.com/wanabro227/lab_dashboard/blob/main/src/App.js): `src/App.js`

### Telemetry dashboard

- [Dashboard controller](https://github.com/wanabro227/lab_dashboard/blob/main/src/components/Dashboard.jsx): `src/components/Dashboard.jsx`
- [Connection header](https://github.com/wanabro227/lab_dashboard/blob/main/src/components/Header.jsx): `src/components/Header.jsx`
- [Device status](https://github.com/wanabro227/lab_dashboard/blob/main/src/components/DeviceStatus.jsx): `src/components/DeviceStatus.jsx`
- [Current reading](https://github.com/wanabro227/lab_dashboard/blob/main/src/components/CurrentReading.jsx): `src/components/CurrentReading.jsx`
- [Reading history](https://github.com/wanabro227/lab_dashboard/blob/main/src/components/HistoryTable.jsx): `src/components/HistoryTable.jsx`

### Realtime data

- [Firebase client](https://github.com/wanabro227/lab_dashboard/blob/main/src/firebase.js): `src/firebase.js`
- **Realtime Database**

### Other components

- **Dashboard user**
- **ESP32 sensor**

## Connections

- Dashboard user → React entry: opens dashboard
- React entry → App shell: renders (evidence: `src/index.js`)
- App shell → Dashboard controller: renders (evidence: `src/App.js`)
- Dashboard controller → Connection header: renders (evidence: `src/components/Dashboard.jsx`)
- Dashboard controller → Device status: renders (evidence: `src/components/Dashboard.jsx`)
- Dashboard controller → Current reading: renders (evidence: `src/components/Dashboard.jsx`)
- Dashboard controller → Reading history: renders (evidence: `src/components/Dashboard.jsx`)
- Dashboard controller → Firebase client: uses client (evidence: `src/components/Dashboard.jsx`)
- Firebase client → Realtime Database: initializes (evidence: `src/firebase.js`)
- Dashboard controller → Realtime Database: subscribes readings (evidence: `src/components/Dashboard.jsx`)
- ESP32 sensor → Realtime Database: sends telemetry
