# ganapatinaik1/winterhackathon-raging-bulls architecture

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

- Interactive diagram: https://gitdiagram.com/ganapatinaik1/winterhackathon-raging-bulls
- Repository: https://github.com/ganapatinaik1/winterhackathon-raging-bulls

## Overview

Voltify is a household electricity-use dashboard for viewing simulated consumption, managing appliance data, and getting energy-saving recommendations. Users enter through the dashboard to inspect usage trends and appliance information; recommendations are generated through an AI flow. Registration and login provide Firebase-backed account flows, while settings expose household preferences. The dashboard page and several feature components were not excerpted, so their composition is shown only as unverified links; the README describes monitoring as simulated, not as a live meter integration.

Main entry points: [`src/app/page.tsx`](https://github.com/ganapatinaik1/winterhackathon-raging-bulls/blob/main/src/app/page.tsx) (Dashboard page), [`src/app/register/page.tsx`](https://github.com/ganapatinaik1/winterhackathon-raging-bulls/blob/main/src/app/register/page.tsx) (Registration page), [`src/components/voltify/ConsumptionChart.tsx`](https://github.com/ganapatinaik1/winterhackathon-raging-bulls/blob/main/src/components/voltify/ConsumptionChart.tsx) (Consumption chart), [`src/lib/actions.ts`](https://github.com/ganapatinaik1/winterhackathon-raging-bulls/blob/main/src/lib/actions.ts) (Recommendation actions)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_dashboard["Energy dashboard"]
  node_dashboard_page["Dashboard page<br/>[page.tsx]"]
  node_appliance_manager["Appliance manager"]
  node_auto_cutoff["Auto cutoff<br/>[AutoCutoff.tsx]"]
  node_header["Dashboard header<br/>[Header.tsx]"]
end

subgraph group_insights["Usage insights"]
  node_consumption_chart["Consumption chart"]
  node_appliance_chart["Appliance chart<br/>[ApplianceChart.tsx]"]
  node_stats["Usage statistics<br/>[Stats.tsx]"]
  node_efficiency["Efficiency grade"]
  node_suggestions["Energy suggestions<br/>[Suggestions.tsx]"]
  node_energy_data[("Usage data and tips<br/>[data.ts]")]
  node_actions["Recommendation actions<br/>[actions.ts]"]
  node_ai_flow["Suggestion AI flow"]
end

subgraph group_accounts["Accounts and settings"]
  node_login["Login page<br/>[page.tsx]"]
  node_register["Registration page<br/>[page.tsx]"]
  node_settings["Settings page<br/>[page.tsx]"]
end

subgraph group_platform["Shared services"]
  node_firebase_config["Firebase configuration<br/>[config.ts]"]
  node_toast_hook["Toast state hook<br/>[use-toast.ts]"]
  node_chart_ui["Chart primitives<br/>[chart.tsx]"]
  node_ui_primitives["UI primitives"]
end

node_household(("Household user"))
node_firebase_auth{{"Firebase Auth"}}
node_firestore[("Firestore")]

node_household -.->|"opens"| node_dashboard_page
node_dashboard_page -.->|"renders"| node_appliance_manager
node_dashboard_page -.->|"renders"| node_auto_cutoff
node_dashboard_page -.->|"renders"| node_header
node_dashboard_page -.->|"renders"| node_consumption_chart
node_dashboard_page -.->|"renders"| node_appliance_chart
node_dashboard_page -.->|"renders"| node_stats
node_dashboard_page -.->|"renders"| node_efficiency
node_dashboard_page -.->|"renders"| node_suggestions
node_appliance_manager -->|"uses types"| node_energy_data
node_consumption_chart -->|"reads series"| node_energy_data
node_consumption_chart -->|"renders with"| node_chart_ui
node_actions -->|"calls"| node_ai_flow
node_actions -->|"uses data"| node_energy_data
node_suggestions -.->|"requests tips"| node_actions
node_login -->|"imports app"| node_firebase_config
node_register -->|"imports app"| node_firebase_config
node_register -->|"authenticates"| node_firebase_auth
node_login -->|"authenticates"| node_firebase_auth
node_register -->|"writes profile"| node_firestore
node_settings -->|"renders"| node_header
node_settings -->|"uses notifications"| node_toast_hook
node_header -->|"imports app"| node_firebase_config
node_toast_hook -->|"uses toast types"| node_ui_primitives

click node_dashboard_page "https://github.com/ganapatinaik1/winterhackathon-raging-bulls/blob/main/src/app/page.tsx"
click node_appliance_manager "https://github.com/ganapatinaik1/winterhackathon-raging-bulls/blob/main/src/components/voltify/ApplianceManager.tsx"
click node_auto_cutoff "https://github.com/ganapatinaik1/winterhackathon-raging-bulls/blob/main/src/components/voltify/AutoCutoff.tsx"
click node_header "https://github.com/ganapatinaik1/winterhackathon-raging-bulls/blob/main/src/components/voltify/Header.tsx"
click node_consumption_chart "https://github.com/ganapatinaik1/winterhackathon-raging-bulls/blob/main/src/components/voltify/ConsumptionChart.tsx"
click node_appliance_chart "https://github.com/ganapatinaik1/winterhackathon-raging-bulls/blob/main/src/components/voltify/ApplianceChart.tsx"
click node_stats "https://github.com/ganapatinaik1/winterhackathon-raging-bulls/blob/main/src/components/voltify/Stats.tsx"
click node_efficiency "https://github.com/ganapatinaik1/winterhackathon-raging-bulls/blob/main/src/components/voltify/EfficiencyGrade.tsx"
click node_suggestions "https://github.com/ganapatinaik1/winterhackathon-raging-bulls/blob/main/src/components/voltify/Suggestions.tsx"
click node_energy_data "https://github.com/ganapatinaik1/winterhackathon-raging-bulls/blob/main/src/lib/data.ts"
click node_actions "https://github.com/ganapatinaik1/winterhackathon-raging-bulls/blob/main/src/lib/actions.ts"
click node_ai_flow "https://github.com/ganapatinaik1/winterhackathon-raging-bulls/blob/main/src/ai/flows/generate-energy-saving-suggestions.ts"
click node_login "https://github.com/ganapatinaik1/winterhackathon-raging-bulls/blob/main/src/app/login/page.tsx"
click node_register "https://github.com/ganapatinaik1/winterhackathon-raging-bulls/blob/main/src/app/register/page.tsx"
click node_settings "https://github.com/ganapatinaik1/winterhackathon-raging-bulls/blob/main/src/app/settings/page.tsx"
click node_firebase_config "https://github.com/ganapatinaik1/winterhackathon-raging-bulls/blob/main/src/firebase/config.ts"
click node_toast_hook "https://github.com/ganapatinaik1/winterhackathon-raging-bulls/blob/main/src/hooks/use-toast.ts"
click node_chart_ui "https://github.com/ganapatinaik1/winterhackathon-raging-bulls/blob/main/src/components/ui/chart.tsx"
click node_ui_primitives "https://github.com/ganapatinaik1/winterhackathon-raging-bulls/tree/main/src/components/ui"

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_dashboard_page,node_appliance_manager,node_auto_cutoff,node_header,node_household toneBlue
class node_consumption_chart,node_appliance_chart,node_stats,node_efficiency,node_suggestions,node_energy_data,node_actions,node_ai_flow,node_firestore toneAmber
class node_login,node_register,node_settings toneMint
class node_firebase_config,node_toast_hook,node_chart_ui,node_ui_primitives toneRose
class node_firebase_auth toneIndigo
```

## Components

### Energy dashboard

- [Dashboard page](https://github.com/ganapatinaik1/winterhackathon-raging-bulls/blob/main/src/app/page.tsx): `src/app/page.tsx`
- [Appliance manager](https://github.com/ganapatinaik1/winterhackathon-raging-bulls/blob/main/src/components/voltify/ApplianceManager.tsx): `src/components/voltify/ApplianceManager.tsx`
- [Auto cutoff](https://github.com/ganapatinaik1/winterhackathon-raging-bulls/blob/main/src/components/voltify/AutoCutoff.tsx): `src/components/voltify/AutoCutoff.tsx`
- [Dashboard header](https://github.com/ganapatinaik1/winterhackathon-raging-bulls/blob/main/src/components/voltify/Header.tsx): `src/components/voltify/Header.tsx`

### Usage insights

- [Consumption chart](https://github.com/ganapatinaik1/winterhackathon-raging-bulls/blob/main/src/components/voltify/ConsumptionChart.tsx): `src/components/voltify/ConsumptionChart.tsx`
- [Appliance chart](https://github.com/ganapatinaik1/winterhackathon-raging-bulls/blob/main/src/components/voltify/ApplianceChart.tsx): `src/components/voltify/ApplianceChart.tsx`
- [Usage statistics](https://github.com/ganapatinaik1/winterhackathon-raging-bulls/blob/main/src/components/voltify/Stats.tsx): `src/components/voltify/Stats.tsx`
- [Efficiency grade](https://github.com/ganapatinaik1/winterhackathon-raging-bulls/blob/main/src/components/voltify/EfficiencyGrade.tsx): `src/components/voltify/EfficiencyGrade.tsx`
- [Energy suggestions](https://github.com/ganapatinaik1/winterhackathon-raging-bulls/blob/main/src/components/voltify/Suggestions.tsx): `src/components/voltify/Suggestions.tsx`
- [Usage data and tips](https://github.com/ganapatinaik1/winterhackathon-raging-bulls/blob/main/src/lib/data.ts): `src/lib/data.ts`
- [Recommendation actions](https://github.com/ganapatinaik1/winterhackathon-raging-bulls/blob/main/src/lib/actions.ts): `src/lib/actions.ts`
- [Suggestion AI flow](https://github.com/ganapatinaik1/winterhackathon-raging-bulls/blob/main/src/ai/flows/generate-energy-saving-suggestions.ts): `src/ai/flows/generate-energy-saving-suggestions.ts`

### Accounts and settings

- [Login page](https://github.com/ganapatinaik1/winterhackathon-raging-bulls/blob/main/src/app/login/page.tsx): `src/app/login/page.tsx`
- [Registration page](https://github.com/ganapatinaik1/winterhackathon-raging-bulls/blob/main/src/app/register/page.tsx): `src/app/register/page.tsx`
- [Settings page](https://github.com/ganapatinaik1/winterhackathon-raging-bulls/blob/main/src/app/settings/page.tsx): `src/app/settings/page.tsx`

### Shared services

- [Firebase configuration](https://github.com/ganapatinaik1/winterhackathon-raging-bulls/blob/main/src/firebase/config.ts): `src/firebase/config.ts`
- [Toast state hook](https://github.com/ganapatinaik1/winterhackathon-raging-bulls/blob/main/src/hooks/use-toast.ts): `src/hooks/use-toast.ts`
- [Chart primitives](https://github.com/ganapatinaik1/winterhackathon-raging-bulls/blob/main/src/components/ui/chart.tsx): `src/components/ui/chart.tsx`
- [UI primitives](https://github.com/ganapatinaik1/winterhackathon-raging-bulls/tree/main/src/components/ui): `src/components/ui`

### Other components

- **Household user**
- **Firebase Auth**
- **Firestore**

## Connections

- Household user → Dashboard page: opens
- Dashboard page → Appliance manager: renders
- Dashboard page → Auto cutoff: renders
- Dashboard page → Dashboard header: renders
- Dashboard page → Consumption chart: renders
- Dashboard page → Appliance chart: renders
- Dashboard page → Usage statistics: renders
- Dashboard page → Efficiency grade: renders
- Dashboard page → Energy suggestions: renders
- Appliance manager → Usage data and tips: uses types (evidence: `src/components/voltify/ApplianceManager.tsx`)
- Consumption chart → Usage data and tips: reads series (evidence: `src/components/voltify/ConsumptionChart.tsx`)
- Consumption chart → Chart primitives: renders with (evidence: `src/components/voltify/ConsumptionChart.tsx`)
- Recommendation actions → Suggestion AI flow: calls (evidence: `src/lib/actions.ts`)
- Recommendation actions → Usage data and tips: uses data (evidence: `src/lib/actions.ts`)
- Energy suggestions → Recommendation actions: requests tips
- Login page → Firebase configuration: imports app (evidence: `src/app/login/page.tsx`)
- Registration page → Firebase configuration: imports app (evidence: `src/app/register/page.tsx`)
- Registration page → Firebase Auth: authenticates (evidence: `src/app/register/page.tsx`)
- Login page → Firebase Auth: authenticates (evidence: `src/app/login/page.tsx`)
- Registration page → Firestore: writes profile (evidence: `src/app/register/page.tsx`)
- Settings page → Dashboard header: renders (evidence: `src/app/settings/page.tsx`)
- Settings page → Toast state hook: uses notifications (evidence: `src/app/settings/page.tsx`)
- Dashboard header → Firebase configuration: imports app (evidence: `src/components/voltify/Header.tsx`)
- Toast state hook → UI primitives: uses toast types (evidence: `src/hooks/use-toast.ts`)
