Inspiration

We were inspired by a simple but frustrating reality: Homes with solar panels often generate surplus energy during the day, but much of it is wasted or sold back to the utility at very low rates. Meanwhile, their neighbors still pay high retail prices for grid power, and during blackouts even solar homes can go dark.

We asked ourselves: What if neighborhoods could power themselves, sharing energy fairly and staying resilient during outages? That question sparked NeighborGrid, our simulation of a community-powered microgrid.

What it does

NeighborGrid simulates a small neighborhood of solar-powered homes connected to a microgrid.

For Admins: It shows a live overview of the entire community, how much each home is generating, consuming, and sharing with the microgrid pool, as well as how much power the community is exporting to or importing from the main grid.

For Users: Each homeowner can see their solar production, consumption, surplus, battery state-of-charge, and energy credits earned or spent by sharing with neighbors.

Core Logic: Surplus power from one home flows first into the community pool before touching the utility grid, allowing fairer local trade and improved resilience.
Forecast boost: We use XGBoost forecasts for near-term PV generation and household demand to drive the simulator, making profiles more realistic than purely synthetic curves.

How we built it

  • Frontend: React + Vite dashboard with a light, sustainable theme; real-time charts consume an SSE stream.
  • Backend: Node/Express (TypeScript). Endpoints: GET /stream (SSE), GET /state/admin, GET /state/user/:homeId, GET /health, plus simple simulation controls.
  • Simulation: Tick-based engine (accelerated/realtime) modeling PV/load curves, battery SoC, community totals, and outage scenarios.
  • ML realism (XGBoost): Trained on historical solar/load patterns (hour/season/weather) to generate per-home profiles; the simulator consumes these forecasts each tick to update SoC and sharing flows.
  • Data flow: Engine → SSE deltas → frontend (for live widgets); REST for admin/user snapshots.
  • Tooling: Strict TS types, tsx (ESM), SSE heartbeats, and credits accounting.

Challenges we ran into

  • Removing mock JSON values and wiring everything to live backend simulation without breaking UI flow.
  • Designing fair allocation rules (equal-share, need-based, capped) that balance realism with hackathon time limits.
  • Setting up Supabase schema with multiple foreign keys (users ↔ homes ↔ microgrids) and making it work with both admin and user dashboards.
  • Managing realtime updates while keeping the UI smooth and responsive.

Accomplishments that we're proud of

  • Built a working dual-dashboard system (admin + user) that visualizes energy flows clearly and interactively.
  • Implemented a simulation loop that produces believable household generation, consumption, and sharing patterns.
  • Created a credit system where households earn and spend credits based on their contributions to the microgrid pool.
  • Integrated an XGBoost forecasting pipeline that measurably improves realism of solar/load traces and downstream economics.

What we learned

  • How microgrids can transform communities by improving energy equity and resilience.
  • That Supabase Realtime is powerful for live dashboards, but careful schema planning is essential.
  • The importance of clear data contracts between backend and frontend to avoid duplication or drift.
  • XGBoost offers strong accuracy and fast inference for time-dependent tabular features (hour-of-day, day-of-week, temperature, cloud cover) with simpler ops than deep models.
  • How to balance realism and speed, enough to impress judges without getting stuck in technical rabbit holes.

What's next for Share-Watt

  • Integrating real IoT data streams (from solar inverters and smart meters) instead of simulations.
  • Building a mobile app so homeowners can monitor their credits and energy flows anywhere.
  • Testing the simulation on ARM edge devices (like Raspberry Pi) for community pilot projects.

Built With

Share this project:

Updates