How dhirajminde09/ecosmartx works
EcoSmartX is an energy-management platform for organizing facility and appliance data, analyzing consumption and anomalies, and exploring savings, carbon impacts, forecasts, and conservation recommendations. The primary React workflow is user navigation through a shared energy context into specialized intelligence views; that context derives metrics from the deterministic energy engine. The tree and excerpts also show a substantial vanilla-JavaScript application path with its own state, renderers, calendar, and calculation engine. Server-side implementation details were not sampled, so backend relationships are not mapped.
Main entry points: App.tsx React app shell · EnergyContext.tsx Energy state · views.js Vanilla view renderers · main.js Vanilla app driver
Components 26
React application
- React app shell
src/App.tsx - Navigation
src/components/Sidebar.tsx - Facility setup
src/components/views/FacilitiesAndRooms.tsx - Appliance intelligence
src/components/views/ApplianceIntelligence.tsx - Energy dashboard
src/components/views/CommandCenter.tsx - Energy analytics
src/components/views/EnergyAnalytics.tsx - Savings simulation
src/components/views/SimulationLab.tsx - Digital twin
src/components/views/DigitalTwinStudio.tsx - Reports and audit
src/components/views/ReportsAndAudit.tsx - AI copilot
src/components/views/GeminiCopilot.tsx - Conservation advice
src/components/views/ConservationAdvisor.tsx - Other intelligence views
src/components/views
Energy intelligence
- Energy state
src/context/EnergyContext.tsx - Energy calculations
src/utils/energyEngine.ts - Sample facilities
src/data/seedData.ts
Vanilla application
- Vanilla app driver
src/main.js - Vanilla app state
src/state.js - Vanilla view renderers
src/views/views.js - Calendar view
src/views/calendarView.js - Calendar service
src/services/calendar.js - Vanilla calculations
src/utils/energyEngine.js - SVG icon helper
src/utils/icons.js
External services
- Firebase auth and data
src/services/firebase.js - Firebase
- Google Calendar
Other components
- Energy manager
Connections 35
- Energy manager → React app shell: uses
src/App.tsx - React app shell → Navigation: renders
src/App.tsx - React app shell → Energy state: provides state
src/App.tsx - React app shell → Energy dashboard: routes to
src/App.tsx - React app shell → Facility setup: routes to
src/App.tsx - React app shell → Appliance intelligence: routes to
src/App.tsx - React app shell → Energy analytics: routes to
src/App.tsx - React app shell → Savings simulation: routes to
src/App.tsx - React app shell → Digital twin: routes to
src/App.tsx - React app shell → Reports and audit: routes to
src/App.tsx - React app shell → AI copilot: routes to
src/App.tsx - React app shell → Conservation advice: routes to
src/App.tsx - Energy state → Energy calculations: calculates metrics
src/context/EnergyContext.tsx - Energy state → Sample facilities: loads initial data
src/context/EnergyContext.tsx - Appliance intelligence → Energy state: reads energy state
src/components/views/ApplianceIntelligence.tsx - Energy dashboard → Energy state: reads energy state
src/components/views/CommandCenter.tsx - Facility setup → Energy state: reads energy state
src/components/views/FacilitiesAndRooms.tsx - Savings simulation → Energy state: reads energy state
src/components/views/SimulationLab.tsx - Digital twin → Energy state: reads energy state
src/components/views/DigitalTwinStudio.tsx - Reports and audit → Energy state: reads energy state
src/components/views/ReportsAndAudit.tsx - Conservation advice → Energy state: reads energy state
src/components/views/ConservationAdvisor.tsx - AI copilot → Energy state: reads energy state
src/components/views/GeminiCopilot.tsx - Vanilla app driver → Vanilla app state: uses state
src/main.js - Vanilla app driver → Vanilla view renderers: renders views
src/main.js - Vanilla app driver → Calendar view: renders calendar
src/main.js - Vanilla app state → Vanilla calculations: calculates metrics
src/state.js - Vanilla app state → Calendar service: uses calendar
src/state.js - Vanilla view renderers → Vanilla calculations: uses calculations
src/views/views.js - Vanilla view renderers → SVG icon helper: renders icons
src/views/views.js - Calendar view → Vanilla view renderers: uses renderers
src/views/calendarView.js - Calendar view → SVG icon helper: renders icons
src/views/calendarView.js - Calendar service → Firebase auth and data: uses
src/services/calendar.js - Firebase auth and data → Firebase: initializes
src/services/firebase.js - Calendar service → Google Calendar: integrates
- Other intelligence views → Energy state: uses shared state
src/components/views/OptimizationEngine.tsx