# sadikkhan07/wattwiseaii architecture

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

- Interactive diagram: https://gitdiagram.com/sadikkhan07/wattwiseaii
- Repository: https://github.com/sadikkhan07/wattwiseaii

## Overview

WattWise AI is a React frontend prototype for household energy monitoring: users explore the public site or launch a demo dashboard, where usage, tariff, and mock AI insights support detection and savings guidance. Its documented product model spans measurement, learning, detection, and action, but the README describes hardware and backend integrations as future architecture; the sampled code shows no live data or AI service connection. Most capabilities are implemented in the monolithic App.tsx. Relationships below use README documentation where source excerpts do not expose routing or implementation details.

Main entry points: [`App.tsx`](https://github.com/sadikkhan07/wattwiseaii/blob/main/App.tsx) (Dashboard KPIs), [`main.tsx`](https://github.com/sadikkhan07/wattwiseaii/blob/main/main.tsx) (React entry)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Web experience"]
  node_entry["React entry<br/>[main.tsx]"]
  node_app["App and routes<br/>[App.tsx]"]
  node_public["Public website<br/>[App.tsx]"]
end

subgraph group_demo["Demo state"]
  node_demo_state[("Demo state<br/>[App.tsx]")]
end

subgraph group_insights["Energy insights"]
  node_dashboard["Dashboard KPIs<br/>[App.tsx]"]
  node_usage_chart["Usage charts<br/>[App.tsx]"]
  node_ai_insight["AI insights<br/>[App.tsx]"]
  node_waste["Waste detection<br/>[App.tsx]"]
  node_savings["Savings guidance<br/>[App.tsx]"]
  node_report["Energy report<br/>[App.tsx]"]
  node_assistant["AI assistant<br/>[App.tsx]"]
  node_notifications["Notifications<br/>[App.tsx]"]
end

subgraph group_account["Account and device"]
  node_auth["Mock auth screens<br/>[App.tsx]"]
  node_tariff["Tariff settings<br/>[App.tsx]"]
  node_monitor["Energy monitor view<br/>[App.tsx]"]
end

node_visitor(("Household user"))

node_visitor -->|"opens app"| node_entry
node_entry -->|"renders"| node_app
node_visitor -->|"explores"| node_public
node_visitor -->|"uses"| node_auth
node_visitor -->|"launches demo"| node_dashboard
node_app -->|"serves pages"| node_public
node_app -->|"serves screens"| node_auth
node_app -->|"serves dashboard"| node_dashboard
node_dashboard -->|"uses demo data"| node_demo_state
node_dashboard -->|"uses tariff"| node_tariff
node_dashboard -->|"shows usage"| node_usage_chart
node_dashboard -->|"shows insight"| node_ai_insight
node_dashboard -->|"links detection"| node_waste
node_dashboard -->|"links savings"| node_savings
node_dashboard -->|"links report"| node_report
node_dashboard -->|"links devices"| node_monitor
node_dashboard -->|"offers assistant"| node_assistant
node_dashboard -->|"shows alerts"| node_notifications
node_assistant -->|"persists chat"| node_demo_state
node_tariff -->|"recalculates costs"| node_dashboard

click node_entry "https://github.com/sadikkhan07/wattwiseaii/blob/main/main.tsx"
click node_app "https://github.com/sadikkhan07/wattwiseaii/blob/main/App.tsx"
click node_public "https://github.com/sadikkhan07/wattwiseaii/blob/main/App.tsx"
click node_auth "https://github.com/sadikkhan07/wattwiseaii/blob/main/App.tsx"
click node_demo_state "https://github.com/sadikkhan07/wattwiseaii/blob/main/App.tsx"
click node_tariff "https://github.com/sadikkhan07/wattwiseaii/blob/main/App.tsx"
click node_monitor "https://github.com/sadikkhan07/wattwiseaii/blob/main/App.tsx"
click node_dashboard "https://github.com/sadikkhan07/wattwiseaii/blob/main/App.tsx"
click node_usage_chart "https://github.com/sadikkhan07/wattwiseaii/blob/main/App.tsx"
click node_ai_insight "https://github.com/sadikkhan07/wattwiseaii/blob/main/App.tsx"
click node_waste "https://github.com/sadikkhan07/wattwiseaii/blob/main/App.tsx"
click node_savings "https://github.com/sadikkhan07/wattwiseaii/blob/main/App.tsx"
click node_report "https://github.com/sadikkhan07/wattwiseaii/blob/main/App.tsx"
click node_assistant "https://github.com/sadikkhan07/wattwiseaii/blob/main/App.tsx"
click node_notifications "https://github.com/sadikkhan07/wattwiseaii/blob/main/App.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_entry,node_app,node_public,node_visitor toneBlue
class node_demo_state toneAmber
class node_dashboard,node_usage_chart,node_ai_insight,node_waste,node_savings,node_report,node_assistant,node_notifications toneMint
class node_auth,node_tariff,node_monitor toneRose
```

## Components

### Web experience

- [React entry](https://github.com/sadikkhan07/wattwiseaii/blob/main/main.tsx): `main.tsx`
- [App and routes](https://github.com/sadikkhan07/wattwiseaii/blob/main/App.tsx): `App.tsx`
- [Public website](https://github.com/sadikkhan07/wattwiseaii/blob/main/App.tsx): `App.tsx`

### Demo state

- [Demo state](https://github.com/sadikkhan07/wattwiseaii/blob/main/App.tsx): `App.tsx`

### Energy insights

- [Dashboard KPIs](https://github.com/sadikkhan07/wattwiseaii/blob/main/App.tsx): `App.tsx`
- [Usage charts](https://github.com/sadikkhan07/wattwiseaii/blob/main/App.tsx): `App.tsx`
- [AI insights](https://github.com/sadikkhan07/wattwiseaii/blob/main/App.tsx): `App.tsx`
- [Waste detection](https://github.com/sadikkhan07/wattwiseaii/blob/main/App.tsx): `App.tsx`
- [Savings guidance](https://github.com/sadikkhan07/wattwiseaii/blob/main/App.tsx): `App.tsx`
- [Energy report](https://github.com/sadikkhan07/wattwiseaii/blob/main/App.tsx): `App.tsx`
- [AI assistant](https://github.com/sadikkhan07/wattwiseaii/blob/main/App.tsx): `App.tsx`
- [Notifications](https://github.com/sadikkhan07/wattwiseaii/blob/main/App.tsx): `App.tsx`

### Account and device

- [Mock auth screens](https://github.com/sadikkhan07/wattwiseaii/blob/main/App.tsx): `App.tsx`
- [Tariff settings](https://github.com/sadikkhan07/wattwiseaii/blob/main/App.tsx): `App.tsx`
- [Energy monitor view](https://github.com/sadikkhan07/wattwiseaii/blob/main/App.tsx): `App.tsx`

### Other components

- **Household user**

## Connections

- Household user → React entry: opens app (evidence: `README.md`)
- React entry → App and routes: renders (evidence: `main.tsx`)
- Household user → Public website: explores (evidence: `README.md`)
- Household user → Mock auth screens: uses (evidence: `README.md`)
- Household user → Dashboard KPIs: launches demo (evidence: `README.md`)
- App and routes → Public website: serves pages (evidence: `README.md`)
- App and routes → Mock auth screens: serves screens (evidence: `README.md`)
- App and routes → Dashboard KPIs: serves dashboard (evidence: `README.md`)
- Dashboard KPIs → Demo state: uses demo data (evidence: `README.md`)
- Dashboard KPIs → Tariff settings: uses tariff (evidence: `README.md`)
- Dashboard KPIs → Usage charts: shows usage (evidence: `README.md`)
- Dashboard KPIs → AI insights: shows insight (evidence: `README.md`)
- Dashboard KPIs → Waste detection: links detection (evidence: `README.md`)
- Dashboard KPIs → Savings guidance: links savings (evidence: `README.md`)
- Dashboard KPIs → Energy report: links report (evidence: `README.md`)
- Dashboard KPIs → Energy monitor view: links devices (evidence: `README.md`)
- Dashboard KPIs → AI assistant: offers assistant (evidence: `README.md`)
- Dashboard KPIs → Notifications: shows alerts (evidence: `README.md`)
- AI assistant → Demo state: persists chat (evidence: `README.md`)
- Tariff settings → Dashboard KPIs: recalculates costs (evidence: `README.md`)
