'Twas the night before Christmas, when all through the grid,
Not a circuit was stirring, each battery lid hid.
The solar panels gleamed in the moonlight with care,
In hopes that St. Nicholas soon would be there.
The meters were monitoring load with precision,
While data flowed smoothly with perfect transmission.
When out on the network there arose such a sight,
A dashboard so brilliant, it lit up the night!
With real-time data from Solana's blockchain,
And Privy authentication, so easy to main-tain.
The EMS optimizer works through the day,
Ensuring your energy never goes to waste, hooray!
So here is our gift, wrapped in Docker with care,
A blueprint for builders who wish to share.
May your batteries be charged and your solar shine bright,
Merry Christmas to all, and to all a good night! 🎄⚡
An open-source, real-time energy management dashboard for monitoring distributed energy resources (DERs) connected to the Sourceful Energy platform.
Christmas 2025 Gift - This project is open source and serves as a blueprint for developers building on the Sourceful Energy platform. We welcome contributions from developers, energy professionals, and anyone interested in advancing distributed energy resource management.
- Wallet Authentication - Secure login via Solana wallet using Privy
- Real-time Monitoring - Live data for PV inverters, batteries, grid meters, and site load
- Interactive Charts - Time series visualization with clickable legend to show/hide data series
- Multi-DER Support - View all distributed energy resources at a site including energy meters
- Adaptive Resolution - Charts automatically adjust data resolution based on time range
- EMS Visualizations - Comprehensive Energy Management System (EMS) visualizations including:
- EMS Status Dashboard - Real-time optimizer status, current mode, managed DERs, and electricity pricing
- EMS Schedule Chart - Visual schedule showing optimization modes (IDLE, SELF_CONSUMPTION, FORCE_CHARGE, FORCE_DISCHARGE) over time with battery/EV state-of-charge, power forecasts, and pricing data
- Node.js 18+
- A Solana wallet (Phantom, Solflare, etc.)
# Clone the repository
git clone https://github.com/srcfl/ems-dashboard.git
cd ems-dashboard
# Install frontend dependencies
cd frontend
npm installNote: The Privy app IDs for Sourceful Energy are configured by default, so the project works out of the box. No environment configuration needed!
Important: This dashboard is currently configured to work only on localhost:3000 due to Privy's domain restrictions. This is intentional - we provide this as a blueprint and reference implementation for developers. We're working on a better solution for bringing your own wallet authentication, but for now, this serves as a complete example of how to integrate with the Sourceful API.
The easiest way to run the dashboard:
# Build and start
docker-compose up
# Or run in background
docker-compose up -d
# Stop
docker-compose downOpen http://localhost:3000 in your browser.
cd frontend
npm run devOpen http://localhost:3000 in your browser.
ems-dashboard/
├── frontend/ # React + TypeScript + Vite
│ ├── src/
│ │ ├── api/ # Sourceful API client
│ │ ├── auth/ # Privy authentication
│ │ ├── components/# UI components
│ │ ├── contexts/ # React contexts
│ │ └── hooks/ # Custom hooks
│ └── ...
└── docs/ # Documentation
The dashboard connects directly to the Sourceful GraphQL API (api-vnext.srcful.dev) using Ed25519 wallet signatures for authentication.
For detailed API documentation, see:
- API Blueprint - Developer guide for building on Sourceful
- API Documentation Gaps - Known documentation issues
| Type | Prefix | Description |
|---|---|---|
| PV | pv- |
Solar inverters |
| Battery | bt- |
Battery storage systems |
| Meter | em- |
Energy meters (grid connection) |
| Charger | ch- |
EV chargers |
# Run development server
npm run dev
# Type check
npm run build
# Lint
npm run lintWe welcome contributions from the Sourceful Energy community! Whether you're fixing bugs, adding features, improving documentation, or suggesting enhancements, your help makes this project better for everyone.
- Fork the repository and create a new branch for your changes
- Make your changes - Follow the existing code style and add tests if applicable
- Test your changes - Ensure everything works and passes linting
- Submit a pull request - Include a clear description of your changes and why they're valuable
- 🐛 Bug fixes and improvements
- ✨ New features and DER type support
- 📊 Enhanced visualizations and charts
- 📝 Documentation improvements
- 🎨 UI/UX enhancements
- ⚡ Performance optimizations
- 🧪 Test coverage
Feel free to open an issue to discuss ideas, report bugs, or ask questions. We're here to help!
See SECURITY_AUDIT.md for security review details.
Key security features:
- No hardcoded secrets
- Environment-based configuration
- Ed25519 wallet signatures for API auth
- Console logs stripped in production builds
This project is open source and available under the MIT License.
Built with ❤️ for the Sourceful Energy community. Special thanks to all contributors who help make this project better.