# chandru07072007/the-chaotics-coal- architecture

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

- Interactive diagram: https://gitdiagram.com/chandru07072007/the-chaotics-coal-
- Repository: https://github.com/chandru07072007/the-chaotics-coal-

## Overview

The repository combines MUNKANIPPU’s mine-subsidence analysis pipeline with a separate browser-based tunnel digital twin. The documented MUNKANIPPU workflow runs from sensor and geotechnical datasets through cleaning and feature engineering, model benchmarking, prediction and risk assessment, then alert and heatmap outputs. The twin builds an interactive tunnel/geology scene and presents segment risk information. Hardware files suggest a sensor/server integration, but the available excerpts do not establish its runtime connection to either application.

Main entry points: [`Digital Twin/src/DigitalTwinManager.ts`](https://github.com/chandru07072007/the-chaotics-coal-/blob/main/Digital%20Twin/src/DigitalTwinManager.ts) (Twin Manager), [`Ml for project coal/main.py`](https://github.com/chandru07072007/the-chaotics-coal-/blob/main/Ml%20for%20%20project%20%20coal/main.py) (Pipeline & Analyzer), [`Digital Twin/src/Calculations.ts`](https://github.com/chandru07072007/the-chaotics-coal-/blob/main/Digital%20Twin/src/Calculations.ts) (Risk Calculations), [`Ml for project coal/visualize_heatmap.py`](https://github.com/chandru07072007/the-chaotics-coal-/blob/main/Ml%20for%20%20project%20%20coal/visualize_heatmap.py) (Heatmap Visualizations)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_pipeline["Subsidence Pipeline"]
  node_datasets[("Input Datasets")]
  node_features["Cleaning &amp; Features"]
  node_benchmark["Model Benchmarking<br/>[benchmark.py]"]
  node_orchestrator["Pipeline &amp; Analyzer<br/>[main.py]"]
  node_alerts["Alert Ledger<br/>[alert_ledger.csv]"]
  node_heatmaps["Heatmap Visualizations"]
  node_pipeline_outputs["Generated Outputs"]
end

subgraph group_twin["Tunnel Digital Twin"]
  node_entry["Twin App Entry<br/>[main.ts]"]
  node_manager["Twin Manager"]
  node_model["Twin Domain Model<br/>[DataModel.ts]"]
  node_calculations["Risk Calculations<br/>[Calculations.ts]"]
  node_scene["Three.js Scene<br/>[ThreeScene.ts]"]
  node_tunnel["Tunnel View<br/>[TunnelView.ts]"]
  node_geology["Geology View<br/>[GeologyView.ts]"]
  node_sensors["Sensor &amp; Failure View<br/>[SensorView.ts]"]
  node_ui["Metrics &amp; Charts<br/>[UIManager.ts]"]
end

subgraph group_hardware["Sensor Hardware"]
  node_mesh["Wireless Sensor Mesh<br/>[esp32_sensors.ino]"]
  node_server["Hardware Server<br/>[server.py]"]
end

node_operator(("Operator"))
node_browser(("Browser User"))

node_operator -->|"runs analysis"| node_orchestrator
node_datasets -->|"provides inputs"| node_features
node_orchestrator -->|"runs engineering"| node_features
node_orchestrator -->|"runs benchmarks"| node_benchmark
node_orchestrator -->|"requests plots"| node_heatmaps
node_orchestrator -->|"writes ledger"| node_alerts
node_orchestrator -->|"saves results"| node_pipeline_outputs
node_heatmaps -->|"renders heatmaps"| node_pipeline_outputs
node_browser -->|"opens app"| node_entry
node_entry -->|"creates manager"| node_manager
node_manager -->|"creates scene"| node_scene
node_manager -->|"builds tunnel"| node_tunnel
node_manager -->|"builds geology"| node_geology
node_manager -->|"manages sensors"| node_sensors
node_manager -->|"updates interface"| node_ui
node_manager -->|"uses types"| node_model
node_manager -->|"calculates analysis"| node_calculations
node_geology -->|"gets terrain"| node_calculations
node_sensors -->|"gets terrain"| node_calculations
node_ui -->|"gets terrain"| node_calculations
node_tunnel -->|"uses config"| node_model
node_mesh -.->|"sends telemetry"| node_server

click node_datasets "https://github.com/chandru07072007/the-chaotics-coal-/tree/main/dataset"
click node_features "https://github.com/chandru07072007/the-chaotics-coal-/blob/main/Ml%20for%20%20project%20%20coal/feature_engineering.py"
click node_benchmark "https://github.com/chandru07072007/the-chaotics-coal-/blob/main/Ml%20for%20%20project%20%20coal/benchmark.py"
click node_orchestrator "https://github.com/chandru07072007/the-chaotics-coal-/blob/main/Ml%20for%20%20project%20%20coal/main.py"
click node_alerts "https://github.com/chandru07072007/the-chaotics-coal-/blob/main/Ml%20for%20%20project%20%20coal/output/alert_ledger.csv"
click node_heatmaps "https://github.com/chandru07072007/the-chaotics-coal-/blob/main/Ml%20for%20%20project%20%20coal/visualize_heatmap.py"
click node_pipeline_outputs "https://github.com/chandru07072007/the-chaotics-coal-/tree/main/Ml%20for%20%20project%20%20coal/output"
click node_entry "https://github.com/chandru07072007/the-chaotics-coal-/blob/main/Digital%20Twin/src/main.ts"
click node_manager "https://github.com/chandru07072007/the-chaotics-coal-/blob/main/Digital%20Twin/src/DigitalTwinManager.ts"
click node_model "https://github.com/chandru07072007/the-chaotics-coal-/blob/main/Digital%20Twin/src/DataModel.ts"
click node_calculations "https://github.com/chandru07072007/the-chaotics-coal-/blob/main/Digital%20Twin/src/Calculations.ts"
click node_scene "https://github.com/chandru07072007/the-chaotics-coal-/blob/main/Digital%20Twin/src/ThreeScene.ts"
click node_tunnel "https://github.com/chandru07072007/the-chaotics-coal-/blob/main/Digital%20Twin/src/TunnelView.ts"
click node_geology "https://github.com/chandru07072007/the-chaotics-coal-/blob/main/Digital%20Twin/src/GeologyView.ts"
click node_sensors "https://github.com/chandru07072007/the-chaotics-coal-/blob/main/Digital%20Twin/src/SensorView.ts"
click node_ui "https://github.com/chandru07072007/the-chaotics-coal-/blob/main/Digital%20Twin/src/UIManager.ts"
click node_mesh "https://github.com/chandru07072007/the-chaotics-coal-/blob/main/hardware/esp32_sensors.ino"
click node_server "https://github.com/chandru07072007/the-chaotics-coal-/blob/main/hardware/server.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_datasets,node_features,node_benchmark,node_orchestrator,node_alerts,node_heatmaps,node_pipeline_outputs,node_browser toneBlue
class node_entry,node_manager,node_model,node_calculations,node_scene,node_tunnel,node_geology,node_sensors,node_ui toneAmber
class node_mesh,node_server toneMint
class node_operator toneIndigo
```

## Components

### Subsidence Pipeline

- [Input Datasets](https://github.com/chandru07072007/the-chaotics-coal-/tree/main/dataset): `dataset`
- [Cleaning & Features](https://github.com/chandru07072007/the-chaotics-coal-/blob/main/Ml%20for%20%20project%20%20coal/feature_engineering.py): `Ml for project coal/feature_engineering.py`
- [Model Benchmarking](https://github.com/chandru07072007/the-chaotics-coal-/blob/main/Ml%20for%20%20project%20%20coal/benchmark.py): `Ml for project coal/benchmark.py`
- [Pipeline & Analyzer](https://github.com/chandru07072007/the-chaotics-coal-/blob/main/Ml%20for%20%20project%20%20coal/main.py): `Ml for project coal/main.py`
- [Alert Ledger](https://github.com/chandru07072007/the-chaotics-coal-/blob/main/Ml%20for%20%20project%20%20coal/output/alert_ledger.csv): `Ml for project coal/output/alert_ledger.csv`
- [Heatmap Visualizations](https://github.com/chandru07072007/the-chaotics-coal-/blob/main/Ml%20for%20%20project%20%20coal/visualize_heatmap.py): `Ml for project coal/visualize_heatmap.py`
- [Generated Outputs](https://github.com/chandru07072007/the-chaotics-coal-/tree/main/Ml%20for%20%20project%20%20coal/output): `Ml for project coal/output`

### Tunnel Digital Twin

- [Twin App Entry](https://github.com/chandru07072007/the-chaotics-coal-/blob/main/Digital%20Twin/src/main.ts): `Digital Twin/src/main.ts`
- [Twin Manager](https://github.com/chandru07072007/the-chaotics-coal-/blob/main/Digital%20Twin/src/DigitalTwinManager.ts): `Digital Twin/src/DigitalTwinManager.ts`
- [Twin Domain Model](https://github.com/chandru07072007/the-chaotics-coal-/blob/main/Digital%20Twin/src/DataModel.ts): `Digital Twin/src/DataModel.ts`
- [Risk Calculations](https://github.com/chandru07072007/the-chaotics-coal-/blob/main/Digital%20Twin/src/Calculations.ts): `Digital Twin/src/Calculations.ts`
- [Three.js Scene](https://github.com/chandru07072007/the-chaotics-coal-/blob/main/Digital%20Twin/src/ThreeScene.ts): `Digital Twin/src/ThreeScene.ts`
- [Tunnel View](https://github.com/chandru07072007/the-chaotics-coal-/blob/main/Digital%20Twin/src/TunnelView.ts): `Digital Twin/src/TunnelView.ts`
- [Geology View](https://github.com/chandru07072007/the-chaotics-coal-/blob/main/Digital%20Twin/src/GeologyView.ts): `Digital Twin/src/GeologyView.ts`
- [Sensor & Failure View](https://github.com/chandru07072007/the-chaotics-coal-/blob/main/Digital%20Twin/src/SensorView.ts): `Digital Twin/src/SensorView.ts`
- [Metrics & Charts](https://github.com/chandru07072007/the-chaotics-coal-/blob/main/Digital%20Twin/src/UIManager.ts): `Digital Twin/src/UIManager.ts`

### Sensor Hardware

- [Wireless Sensor Mesh](https://github.com/chandru07072007/the-chaotics-coal-/blob/main/hardware/esp32_sensors.ino): `hardware/esp32_sensors.ino`
- [Hardware Server](https://github.com/chandru07072007/the-chaotics-coal-/blob/main/hardware/server.py): `hardware/server.py`

### Other components

- **Operator**
- **Browser User**

## Connections

- Operator → Pipeline & Analyzer: runs analysis (evidence: `README.md`)
- Input Datasets → Cleaning & Features: provides inputs (evidence: `README.md`)
- Pipeline & Analyzer → Cleaning & Features: runs engineering (evidence: `Ml for  project  coal/main.py`)
- Pipeline & Analyzer → Model Benchmarking: runs benchmarks (evidence: `README.md`)
- Pipeline & Analyzer → Heatmap Visualizations: requests plots (evidence: `Ml for  project  coal/main.py`)
- Pipeline & Analyzer → Alert Ledger: writes ledger (evidence: `Ml for  project  coal/main.py`)
- Pipeline & Analyzer → Generated Outputs: saves results (evidence: `README.md`)
- Heatmap Visualizations → Generated Outputs: renders heatmaps (evidence: `README.md`)
- Browser User → Twin App Entry: opens app (evidence: `Digital Twin/src/main.ts`)
- Twin App Entry → Twin Manager: creates manager (evidence: `Digital Twin/src/main.ts`)
- Twin Manager → Three.js Scene: creates scene (evidence: `Digital Twin/src/DigitalTwinManager.ts`)
- Twin Manager → Tunnel View: builds tunnel (evidence: `Digital Twin/src/DigitalTwinManager.ts`)
- Twin Manager → Geology View: builds geology (evidence: `Digital Twin/src/DigitalTwinManager.ts`)
- Twin Manager → Sensor & Failure View: manages sensors (evidence: `Digital Twin/src/DigitalTwinManager.ts`)
- Twin Manager → Metrics & Charts: updates interface (evidence: `Digital Twin/src/DigitalTwinManager.ts`)
- Twin Manager → Twin Domain Model: uses types (evidence: `Digital Twin/src/DigitalTwinManager.ts`)
- Twin Manager → Risk Calculations: calculates analysis (evidence: `Digital Twin/src/DigitalTwinManager.ts`)
- Geology View → Risk Calculations: gets terrain (evidence: `Digital Twin/src/GeologyView.ts`)
- Sensor & Failure View → Risk Calculations: gets terrain (evidence: `Digital Twin/src/SensorView.ts`)
- Metrics & Charts → Risk Calculations: gets terrain (evidence: `Digital Twin/src/UIManager.ts`)
- Tunnel View → Twin Domain Model: uses config (evidence: `Digital Twin/src/TunnelView.ts`)
- Wireless Sensor Mesh → Hardware Server: sends telemetry
