Skip to content

kbhatnagar1506/GRIDSHADOW

Repository files navigation

GridShadow ⚡️

AI storm operations copilot for utilities and microgrids.
GridShadow turns live weather into a ranked risk view and generates a personalized storm preparation + restoration plan grounded in operator runbooks, constraints, and priorities.


What it does

During extreme weather, operators receive forecasts and alerts, but translating that into decisions is still manual. GridShadow helps answer:

  • What zones/feeders/assets are most likely to fail in the next 6–48 hours?
  • Where should crews and resources be staged before impact?
  • What should be restored first during outages?
  • How do we prioritize critical infrastructure (hospitals, shelters, EOCs, water) without delaying overall restoration?

GridShadow is built to be operator-grade: it produces checklists, dispatch tasks, and exportable briefs, not just charts.


Key features

  • Live storm awareness: Forecast + alerts timeline for a selected territory
  • Risk ranking: Top at-risk zones/feeders/assets with driver explanations
  • Critical-first planning: Adjustable tradeoff between:
    • maximize customers restored and
    • critical facilities first
  • Supermemory personalization: Ingests operator documents (runbooks, priority rules, crew resources, incident logs) so the same storm produces different plans for different operators
  • Exportable briefs: Control room ops brief, crew dispatch task list, public safety brief
  • Learning loop: After-action logging updates vulnerability notes and procedural learnings

Demo flow (what judges see)

  1. Situation: live forecast + active alerts + storm timeline
  2. Risk: ranked high-risk zones + critical facilities at risk
  3. Plan: storm prep checklist + crew staging + restoration order
  4. What-if: slider to shift objective between critical-first vs max-customers
  5. Copilot: structured responses with actions, reasons, triggers, assumptions
  6. After-action: log outcomes → memory updates → next run improves

Architecture (high level)

Forecast → Risk → Plan → Brief → Learn

Reasoning models

We use lightweight reasoning components to avoid generic chatbot output:

  • Retriever: pulls the most relevant runbook sections / thresholds / priorities from memory
  • Risk scorer: converts storm signals into risk scores with explainable drivers
  • Planner: generates prep + restoration steps under constraints (crews, SOC floors, islanding rules)
  • Verifier: checks for missing steps, approvals, and safety constraints; outputs assumptions + triggers

Tech stack

  • Frontend: Next.js 16 (React 19)
  • Backend: Next.js API routes (Node.js)
  • Database: PostgreSQL (Cloud SQL)
  • LLM: Gemini API
  • Memory: Supermemory (RAG)
  • Weather: Google Weather API
  • Maps / Geocoding: Google Maps Platform
  • Visualization: Recharts, D3, Google Maps

Getting started

1) Clone

git clone https://github.com/kbhatnagar1506/GRIDSHADOW.git
cd GRIDSHADOW

2) Install

pnpm install

3) Environment

cp .env.example .env.local

Edit .env.local and set at least:

  • DATABASE_URL — PostgreSQL (see DEPLOY.md for Cloud SQL)
  • SUPERMEMORY_API_KEY — for connectors and Copilot memory
  • GEMINI_API_KEY or GOOGLE_AI_API_KEY — for Copilot (optional; uses demo responses if unset)
  • GOOGLE_MAPS_API_KEY or GOOGLE_WEATHER_API_KEY — for weather
  • NEXT_PUBLIC_GOOGLE_MAPS_API_KEY — for the Situation map

4) Database

Run scripts/schema-multitenant.sql (or scripts/migrate-tenant-profiles.sql) on your Postgres instance.

5) Run

pnpm dev

Open http://localhost:3000.


Deploy

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors