# rivalslayer/renewables-dashboard architecture

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

- Interactive diagram: https://gitdiagram.com/rivalslayer/renewables-dashboard
- Repository: https://github.com/rivalslayer/renewables-dashboard

## Overview

Avathon Dashboard is a React application for exploring wind-farm alarm and turbine data. Users select a location and device; the shared context loads JSON data and holds filter state, which feeds summary tiles, visualizations, and an alarm table. The README also describes time, fault-category, and alarm-code filtering, but the sampled filter component exposes only location and device controls. The graph follows shown calls and data access; unsampled entry wiring and undocumented subsystem links are omitted.

Main entry points: [`src/context/AppContext.tsx`](https://github.com/rivalslayer/renewables-dashboard/blob/main/src/context/AppContext.tsx) (App state and loading), [`src/components/dashboard/Dashboard.tsx`](https://github.com/rivalslayer/renewables-dashboard/blob/main/src/components/dashboard/Dashboard.tsx) (Dashboard layout), [`src/components/filters/Filters.tsx`](https://github.com/rivalslayer/renewables-dashboard/blob/main/src/components/filters/Filters.tsx) (Location and device filters), [`src/App.tsx`](https://github.com/rivalslayer/renewables-dashboard/blob/main/src/App.tsx) (Application shell)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_presentation["Dashboard presentation"]
  node_app["Application shell<br/>[App.tsx]"]
  node_dashboard["Dashboard layout<br/>[Dashboard.tsx]"]
  node_filters["Location and device filters<br/>[Filters.tsx]"]
end

subgraph group_state["Shared data and state"]
  node_context["App state and loading<br/>[AppContext.tsx]"]
  node_alarms["Alarm data<br/>[fault.json]"]
  node_devices["Device data<br/>[device.json]"]
  node_types["Alarm and device types<br/>[data.ts]"]
end

subgraph group_analysis["Alarm analysis"]
  node_tiles["Summary metrics<br/>[Tiles.tsx]"]
  node_charts["Alarm charts<br/>[Charts.tsx]"]
end

subgraph group_records["Alarm records"]
  node_table["Searchable alarm table<br/>[DataTable.tsx]"]
end

node_user(("Dashboard user"))

node_user -->|"selects filters"| node_filters
node_app -->|"renders"| node_dashboard
node_app -->|"provides state"| node_context
node_dashboard -->|"renders"| node_filters
node_dashboard -->|"renders"| node_tiles
node_dashboard -->|"renders"| node_charts
node_dashboard -->|"renders"| node_table
node_context -->|"fetches"| node_alarms
node_context -->|"fetches"| node_devices
node_context -->|"uses models"| node_types
node_filters -->|"updates filters"| node_context
node_tiles -->|"reads data"| node_context
node_charts -->|"reads data"| node_context
node_table -->|"reads data"| node_context

click node_app "https://github.com/rivalslayer/renewables-dashboard/blob/main/src/App.tsx"
click node_dashboard "https://github.com/rivalslayer/renewables-dashboard/blob/main/src/components/dashboard/Dashboard.tsx"
click node_filters "https://github.com/rivalslayer/renewables-dashboard/blob/main/src/components/filters/Filters.tsx"
click node_context "https://github.com/rivalslayer/renewables-dashboard/blob/main/src/context/AppContext.tsx"
click node_alarms "https://github.com/rivalslayer/renewables-dashboard/blob/main/public/data/fault.json"
click node_devices "https://github.com/rivalslayer/renewables-dashboard/blob/main/public/data/device.json"
click node_types "https://github.com/rivalslayer/renewables-dashboard/blob/main/src/types/data.ts"
click node_tiles "https://github.com/rivalslayer/renewables-dashboard/blob/main/src/components/tiles/Tiles.tsx"
click node_charts "https://github.com/rivalslayer/renewables-dashboard/blob/main/src/components/charts/Charts.tsx"
click node_table "https://github.com/rivalslayer/renewables-dashboard/blob/main/src/components/table/DataTable.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_dashboard,node_filters,node_user toneBlue
class node_context,node_alarms,node_devices,node_types toneAmber
class node_tiles,node_charts toneMint
class node_table toneRose
```

## Components

### Dashboard presentation

- [Application shell](https://github.com/rivalslayer/renewables-dashboard/blob/main/src/App.tsx): `src/App.tsx`
- [Dashboard layout](https://github.com/rivalslayer/renewables-dashboard/blob/main/src/components/dashboard/Dashboard.tsx): `src/components/dashboard/Dashboard.tsx`
- [Location and device filters](https://github.com/rivalslayer/renewables-dashboard/blob/main/src/components/filters/Filters.tsx): `src/components/filters/Filters.tsx`

### Shared data and state

- [App state and loading](https://github.com/rivalslayer/renewables-dashboard/blob/main/src/context/AppContext.tsx): `src/context/AppContext.tsx`
- [Alarm data](https://github.com/rivalslayer/renewables-dashboard/blob/main/public/data/fault.json): `public/data/fault.json`
- [Device data](https://github.com/rivalslayer/renewables-dashboard/blob/main/public/data/device.json): `public/data/device.json`
- [Alarm and device types](https://github.com/rivalslayer/renewables-dashboard/blob/main/src/types/data.ts): `src/types/data.ts`

### Alarm analysis

- [Summary metrics](https://github.com/rivalslayer/renewables-dashboard/blob/main/src/components/tiles/Tiles.tsx): `src/components/tiles/Tiles.tsx`
- [Alarm charts](https://github.com/rivalslayer/renewables-dashboard/blob/main/src/components/charts/Charts.tsx): `src/components/charts/Charts.tsx`

### Alarm records

- [Searchable alarm table](https://github.com/rivalslayer/renewables-dashboard/blob/main/src/components/table/DataTable.tsx): `src/components/table/DataTable.tsx`

### Other components

- **Dashboard user**

## Connections

- Dashboard user → Location and device filters: selects filters (evidence: `src/components/filters/Filters.tsx`)
- Application shell → Dashboard layout: renders (evidence: `src/App.tsx`)
- Application shell → App state and loading: provides state (evidence: `src/App.tsx`)
- Dashboard layout → Location and device filters: renders (evidence: `src/components/dashboard/Dashboard.tsx`)
- Dashboard layout → Summary metrics: renders (evidence: `src/components/dashboard/Dashboard.tsx`)
- Dashboard layout → Alarm charts: renders (evidence: `src/components/dashboard/Dashboard.tsx`)
- Dashboard layout → Searchable alarm table: renders (evidence: `src/components/dashboard/Dashboard.tsx`)
- App state and loading → Alarm data: fetches (evidence: `src/context/AppContext.tsx`)
- App state and loading → Device data: fetches (evidence: `src/context/AppContext.tsx`)
- App state and loading → Alarm and device types: uses models (evidence: `src/context/AppContext.tsx`)
- Location and device filters → App state and loading: updates filters (evidence: `src/components/filters/Filters.tsx`)
- Summary metrics → App state and loading: reads data (evidence: `src/components/tiles/Tiles.tsx`)
- Alarm charts → App state and loading: reads data (evidence: `src/components/charts/Charts.tsx`)
- Searchable alarm table → App state and loading: reads data (evidence: `src/components/table/DataTable.tsx`)
