How chinu21123/energyiq--decentralized-smart-energy-optimization-platform works
EnergyFlow is an energy-community dashboard with account entry, on-chain energy listings, and monitoring/optimization views. The dashboard page dispatches to the trading, anomaly, optimization, self-healing, and profile features; trading uses the Web3 and energy-market helpers, while anomaly-related UI and federated API modules have separate detection paths. The excerpts show local demo state and blockchain-facing helpers, but not how the standalone backend connects to the frontend or chain contracts. Several federated modules and the backend are only partially evidenced, so their unverified links are omitted.
Main entry points: dashboard/page.tsx Dashboard router · energy-trading.tsx Energy trading · web3.ts Web3 wallet · app/page.tsx Login
Components 21
Account and dashboard
- Login
app/page.tsx - Signup
app/signup/page.tsx - Dashboard router
app/dashboard/page.tsx - Profile
components/dashboard/profile.tsx
Energy marketplace
- Energy trading
components/dashboard/energy-trading.tsx - Marketplace helpers
lib/energy-market.ts - Web3 wallet
lib/web3.ts - Currency conversion
lib/currency.ts
Grid intelligence
- Anomaly dashboard
components/dashboard/anomaly-detection.tsx - Anomaly alerts
components/dashboard/anomaly-alert.tsx - Quantum optimization
components/dashboard/quantum-optimization.tsx - Self-healing
components/dashboard/self-healing.tsx - Federated API
federated/api_server.py - Federated detection
federated/anomaly_detection.py - Federated client
federated/client.py - Data generator
federated/data_generator.py - Federated server
federated/server.py
Services and state
- Demo state and schemas
lib/store.ts - Backend API
backend/main.py
Other components
- Resident
- MetaMask
Connections 20
- Resident → Login: signs in
app/page.tsx - Resident → Signup: creates account
app/signup/page.tsx - Login → Web3 wallet: connects wallet
app/page.tsx - Login → Dashboard router: routes after login
- Web3 wallet → MetaMask: requests connection
- Dashboard router → Energy trading: renders
app/dashboard/page.tsx - Dashboard router → Anomaly dashboard: renders
app/dashboard/page.tsx - Dashboard router → Quantum optimization: renders
app/dashboard/page.tsx - Dashboard router → Self-healing: renders
app/dashboard/page.tsx - Dashboard router → Profile: renders
app/dashboard/page.tsx - Energy trading → Marketplace helpers: loads and trades
components/dashboard/energy-trading.tsx - Energy trading → Web3 wallet: connects wallet
components/dashboard/energy-trading.tsx - Energy trading → Currency conversion: converts prices
components/dashboard/energy-trading.tsx - Marketplace helpers → Web3 wallet: uses chain utilities
lib/energy-market.ts - Anomaly dashboard → Anomaly alerts: renders alerts
components/dashboard/anomaly-detection.tsx - Anomaly dashboard → Demo state and schemas: reads demo data
components/dashboard/anomaly-detection.tsx - Quantum optimization → Demo state and schemas: uses demo data
components/dashboard/quantum-optimization.tsx - Self-healing → Demo state and schemas: uses demo data
components/dashboard/self-healing.tsx - Federated API → Federated detection: calls detection
federated/api_server.py - Federated client → Data generator: uses generated data
federated/client.py