# qwertypoiuy9/sih_249-devin architecture

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

- Interactive diagram: https://gitdiagram.com/qwertypoiuy9/sih_249-devin
- Repository: https://github.com/qwertypoiuy9/sih_249-devin

## Overview

AirPower is a simulated predictive-maintenance and fleet-availability application. A duty controller starts at the fleet overview, then drills into an aircraft twin or a fault alert; maintenance actions can create work orders and spare indents, while data and command users review integration health and analytics. The graph reflects documented navigation, imports, and README-described actions. Data is simulated, and unsampled page implementations are represented only where the README documents their capabilities.

Main entry points: [`src/App.tsx`](https://github.com/qwertypoiuy9/sih_249-devin/blob/main/src/App.tsx) (App navigation), [`src/data/ops.ts`](https://github.com/qwertypoiuy9/sih_249-devin/blob/main/src/data/ops.ts) (Ops and records), [`src/data/fleet.ts`](https://github.com/qwertypoiuy9/sih_249-devin/blob/main/src/data/fleet.ts) (Aircraft records), [`src/data/predictions.ts`](https://github.com/qwertypoiuy9/sih_249-devin/blob/main/src/data/predictions.ts) (Fault predictions)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Fleet experience"]
  node_app["App navigation<br/>[App.tsx]"]
  node_overview["Fleet overview<br/>[Overview.tsx]"]
  node_inventory["Aircraft inventory<br/>[Fleet.tsx]"]
  node_twin["Digital twin<br/>[Twin.tsx]"]
  node_faults["Predictive faults<br/>[Predictions.tsx]"]
  node_analytics["Maintenance analytics<br/>[Analytics.tsx]"]
end

subgraph group_operations["Maintenance operations"]
  node_work["Work control<br/>[Maintenance.tsx]"]
  node_spares["Spares and stores<br/>[Spares.tsx]"]
  node_datahub["Data integration<br/>[DataHub.tsx]"]
end

subgraph group_data["Fleet data"]
  node_fleetdata[("Aircraft records<br/>[fleet.ts]")]
  node_preddata[("Fault predictions<br/>[predictions.ts]")]
  node_opsdata[("Ops and records<br/>[ops.ts]")]
  node_telemetry[("Telemetry samples<br/>[telemetry.ts]")]
  node_metrics["Fleet metrics<br/>[metrics.ts]"]
end

subgraph group_runtime["Shared runtime"]
  node_detector["Online detector<br/>[detector.ts]"]
  node_platform["Shared state<br/>[platform.tsx]"]
  node_random["Seeded generator<br/>[rng.ts]"]
  node_charts["SVG charts<br/>[charts.tsx]"]
  node_ui["UI components<br/>[ui.tsx]"]
end

node_controller(("Fleet user"))
node_browserstore[("Browser localStorage")]

node_controller -->|"opens"| node_app
node_app -->|"provides state"| node_platform
node_app -->|"routes to"| node_overview
node_app -->|"routes to"| node_inventory
node_app -->|"routes to"| node_twin
node_app -->|"routes to"| node_faults
node_app -->|"routes to"| node_work
node_app -->|"routes to"| node_spares
node_app -->|"routes to"| node_datahub
node_app -->|"routes to"| node_analytics
node_overview -->|"reads"| node_fleetdata
node_overview -->|"reads"| node_preddata
node_overview -->|"reads"| node_opsdata
node_overview -->|"reads"| node_metrics
node_inventory -->|"reads"| node_fleetdata
node_inventory -->|"reads"| node_preddata
node_inventory -->|"reads"| node_opsdata
node_twin -->|"reads"| node_fleetdata
node_twin -->|"reads"| node_preddata
node_twin -->|"reads"| node_opsdata
node_twin -->|"reads and ticks"| node_telemetry
node_twin -->|"scores samples"| node_detector
node_faults -->|"reads"| node_preddata
node_faults -->|"reads"| node_opsdata
node_faults -->|"reads"| node_metrics
node_faults -->|"records actions"| node_platform
node_work -->|"reads"| node_opsdata
node_work -->|"reads shared state"| node_platform
node_spares -->|"reads"| node_opsdata
node_spares -->|"reads shared state"| node_platform
node_datahub -->|"reads"| node_opsdata
node_datahub -->|"reads"| node_fleetdata
node_datahub -->|"scores uploads"| node_detector
node_datahub -->|"logs events"| node_platform
node_analytics -->|"reads"| node_opsdata
node_analytics -->|"reads"| node_fleetdata
node_analytics -->|"reads"| node_metrics
node_metrics -->|"derives metrics"| node_fleetdata
node_metrics -->|"derives metrics"| node_preddata
node_metrics -->|"derives metrics"| node_opsdata
node_opsdata -->|"builds work orders"| node_fleetdata
node_opsdata -->|"seeds work orders"| node_preddata
node_fleetdata -->|"generates records"| node_random
node_preddata -->|"builds per aircraft"| node_fleetdata
node_preddata -->|"generates estimates"| node_random
node_platform -->|"persists state"| node_browserstore
node_overview -->|"renders charts"| node_charts
node_overview -->|"renders controls"| node_ui

click node_app "https://github.com/qwertypoiuy9/sih_249-devin/blob/main/src/App.tsx"
click node_overview "https://github.com/qwertypoiuy9/sih_249-devin/blob/main/src/pages/Overview.tsx"
click node_inventory "https://github.com/qwertypoiuy9/sih_249-devin/blob/main/src/pages/Fleet.tsx"
click node_twin "https://github.com/qwertypoiuy9/sih_249-devin/blob/main/src/pages/Twin.tsx"
click node_faults "https://github.com/qwertypoiuy9/sih_249-devin/blob/main/src/pages/Predictions.tsx"
click node_analytics "https://github.com/qwertypoiuy9/sih_249-devin/blob/main/src/pages/Analytics.tsx"
click node_work "https://github.com/qwertypoiuy9/sih_249-devin/blob/main/src/pages/Maintenance.tsx"
click node_spares "https://github.com/qwertypoiuy9/sih_249-devin/blob/main/src/pages/Spares.tsx"
click node_datahub "https://github.com/qwertypoiuy9/sih_249-devin/blob/main/src/pages/DataHub.tsx"
click node_fleetdata "https://github.com/qwertypoiuy9/sih_249-devin/blob/main/src/data/fleet.ts"
click node_preddata "https://github.com/qwertypoiuy9/sih_249-devin/blob/main/src/data/predictions.ts"
click node_opsdata "https://github.com/qwertypoiuy9/sih_249-devin/blob/main/src/data/ops.ts"
click node_telemetry "https://github.com/qwertypoiuy9/sih_249-devin/blob/main/src/data/telemetry.ts"
click node_metrics "https://github.com/qwertypoiuy9/sih_249-devin/blob/main/src/lib/metrics.ts"
click node_detector "https://github.com/qwertypoiuy9/sih_249-devin/blob/main/src/lib/detector.ts"
click node_platform "https://github.com/qwertypoiuy9/sih_249-devin/blob/main/src/lib/platform.tsx"
click node_random "https://github.com/qwertypoiuy9/sih_249-devin/blob/main/src/lib/rng.ts"
click node_charts "https://github.com/qwertypoiuy9/sih_249-devin/blob/main/src/components/charts.tsx"
click node_ui "https://github.com/qwertypoiuy9/sih_249-devin/blob/main/src/components/ui.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_app,node_overview,node_inventory,node_twin,node_faults,node_analytics,node_controller toneBlue
class node_work,node_spares,node_datahub,node_browserstore toneAmber
class node_fleetdata,node_preddata,node_opsdata,node_telemetry,node_metrics toneMint
class node_detector,node_platform,node_random,node_charts,node_ui toneRose
```

## Components

### Fleet experience

- [App navigation](https://github.com/qwertypoiuy9/sih_249-devin/blob/main/src/App.tsx): `src/App.tsx`
- [Fleet overview](https://github.com/qwertypoiuy9/sih_249-devin/blob/main/src/pages/Overview.tsx): `src/pages/Overview.tsx`
- [Aircraft inventory](https://github.com/qwertypoiuy9/sih_249-devin/blob/main/src/pages/Fleet.tsx): `src/pages/Fleet.tsx`
- [Digital twin](https://github.com/qwertypoiuy9/sih_249-devin/blob/main/src/pages/Twin.tsx): `src/pages/Twin.tsx`
- [Predictive faults](https://github.com/qwertypoiuy9/sih_249-devin/blob/main/src/pages/Predictions.tsx): `src/pages/Predictions.tsx`
- [Maintenance analytics](https://github.com/qwertypoiuy9/sih_249-devin/blob/main/src/pages/Analytics.tsx): `src/pages/Analytics.tsx`

### Maintenance operations

- [Work control](https://github.com/qwertypoiuy9/sih_249-devin/blob/main/src/pages/Maintenance.tsx): `src/pages/Maintenance.tsx`
- [Spares and stores](https://github.com/qwertypoiuy9/sih_249-devin/blob/main/src/pages/Spares.tsx): `src/pages/Spares.tsx`
- [Data integration](https://github.com/qwertypoiuy9/sih_249-devin/blob/main/src/pages/DataHub.tsx): `src/pages/DataHub.tsx`

### Fleet data

- [Aircraft records](https://github.com/qwertypoiuy9/sih_249-devin/blob/main/src/data/fleet.ts): `src/data/fleet.ts`
- [Fault predictions](https://github.com/qwertypoiuy9/sih_249-devin/blob/main/src/data/predictions.ts): `src/data/predictions.ts`
- [Ops and records](https://github.com/qwertypoiuy9/sih_249-devin/blob/main/src/data/ops.ts): `src/data/ops.ts`
- [Telemetry samples](https://github.com/qwertypoiuy9/sih_249-devin/blob/main/src/data/telemetry.ts): `src/data/telemetry.ts`
- [Fleet metrics](https://github.com/qwertypoiuy9/sih_249-devin/blob/main/src/lib/metrics.ts): `src/lib/metrics.ts`

### Shared runtime

- [Online detector](https://github.com/qwertypoiuy9/sih_249-devin/blob/main/src/lib/detector.ts): `src/lib/detector.ts`
- [Shared state](https://github.com/qwertypoiuy9/sih_249-devin/blob/main/src/lib/platform.tsx): `src/lib/platform.tsx`
- [Seeded generator](https://github.com/qwertypoiuy9/sih_249-devin/blob/main/src/lib/rng.ts): `src/lib/rng.ts`
- [SVG charts](https://github.com/qwertypoiuy9/sih_249-devin/blob/main/src/components/charts.tsx): `src/components/charts.tsx`
- [UI components](https://github.com/qwertypoiuy9/sih_249-devin/blob/main/src/components/ui.tsx): `src/components/ui.tsx`

### Other components

- **Fleet user**
- **Browser localStorage**

## Connections

- Fleet user → App navigation: opens (evidence: `README.md`)
- App navigation → Shared state: provides state (evidence: `src/App.tsx`)
- App navigation → Fleet overview: routes to (evidence: `src/App.tsx`)
- App navigation → Aircraft inventory: routes to (evidence: `src/App.tsx`)
- App navigation → Digital twin: routes to (evidence: `src/App.tsx`)
- App navigation → Predictive faults: routes to (evidence: `src/App.tsx`)
- App navigation → Work control: routes to (evidence: `src/App.tsx`)
- App navigation → Spares and stores: routes to (evidence: `src/App.tsx`)
- App navigation → Data integration: routes to (evidence: `src/App.tsx`)
- App navigation → Maintenance analytics: routes to (evidence: `src/App.tsx`)
- Fleet overview → Aircraft records: reads (evidence: `src/pages/Overview.tsx`)
- Fleet overview → Fault predictions: reads (evidence: `src/pages/Overview.tsx`)
- Fleet overview → Ops and records: reads (evidence: `src/pages/Overview.tsx`)
- Fleet overview → Fleet metrics: reads (evidence: `src/pages/Overview.tsx`)
- Aircraft inventory → Aircraft records: reads (evidence: `src/pages/Fleet.tsx`)
- Aircraft inventory → Fault predictions: reads (evidence: `src/pages/Fleet.tsx`)
- Aircraft inventory → Ops and records: reads (evidence: `src/pages/Fleet.tsx`)
- Digital twin → Aircraft records: reads (evidence: `src/pages/Twin.tsx`)
- Digital twin → Fault predictions: reads (evidence: `src/pages/Twin.tsx`)
- Digital twin → Ops and records: reads (evidence: `src/pages/Twin.tsx`)
- Digital twin → Telemetry samples: reads and ticks (evidence: `src/pages/Twin.tsx`)
- Digital twin → Online detector: scores samples (evidence: `README.md`)
- Predictive faults → Fault predictions: reads (evidence: `src/pages/Predictions.tsx`)
- Predictive faults → Ops and records: reads (evidence: `src/pages/Predictions.tsx`)
- Predictive faults → Fleet metrics: reads (evidence: `src/pages/Predictions.tsx`)
- Predictive faults → Shared state: records actions (evidence: `README.md`)
- Work control → Ops and records: reads (evidence: `src/pages/Maintenance.tsx`)
- Work control → Shared state: reads shared state (evidence: `src/pages/Maintenance.tsx`)
- Spares and stores → Ops and records: reads (evidence: `src/pages/Spares.tsx`)
- Spares and stores → Shared state: reads shared state (evidence: `src/pages/Spares.tsx`)
- Data integration → Ops and records: reads (evidence: `src/pages/DataHub.tsx`)
- Data integration → Aircraft records: reads (evidence: `src/pages/DataHub.tsx`)
- Data integration → Online detector: scores uploads (evidence: `src/pages/DataHub.tsx`)
- Data integration → Shared state: logs events (evidence: `src/pages/DataHub.tsx`)
- Maintenance analytics → Ops and records: reads (evidence: `src/pages/Analytics.tsx`)
- Maintenance analytics → Aircraft records: reads (evidence: `src/pages/Analytics.tsx`)
- Maintenance analytics → Fleet metrics: reads (evidence: `src/pages/Analytics.tsx`)
- Fleet metrics → Aircraft records: derives metrics (evidence: `src/lib/metrics.ts`)
- Fleet metrics → Fault predictions: derives metrics (evidence: `src/lib/metrics.ts`)
- Fleet metrics → Ops and records: derives metrics (evidence: `src/lib/metrics.ts`)
- Ops and records → Aircraft records: builds work orders (evidence: `src/data/ops.ts`)
- Ops and records → Fault predictions: seeds work orders (evidence: `src/data/ops.ts`)
- Aircraft records → Seeded generator: generates records (evidence: `src/data/fleet.ts`)
- Fault predictions → Aircraft records: builds per aircraft (evidence: `src/data/predictions.ts`)
- Fault predictions → Seeded generator: generates estimates (evidence: `src/data/predictions.ts`)
- Shared state → Browser localStorage: persists state (evidence: `src/lib/platform.tsx`)
- Fleet overview → SVG charts: renders charts (evidence: `src/pages/Overview.tsx`)
- Fleet overview → UI components: renders controls (evidence: `src/pages/Overview.tsx`)
