How buddhaakash/eco-energy works
EcoEnergy is a dashboard for turning household or small-office meter readings into ranked, estimated-savings actions. The main workflow is selecting or uploading a dataset, running statistical leak detection and savings analysis, then reviewing findings; separate dashboard features check bills, answer questions, and export reports. The Streamlit UI calls a FastAPI backend, with SQLAlchemy models and a configured database for persisted data. Source excerpts show the analysis pipeline and bill-check flow; some route and tab internals are represented only by indexed references, so their internal links are limited accordingly.
Main entry points: app.py Streamlit app · main.py FastAPI app · pipeline_service.py Analysis pipeline · api_client.py HTTP client
Components 23
Dashboard
- Streamlit app
frontend/app.py - Data upload
frontend/components/tab_data.py - Anomaly review
frontend/components/tab_anomalies.py - Savings plan
frontend/components/tab_savings.py - Bill check UI
frontend/components/tab_bill_check.py - AI chat
frontend/components/tab_chat.py - HTTP client
frontend/api_client.py
API
- FastAPI app
backend/main.py - Dataset routes
backend/routers/datasets.py - Analysis routes
backend/routers/analysis.py - Other API routes
backend/routers
Leak Analysis
- Analysis pipeline
backend/services/pipeline_service.py - Anomaly detection
backend/services/anomaly_service.py - Savings actions
backend/services/savings_service.py - Anomaly explanations
backend/services/advisor_service.py
Bill Checks
- Bill-check routes
backend/routers/bill.py - Bill comparison
backend/services/bill_service.py - Bill extraction
backend/services/bill_extraction_service.py
Persistence & AI
- CSV parser
backend/services/ingest_service.py - SQL database
backend/database.py - Stored records
backend/models.py - Gemini API
Other components
- Energy user
Connections 31
- Energy user → Streamlit app: uses dashboard
README.md - Streamlit app → Data upload: renders
frontend/app.py - Streamlit app → Anomaly review: renders
frontend/app.py - Streamlit app → Savings plan: renders
frontend/app.py - Streamlit app → Bill check UI: renders
frontend/app.py - Streamlit app → AI chat: renders
frontend/app.py - Data upload → HTTP client: calls
frontend/components/tab_data.py - Anomaly review → HTTP client: calls
frontend/components/tab_anomalies.py - Savings plan → HTTP client: calls
frontend/components/tab_savings.py - Bill check UI → HTTP client: calls
frontend/components/tab_bill_check.py - AI chat → HTTP client: calls
frontend/components/tab_chat.py - HTTP client → FastAPI app: HTTP requests
frontend/api_client.py - FastAPI app → Dataset routes: registers
backend/main.py - FastAPI app → Analysis routes: registers
backend/main.py - FastAPI app → Other API routes: registers
backend/main.py - FastAPI app → Bill-check routes: registers
backend/main.py - Dataset routes → CSV parser: parses upload
backend/routers/datasets.py - Dataset routes → Analysis pipeline: runs analysis
backend/routers/datasets.py - Analysis routes → Analysis pipeline: runs analysis
backend/routers/analysis.py - Analysis pipeline → Anomaly detection: detects events
backend/services/pipeline_service.py - Analysis pipeline → Anomaly explanations: requests explanations
backend/services/pipeline_service.py - Analysis pipeline → Savings actions: builds actions
backend/services/pipeline_service.py - Anomaly explanations → Gemini API: requests narration
backend/services/advisor_service.py - Bill-check routes → Bill extraction: extracts bill fields
backend/routers/bill.py - Bill-check routes → Bill comparison: compares readings
backend/routers/bill.py - Bill-check routes → Gemini API: requests bill narration
- FastAPI app → SQL database: initializes
backend/main.py - SQL database → Stored records: registers tables
backend/database.py - Analysis pipeline → Stored records: reads and writes
backend/services/pipeline_service.py - Bill-check routes → Stored records: reads and writes
backend/routers/bill.py - Bill extraction → Gemini API: extracts with AI
backend/services/bill_extraction_service.py