# aravindsekar67-droid/newdashboard architecture

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

- Interactive diagram: https://gitdiagram.com/aravindsekar67-droid/newdashboard
- Repository: https://github.com/aravindsekar67-droid/newdashboard

## Overview

Smart-Belt AI is an industrial conveyor monitoring dashboard and backend for tracking belt-joint condition, detecting defects, predicting maintenance risk, and controlling/simulating conveyor state. Operators view live telemetry and a 3D twin, inspect joint history and localization, and use fault or conveyor controls; the dashboard calls backend APIs for predictions and history. The backend fuses sensor and camera signals, stores joint logs, and exposes predictive, camera, and control capabilities. Evidence is limited to the excerpts and file tree; unshown API wiring and frontend 3D integration are omitted where not established.

Main entry points: [`app.js`](https://github.com/aravindsekar67-droid/newdashboard/blob/main/app.js) (Dashboard controller), [`backend.py`](https://github.com/aravindsekar67-droid/newdashboard/blob/main/backend.py) (Runtime backend), [`digital_twin_3d.js`](https://github.com/aravindsekar67-droid/newdashboard/blob/main/digital_twin_3d.js) (3D conveyor twin), [`api/index.py`](https://github.com/aravindsekar67-droid/newdashboard/blob/main/api/index.py) (Prediction endpoint)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Operator dashboard"]
  node_dashboard["Dashboard controller<br/>[app.js]"]
  node_twin["3D conveyor twin<br/>[digital_twin_3d.js]"]
  node_controls["3D view controls<br/>[OrbitControls.js]"]
end

subgraph group_services["Monitoring services"]
  node_api_service["API service<br/>[index.py]"]
  node_runtime_service["Runtime backend<br/>[backend.py]"]
  node_camera["Camera inference<br/>[backend.py]"]
  node_mqtt["MQTT ingestion<br/>[backend.py]"]
end

subgraph group_analytics["Condition analytics"]
  node_predictive["Predictive metrics<br/>[backend.py]"]
  node_fusion["Sensor fusion<br/>[backend.py]"]
  node_rul["RUL forecast<br/>[backend.py]"]
  node_api_predict["Prediction endpoint<br/>[index.py]"]
  node_history["Joint history<br/>[index.py]"]
  node_localization["NFC localization<br/>[backend.py]"]
  node_control["Conveyor control<br/>[backend.py]"]
  node_fault_sim["Fault simulation<br/>[backend.py]"]
end

subgraph group_state["Telemetry state"]
  node_store[("Joint log database<br/>[backend.py]")]
  node_live["Live telemetry<br/>[backend.py]"]
  node_camera_feed["Camera stream<br/>[backend.py]"]
end

node_operator(("Operator"))
node_external_sensors(("Sensor hardware"))

node_operator -->|"uses"| node_dashboard
node_dashboard -->|"requests history"| node_api_service
node_dashboard -->|"requests predictions"| node_api_predict
node_dashboard -.->|"requests camera"| node_runtime_service
node_dashboard -.->|"views twin"| node_twin
node_twin -.->|"uses controls"| node_controls
node_external_sensors -->|"sends readings"| node_mqtt
node_mqtt -->|"updates"| node_live
node_mqtt -->|"saves logs"| node_store
node_camera -->|"produces stream"| node_camera_feed
node_camera -->|"updates defects"| node_live
node_runtime_service -->|"runs inference"| node_camera
node_runtime_service -->|"updates health"| node_fusion
node_fusion -->|"computes metrics"| node_predictive
node_fusion -->|"updates risk"| node_live
node_runtime_service -->|"writes logs"| node_store
node_history -->|"reads logs"| node_store
node_api_predict -->|"computes metrics"| node_predictive
node_dashboard -->|"loads joint history"| node_history
node_dashboard -.->|"requests location"| node_localization
node_dashboard -.->|"controls conveyor"| node_control
node_dashboard -.->|"simulates faults"| node_fault_sim
node_rul -->|"reads health"| node_live

click node_dashboard "https://github.com/aravindsekar67-droid/newdashboard/blob/main/app.js"
click node_twin "https://github.com/aravindsekar67-droid/newdashboard/blob/main/digital_twin_3d.js"
click node_controls "https://github.com/aravindsekar67-droid/newdashboard/blob/main/libs/OrbitControls.js"
click node_api_service "https://github.com/aravindsekar67-droid/newdashboard/blob/main/api/index.py"
click node_runtime_service "https://github.com/aravindsekar67-droid/newdashboard/blob/main/backend.py"
click node_camera "https://github.com/aravindsekar67-droid/newdashboard/blob/main/backend.py"
click node_mqtt "https://github.com/aravindsekar67-droid/newdashboard/blob/main/backend.py"
click node_predictive "https://github.com/aravindsekar67-droid/newdashboard/blob/main/backend.py"
click node_fusion "https://github.com/aravindsekar67-droid/newdashboard/blob/main/backend.py"
click node_rul "https://github.com/aravindsekar67-droid/newdashboard/blob/main/backend.py"
click node_api_predict "https://github.com/aravindsekar67-droid/newdashboard/blob/main/api/index.py"
click node_history "https://github.com/aravindsekar67-droid/newdashboard/blob/main/api/index.py"
click node_localization "https://github.com/aravindsekar67-droid/newdashboard/blob/main/backend.py"
click node_control "https://github.com/aravindsekar67-droid/newdashboard/blob/main/backend.py"
click node_fault_sim "https://github.com/aravindsekar67-droid/newdashboard/blob/main/backend.py"
click node_store "https://github.com/aravindsekar67-droid/newdashboard/blob/main/backend.py"
click node_live "https://github.com/aravindsekar67-droid/newdashboard/blob/main/backend.py"
click node_camera_feed "https://github.com/aravindsekar67-droid/newdashboard/blob/main/backend.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,node_twin,node_controls toneBlue
class node_api_service,node_runtime_service,node_camera,node_mqtt toneAmber
class node_predictive,node_fusion,node_rul,node_api_predict,node_history,node_localization,node_control,node_fault_sim toneMint
class node_store,node_live,node_camera_feed toneRose
class node_operator,node_external_sensors toneIndigo
```

## Components

### Operator dashboard

- [Dashboard controller](https://github.com/aravindsekar67-droid/newdashboard/blob/main/app.js): `app.js`
- [3D conveyor twin](https://github.com/aravindsekar67-droid/newdashboard/blob/main/digital_twin_3d.js): `digital_twin_3d.js`
- [3D view controls](https://github.com/aravindsekar67-droid/newdashboard/blob/main/libs/OrbitControls.js): `libs/OrbitControls.js`

### Monitoring services

- [API service](https://github.com/aravindsekar67-droid/newdashboard/blob/main/api/index.py): `api/index.py`
- [Runtime backend](https://github.com/aravindsekar67-droid/newdashboard/blob/main/backend.py): `backend.py`
- [Camera inference](https://github.com/aravindsekar67-droid/newdashboard/blob/main/backend.py): `backend.py`
- [MQTT ingestion](https://github.com/aravindsekar67-droid/newdashboard/blob/main/backend.py): `backend.py`

### Condition analytics

- [Predictive metrics](https://github.com/aravindsekar67-droid/newdashboard/blob/main/backend.py): `backend.py`
- [Sensor fusion](https://github.com/aravindsekar67-droid/newdashboard/blob/main/backend.py): `backend.py`
- [RUL forecast](https://github.com/aravindsekar67-droid/newdashboard/blob/main/backend.py): `backend.py`
- [Prediction endpoint](https://github.com/aravindsekar67-droid/newdashboard/blob/main/api/index.py): `api/index.py`
- [Joint history](https://github.com/aravindsekar67-droid/newdashboard/blob/main/api/index.py): `api/index.py`
- [NFC localization](https://github.com/aravindsekar67-droid/newdashboard/blob/main/backend.py): `backend.py`
- [Conveyor control](https://github.com/aravindsekar67-droid/newdashboard/blob/main/backend.py): `backend.py`
- [Fault simulation](https://github.com/aravindsekar67-droid/newdashboard/blob/main/backend.py): `backend.py`

### Telemetry state

- [Joint log database](https://github.com/aravindsekar67-droid/newdashboard/blob/main/backend.py): `backend.py`
- [Live telemetry](https://github.com/aravindsekar67-droid/newdashboard/blob/main/backend.py): `backend.py`
- [Camera stream](https://github.com/aravindsekar67-droid/newdashboard/blob/main/backend.py): `backend.py`

### Other components

- **Operator**
- **Sensor hardware**

## Connections

- Operator → Dashboard controller: uses (evidence: `app.js`)
- Dashboard controller → API service: requests history (evidence: `app.js`)
- Dashboard controller → Prediction endpoint: requests predictions (evidence: `app.js`)
- Dashboard controller → Runtime backend: requests camera
- Dashboard controller → 3D conveyor twin: views twin
- 3D conveyor twin → 3D view controls: uses controls
- Sensor hardware → MQTT ingestion: sends readings (evidence: `backend.py`)
- MQTT ingestion → Live telemetry: updates (evidence: `backend.py`)
- MQTT ingestion → Joint log database: saves logs (evidence: `backend.py`)
- Camera inference → Camera stream: produces stream (evidence: `backend.py`)
- Camera inference → Live telemetry: updates defects (evidence: `backend.py`)
- Runtime backend → Camera inference: runs inference (evidence: `backend.py`)
- Runtime backend → Sensor fusion: updates health (evidence: `backend.py`)
- Sensor fusion → Predictive metrics: computes metrics (evidence: `backend.py`)
- Sensor fusion → Live telemetry: updates risk (evidence: `backend.py`)
- Runtime backend → Joint log database: writes logs (evidence: `backend.py`)
- Joint history → Joint log database: reads logs (evidence: `api/index.py`)
- Prediction endpoint → Predictive metrics: computes metrics (evidence: `api/index.py`)
- Dashboard controller → Joint history: loads joint history (evidence: `app.js`)
- Dashboard controller → NFC localization: requests location
- Dashboard controller → Conveyor control: controls conveyor
- Dashboard controller → Fault simulation: simulates faults
- RUL forecast → Live telemetry: reads health (evidence: `backend.py`)
