# garudra/aeris---piston-engine-digital-twin-sih-2026-sih26054 architecture

> Architecture diagram of the GitHub repository garudra/aeris---piston-engine-digital-twin-sih-2026-sih26054, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-05). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/garudra/aeris---piston-engine-digital-twin-sih-2026-sih26054
- Repository: https://github.com/garudra/aeris---piston-engine-digital-twin-sih-2026-sih26054

## Overview

AERIS is a piston-engine digital twin with live telemetry, fault injection, ML health prediction, and a React cockpit. The main workflow is cockpit controls to the backend API, which drives the physics simulator, streams telemetry, runs inference, and persists alert records; the cockpit presents live readings, trends, engine visualization, and fault history. Dataset generation and ML training are separate supporting capabilities. Connections follow the excerpts and README; training/data wiring is not asserted where source evidence was unavailable.

Main entry points: [`Frontend/src/App.tsx`](https://github.com/garudra/aeris---piston-engine-digital-twin-sih-2026-sih26054/blob/main/Frontend/src/App.tsx) (Cockpit dashboard), [`Backend/api.py`](https://github.com/garudra/aeris---piston-engine-digital-twin-sih-2026-sih26054/blob/main/Backend/api.py) (API and stream), [`ML/train_pipeline.py`](https://github.com/garudra/aeris---piston-engine-digital-twin-sih-2026-sih26054/blob/main/ML/train_pipeline.py) (Model training), [`Backend/generate_dataset.py`](https://github.com/garudra/aeris---piston-engine-digital-twin-sih-2026-sih26054/blob/main/Backend/generate_dataset.py) (Dataset generator)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_backend["Live backend"]
  node_api["API and stream<br/>[api.py]"]
  node_sim["Engine simulator<br/>[engine_model.py]"]
end

subgraph group_ml_data["ML and data"]
  node_inference["ML inference<br/>[predict.py]"]
  node_training["Model training<br/>[train_pipeline.py]"]
  node_generator["Dataset generator"]
  node_dataset["Engine dataset<br/>[engine_dataset.csv]"]
  node_fault_catalog["Fault catalog<br/>[fault_catalog.json]"]
end

subgraph group_cockpit["Cockpit UI"]
  node_app["Cockpit dashboard<br/>[App.tsx]"]
  node_engine_hook["Telemetry and controls<br/>[engine.ts]"]
  node_engine_svg["Engine visualization<br/>[EngineSVG.tsx]"]
  node_charts["Telemetry charts<br/>[charts.tsx]"]
  node_bootstrap["UI entry point<br/>[main.tsx]"]
end

subgraph group_persistence["Alert history"]
  node_sqlite[("Fault history store<br/>[db.py]")]
end

node_user(("Operator"))

node_user -->|"operates"| node_app
node_bootstrap -->|"renders"| node_app
node_app -->|"uses controls"| node_engine_hook
node_app -->|"renders"| node_engine_svg
node_app -->|"renders"| node_charts
node_engine_hook -->|"sends controls"| node_api
node_api -->|"drives simulation"| node_sim
node_api -->|"predicts health"| node_inference
node_api -->|"stores alerts"| node_sqlite
node_generator -->|"simulates runs"| node_sim
node_generator -->|"writes dataset"| node_dataset
node_training -.->|"trains from data"| node_dataset
node_training -.->|"exports models"| node_inference

click node_api "https://github.com/garudra/aeris---piston-engine-digital-twin-sih-2026-sih26054/blob/main/Backend/api.py"
click node_sim "https://github.com/garudra/aeris---piston-engine-digital-twin-sih-2026-sih26054/blob/main/Backend/engine_model.py"
click node_inference "https://github.com/garudra/aeris---piston-engine-digital-twin-sih-2026-sih26054/blob/main/Backend/ml/predict.py"
click node_training "https://github.com/garudra/aeris---piston-engine-digital-twin-sih-2026-sih26054/blob/main/ML/train_pipeline.py"
click node_generator "https://github.com/garudra/aeris---piston-engine-digital-twin-sih-2026-sih26054/blob/main/Backend/generate_dataset.py"
click node_dataset "https://github.com/garudra/aeris---piston-engine-digital-twin-sih-2026-sih26054/blob/main/Database/engine_dataset.csv"
click node_fault_catalog "https://github.com/garudra/aeris---piston-engine-digital-twin-sih-2026-sih26054/blob/main/Database/fault_catalog.json"
click node_sqlite "https://github.com/garudra/aeris---piston-engine-digital-twin-sih-2026-sih26054/blob/main/Backend/db.py"
click node_app "https://github.com/garudra/aeris---piston-engine-digital-twin-sih-2026-sih26054/blob/main/Frontend/src/App.tsx"
click node_engine_hook "https://github.com/garudra/aeris---piston-engine-digital-twin-sih-2026-sih26054/blob/main/Frontend/src/dashboard/engine.ts"
click node_engine_svg "https://github.com/garudra/aeris---piston-engine-digital-twin-sih-2026-sih26054/blob/main/Frontend/src/dashboard/EngineSVG.tsx"
click node_charts "https://github.com/garudra/aeris---piston-engine-digital-twin-sih-2026-sih26054/blob/main/Frontend/src/dashboard/charts.tsx"
click node_bootstrap "https://github.com/garudra/aeris---piston-engine-digital-twin-sih-2026-sih26054/blob/main/Frontend/src/main.tsx"

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_api,node_sim toneBlue
class node_inference,node_training,node_generator,node_dataset,node_fault_catalog toneAmber
class node_app,node_engine_hook,node_engine_svg,node_charts,node_bootstrap toneMint
class node_sqlite toneRose
class node_user toneIndigo
```

## Components

### Live backend

- [API and stream](https://github.com/garudra/aeris---piston-engine-digital-twin-sih-2026-sih26054/blob/main/Backend/api.py): `Backend/api.py`
- [Engine simulator](https://github.com/garudra/aeris---piston-engine-digital-twin-sih-2026-sih26054/blob/main/Backend/engine_model.py): `Backend/engine_model.py`

### ML and data

- [ML inference](https://github.com/garudra/aeris---piston-engine-digital-twin-sih-2026-sih26054/blob/main/Backend/ml/predict.py): `Backend/ml/predict.py`
- [Model training](https://github.com/garudra/aeris---piston-engine-digital-twin-sih-2026-sih26054/blob/main/ML/train_pipeline.py): `ML/train_pipeline.py`
- [Dataset generator](https://github.com/garudra/aeris---piston-engine-digital-twin-sih-2026-sih26054/blob/main/Backend/generate_dataset.py): `Backend/generate_dataset.py`
- [Engine dataset](https://github.com/garudra/aeris---piston-engine-digital-twin-sih-2026-sih26054/blob/main/Database/engine_dataset.csv): `Database/engine_dataset.csv`
- [Fault catalog](https://github.com/garudra/aeris---piston-engine-digital-twin-sih-2026-sih26054/blob/main/Database/fault_catalog.json): `Database/fault_catalog.json`

### Cockpit UI

- [Cockpit dashboard](https://github.com/garudra/aeris---piston-engine-digital-twin-sih-2026-sih26054/blob/main/Frontend/src/App.tsx): `Frontend/src/App.tsx`
- [Telemetry and controls](https://github.com/garudra/aeris---piston-engine-digital-twin-sih-2026-sih26054/blob/main/Frontend/src/dashboard/engine.ts): `Frontend/src/dashboard/engine.ts`
- [Engine visualization](https://github.com/garudra/aeris---piston-engine-digital-twin-sih-2026-sih26054/blob/main/Frontend/src/dashboard/EngineSVG.tsx): `Frontend/src/dashboard/EngineSVG.tsx`
- [Telemetry charts](https://github.com/garudra/aeris---piston-engine-digital-twin-sih-2026-sih26054/blob/main/Frontend/src/dashboard/charts.tsx): `Frontend/src/dashboard/charts.tsx`
- [UI entry point](https://github.com/garudra/aeris---piston-engine-digital-twin-sih-2026-sih26054/blob/main/Frontend/src/main.tsx): `Frontend/src/main.tsx`

### Alert history

- [Fault history store](https://github.com/garudra/aeris---piston-engine-digital-twin-sih-2026-sih26054/blob/main/Backend/db.py): `Backend/db.py`

### Other components

- **Operator**

## Connections

- Operator → Cockpit dashboard: operates (evidence: `README.md`)
- UI entry point → Cockpit dashboard: renders (evidence: `Frontend/src/main.tsx`)
- Cockpit dashboard → Telemetry and controls: uses controls (evidence: `Frontend/src/App.tsx`)
- Cockpit dashboard → Engine visualization: renders (evidence: `Frontend/src/App.tsx`)
- Cockpit dashboard → Telemetry charts: renders (evidence: `Frontend/src/App.tsx`)
- Telemetry and controls → API and stream: sends controls (evidence: `Frontend/src/dashboard/engine.ts`)
- API and stream → Engine simulator: drives simulation (evidence: `Backend/api.py`)
- API and stream → ML inference: predicts health (evidence: `Backend/api.py`)
- API and stream → Fault history store: stores alerts (evidence: `Backend/api.py`)
- Dataset generator → Engine simulator: simulates runs (evidence: `Backend/generate_dataset.py`)
- Dataset generator → Engine dataset: writes dataset (evidence: `README.md`)
- Model training → Engine dataset: trains from data
- Model training → ML inference: exports models (evidence: `README.md`)
