# abhishekdewangan04/volsentraai architecture

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

- Interactive diagram: https://gitdiagram.com/abhishekdewangan04/volsentraai
- Repository: https://github.com/abhishekdewangan04/volsentraai

## Overview

Volsentra AI is a utility electricity-theft and anomaly command center. Users enter through an overview, then work across consumer risk, grid and transformer analytics, live readings, cases, field inspections, model performance, and scenario analysis. The consumer workflow can import meter readings, apply detection results, and manage cases; gridService provides a data seam backed by local demo data or a configured API. Several dashboard modules are identified by the README and file tree, but their internal calls were not sampled, so those connections are left unverified.

Main entry points: [`src/lib/gridService.js`](https://github.com/abhishekdewangan04/volsentraai/blob/main/src/lib/gridService.js) (Grid data service), [`src/routes/dashboard.consumers.jsx`](https://github.com/abhishekdewangan04/volsentraai/blob/main/src/routes/dashboard.consumers.jsx) (Consumer risk), [`src/components/consumers/ImportDataDialog.jsx`](https://github.com/abhishekdewangan04/volsentraai/blob/main/src/components/consumers/ImportDataDialog.jsx) (Readings import), [`src/routes/index.jsx`](https://github.com/abhishekdewangan04/volsentraai/blob/main/src/routes/index.jsx) (Product overview)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Product entry"]
  node_landing["Product overview<br/>[index.jsx]"]
end

subgraph group_operations["Risk operations"]
  node_command["Command center"]
  node_consumers["Consumer risk"]
  node_importer["Readings import"]
  node_cases["Case management"]
  node_field["Field inspections"]
end

subgraph group_analytics["Grid analytics"]
  node_grid["3D grid<br/>[dashboard.grid.jsx]"]
  node_transformers["Transformer analysis"]
  node_live["Live monitor<br/>[dashboard.live.jsx]"]
  node_model["Model performance"]
  node_scenarios["Scenario lab"]
end

subgraph group_platform["Application services"]
  node_service["Grid data service<br/>[gridService.js]"]
  node_mock[("Demo data store<br/>[mockData.js]")]
  node_csv["CSV processing<br/>[csvImport.js]"]
  node_gridcontext["Grid state context<br/>[GridContext.jsx]"]
  node_firebase["Firebase authentication<br/>[firebase.js]"]
  node_auth["Authentication state<br/>[AuthContext.jsx]"]
end

node_analyst(("Utility analyst"))
node_firebase_service(("Firebase Auth"))
node_api(("Configured data API"))

node_analyst -->|"views overview"| node_landing
node_landing -->|"links dashboard"| node_command
node_analyst -.->|"manages risk"| node_consumers
node_consumers -->|"loads data"| node_service
node_consumers -.->|"opens import"| node_importer
node_consumers -->|"creates cases"| node_cases
node_importer -->|"parses readings"| node_csv
node_importer -->|"applies results"| node_service
node_service -->|"reads and writes"| node_mock
node_service -.->|"queries optionally"| node_api
node_gridcontext -->|"loads grid data"| node_service
node_analyst -.->|"explores network"| node_grid
node_analyst -.->|"reviews losses"| node_transformers
node_analyst -.->|"monitors readings"| node_live
node_analyst -.->|"reviews performance"| node_model
node_analyst -.->|"tests scenarios"| node_scenarios
node_analyst -.->|"records inspections"| node_field
node_analyst -.->|"tracks cases"| node_cases
node_firebase -.->|"authenticates with"| node_firebase_service
node_auth -.->|"uses client"| node_firebase

click node_landing "https://github.com/abhishekdewangan04/volsentraai/blob/main/src/routes/index.jsx"
click node_command "https://github.com/abhishekdewangan04/volsentraai/blob/main/src/routes/dashboard.index.jsx"
click node_consumers "https://github.com/abhishekdewangan04/volsentraai/blob/main/src/routes/dashboard.consumers.jsx"
click node_importer "https://github.com/abhishekdewangan04/volsentraai/blob/main/src/components/consumers/ImportDataDialog.jsx"
click node_cases "https://github.com/abhishekdewangan04/volsentraai/blob/main/src/routes/dashboard.cases.jsx"
click node_field "https://github.com/abhishekdewangan04/volsentraai/blob/main/src/routes/dashboard.field.jsx"
click node_grid "https://github.com/abhishekdewangan04/volsentraai/blob/main/src/routes/dashboard.grid.jsx"
click node_transformers "https://github.com/abhishekdewangan04/volsentraai/blob/main/src/routes/dashboard.transformers.jsx"
click node_live "https://github.com/abhishekdewangan04/volsentraai/blob/main/src/routes/dashboard.live.jsx"
click node_model "https://github.com/abhishekdewangan04/volsentraai/blob/main/src/routes/dashboard.model.jsx"
click node_scenarios "https://github.com/abhishekdewangan04/volsentraai/blob/main/src/routes/dashboard.scenarios.jsx"
click node_service "https://github.com/abhishekdewangan04/volsentraai/blob/main/src/lib/gridService.js"
click node_mock "https://github.com/abhishekdewangan04/volsentraai/blob/main/src/api/mockData.js"
click node_csv "https://github.com/abhishekdewangan04/volsentraai/blob/main/src/lib/csvImport.js"
click node_gridcontext "https://github.com/abhishekdewangan04/volsentraai/blob/main/src/lib/GridContext.jsx"
click node_firebase "https://github.com/abhishekdewangan04/volsentraai/blob/main/src/lib/firebase.js"
click node_auth "https://github.com/abhishekdewangan04/volsentraai/blob/main/src/lib/AuthContext.jsx"

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_landing toneBlue
class node_command,node_consumers,node_importer,node_cases,node_field toneAmber
class node_grid,node_transformers,node_live,node_model,node_scenarios,node_api toneMint
class node_service,node_mock,node_csv,node_gridcontext,node_firebase,node_auth toneRose
class node_analyst,node_firebase_service toneIndigo
```

## Components

### Product entry

- [Product overview](https://github.com/abhishekdewangan04/volsentraai/blob/main/src/routes/index.jsx): `src/routes/index.jsx`

### Risk operations

- [Command center](https://github.com/abhishekdewangan04/volsentraai/blob/main/src/routes/dashboard.index.jsx): `src/routes/dashboard.index.jsx`
- [Consumer risk](https://github.com/abhishekdewangan04/volsentraai/blob/main/src/routes/dashboard.consumers.jsx): `src/routes/dashboard.consumers.jsx`
- [Readings import](https://github.com/abhishekdewangan04/volsentraai/blob/main/src/components/consumers/ImportDataDialog.jsx): `src/components/consumers/ImportDataDialog.jsx`
- [Case management](https://github.com/abhishekdewangan04/volsentraai/blob/main/src/routes/dashboard.cases.jsx): `src/routes/dashboard.cases.jsx`
- [Field inspections](https://github.com/abhishekdewangan04/volsentraai/blob/main/src/routes/dashboard.field.jsx): `src/routes/dashboard.field.jsx`

### Grid analytics

- [3D grid](https://github.com/abhishekdewangan04/volsentraai/blob/main/src/routes/dashboard.grid.jsx): `src/routes/dashboard.grid.jsx`
- [Transformer analysis](https://github.com/abhishekdewangan04/volsentraai/blob/main/src/routes/dashboard.transformers.jsx): `src/routes/dashboard.transformers.jsx`
- [Live monitor](https://github.com/abhishekdewangan04/volsentraai/blob/main/src/routes/dashboard.live.jsx): `src/routes/dashboard.live.jsx`
- [Model performance](https://github.com/abhishekdewangan04/volsentraai/blob/main/src/routes/dashboard.model.jsx): `src/routes/dashboard.model.jsx`
- [Scenario lab](https://github.com/abhishekdewangan04/volsentraai/blob/main/src/routes/dashboard.scenarios.jsx): `src/routes/dashboard.scenarios.jsx`

### Application services

- [Grid data service](https://github.com/abhishekdewangan04/volsentraai/blob/main/src/lib/gridService.js): `src/lib/gridService.js`
- [Demo data store](https://github.com/abhishekdewangan04/volsentraai/blob/main/src/api/mockData.js): `src/api/mockData.js`
- [CSV processing](https://github.com/abhishekdewangan04/volsentraai/blob/main/src/lib/csvImport.js): `src/lib/csvImport.js`
- [Grid state context](https://github.com/abhishekdewangan04/volsentraai/blob/main/src/lib/GridContext.jsx): `src/lib/GridContext.jsx`
- [Firebase authentication](https://github.com/abhishekdewangan04/volsentraai/blob/main/src/lib/firebase.js): `src/lib/firebase.js`
- [Authentication state](https://github.com/abhishekdewangan04/volsentraai/blob/main/src/lib/AuthContext.jsx): `src/lib/AuthContext.jsx`

### Other components

- **Utility analyst**
- **Firebase Auth**
- **Configured data API**

## Connections

- Utility analyst → Product overview: views overview (evidence: `src/routes/index.jsx`)
- Product overview → Command center: links dashboard (evidence: `src/routes/index.jsx`)
- Utility analyst → Consumer risk: manages risk
- Consumer risk → Grid data service: loads data (evidence: `src/routes/dashboard.consumers.jsx`)
- Consumer risk → Readings import: opens import (evidence: `src/routes/dashboard.consumers.jsx`)
- Consumer risk → Case management: creates cases (evidence: `src/routes/dashboard.consumers.jsx`)
- Readings import → CSV processing: parses readings (evidence: `src/components/consumers/ImportDataDialog.jsx`)
- Readings import → Grid data service: applies results (evidence: `src/components/consumers/ImportDataDialog.jsx`)
- Grid data service → Demo data store: reads and writes (evidence: `src/lib/gridService.js`)
- Grid data service → Configured data API: queries optionally
- Grid state context → Grid data service: loads grid data (evidence: `src/lib/GridContext.jsx`)
- Utility analyst → 3D grid: explores network
- Utility analyst → Transformer analysis: reviews losses
- Utility analyst → Live monitor: monitors readings
- Utility analyst → Model performance: reviews performance
- Utility analyst → Scenario lab: tests scenarios
- Utility analyst → Field inspections: records inspections
- Utility analyst → Case management: tracks cases
- Firebase authentication → Firebase Auth: authenticates with
- Authentication state → Firebase authentication: uses client
