How ravulavenkatasriram/eco-ai works
ECO-AI is an energy-monitoring and intelligence application: users view energy, weather, and appliance data, manage datasets, and access forecasts, anomaly alerts, reports, and efficiency recommendations. The frontend routes those workflows through a shared API client to FastAPI endpoints; backend services provide analytics, dataset handling, forecasting, and ML orchestration over relational records. The graph combines sampled source and SOURCE INDEX references with README capabilities. Several endpoint and service implementations were not excerpted, so their internal links are omitted rather than inferred.
Main entry points: analytics.py Energy analytics · endpoints Domain endpoints · service.py ML orchestration · generator.py Data generation
Components 25
User interface
- Page routing
Eco Ai/frontend/src/App.tsx - Workflow pages
Eco Ai/frontend/src/pages - API client
Eco Ai/frontend/src/services/api.ts
API workflows
- API router
Eco Ai/backend/app/api/router.py - Domain endpoints
Eco Ai/backend/app/api/endpoints
Analytics and intelligence
- Dataset handling
Eco Ai/backend/app/services/dataset_service.py - Energy analytics
Eco Ai/backend/app/services/analytics.py - Forecasting
Eco Ai/backend/app/services/forecast_service.py - ML orchestration
Eco Ai/backend/app/services/ml/service.py - ML features
Eco Ai/backend/app/services/ml/features.py - Model prediction
Eco Ai/backend/app/services/ml/predictor.py - Model registry
Eco Ai/backend/app/services/ml/registry.py - Anomaly detection
Eco Ai/backend/app/services/anomaly_detector.py - Report generation
Eco Ai/backend/app/services/reports_engine.py - Data generation
Eco Ai/backend/app/services/generator.py
Data and persistence
- Database sessions
Eco Ai/backend/app/core/database.py - Relational database
- Energy readings
Eco Ai/backend/app/models/energy.py - Weather readings
Eco Ai/backend/app/models/weather.py - Appliance records
Eco Ai/backend/app/models/appliance.py - Alert records
Eco Ai/backend/app/models/alert.py - Dataset records
Eco Ai/backend/app/models/dataset.py - Settings records
Eco Ai/backend/app/models/setting.py - Model records
Eco Ai/backend/app/models/ml_model.py
Other components
- Energy user
Connections 33
- Energy user → Page routing: uses
Eco Ai/frontend/src/App.tsx - Page routing → Workflow pages: routes to
Eco Ai/frontend/src/App.tsx - Workflow pages → API client: requests data
Eco Ai/frontend/src/pages/ForecastPage.tsx - API client → Domain endpoints: calls API
Eco Ai/frontend/src/services/api.ts - API router → Domain endpoints: registers
Eco Ai/backend/app/api/router.py - Domain endpoints → Dataset handling: handles datasets
Eco Ai/backend/app/api/endpoints/datasets.py - Domain endpoints → Energy analytics: uses analytics
Eco Ai/backend/app/api/endpoints/appliances_api.py - Domain endpoints → ML orchestration: invokes ML
Eco Ai/backend/app/api/endpoints/future_intelligence.py - Forecasting → Energy analytics: uses analytics
Eco Ai/backend/app/services/forecast_service.py - ML orchestration → ML features: uses features
Eco Ai/backend/app/services/ml/service.py - ML orchestration → Model prediction: uses predictor
Eco Ai/backend/app/services/ml/service.py - ML orchestration → Model registry: uses registry
Eco Ai/backend/app/services/ml/service.py - Dataset handling → Dataset records: reads and writes
Eco Ai/backend/app/services/dataset_service.py - Energy analytics → Energy readings: reads
Eco Ai/backend/app/services/analytics.py - Energy analytics → Weather readings: reads
Eco Ai/backend/app/services/analytics.py - Energy analytics → Appliance records: reads
Eco Ai/backend/app/services/analytics.py - Energy analytics → Dataset records: scopes by
Eco Ai/backend/app/services/analytics.py - Energy analytics → Settings records: checks active dataset
Eco Ai/backend/app/services/analytics.py - Data generation → Energy readings: generates
Eco Ai/backend/app/services/generator.py - Data generation → Weather readings: generates
Eco Ai/backend/app/services/generator.py - Data generation → Appliance records: generates
Eco Ai/backend/app/services/generator.py - ML orchestration → Model records: manages models
Eco Ai/backend/app/services/ml/service.py - Database sessions → Relational database: connects
Eco Ai/backend/app/core/database.py - Energy analytics → Anomaly detection: detects anomalies
- Domain endpoints → Report generation: serves reports
- Domain endpoints → Alert records: serves alerts
Eco Ai/backend/app/api/endpoints/future_intelligence.py - Energy readings → Relational database: persists in
- Weather readings → Relational database: persists in
- Appliance records → Relational database: persists in
- Alert records → Relational database: persists in
- Dataset records → Relational database: persists in
- Settings records → Relational database: persists in
- Model records → Relational database: persists in