Inspiration

Distribution restoration is often taught through static diagrams, but the hard part is the order of operations. A premature close can energize a faulted cable, backfeed a section or overload a source. Restoration Lab turns that reasoning into a short interactive drill for junior distribution engineers and engineering students.

What it does

A synthetic cable fault interrupts 700 customers and a community hospital. The trainee operates four switches on a one-line feeder. Before anything changes, a deterministic safety gate evaluates the proposed network.

Try closing Source A first. The app rejects the move, keeps the switch open and marks the unsafe fault path in red. Open both isolators, then Source A can restore West campus while Backup Source B restores Riverside and the hospital. Every attempt receives a plain-language receipt.

Judge snapshot

  • Audience: junior distribution engineers and engineering students learning restoration order
  • Scenario: 700 interrupted customers, including one community hospital
  • Safety model: 4 deterministic checks before every state change
  • Visible proof: 1 blocked unsafe attempt followed by 4 accepted restoration actions
  • Automated checks: 6 graph-engine tests and 4 browser journeys
  • Safety boundary: 0 live-grid connections, 0 operational commands and only synthetic data

These are product proof points, not adoption claims. Judges can reproduce them with Watch demo or the public test commands.

Why it matters

A static one-line drawing shows equipment. It does not let a learner experience why sequence matters. Restoration Lab makes the unsafe choice memorable because it fails visibly, explains the broken rule and leaves the trusted state untouched.

The same pattern can support more training scenarios later: propose a change, test it, then either accept it or return evidence.

How we built it

The browser app uses React, TypeScript and Vite. A graph engine builds adjacency from the closed switches, traces reachability from both sources and checks four rules:

  • no source may reach the faulted cable
  • two sources may not feed the same section
  • restored demand must stay within the drill's source limits
  • the hospital must be energized in the completed state

The key design is a two-phase action path:

  1. Copy the current switch state.
  2. Apply the proposed action only to that copy.
  3. Run all safety checks.
  4. Accept the copy or reject it without changing the trusted state.

Vitest covers the graph rules. Playwright checks the judge-first explanation, blocked action, safe four-step restoration and timed guided demo. Remotion assembles the 84-second narrated walkthrough.

How we used the Devpost Learn Skill Pack and Codex

We used the required challengepost/learn-ai-basics skill pack from the start. The flipped-interaction flow produced a learner profile, scope, PRD, technical spec and ordered build checklist before implementation.

Codex built the app in checked slices, ran the unit and browser tests, created the app map and prepared the judge-facing assets. The public repository keeps scope.md, prd.md, spec.md, the build checklist and code tour beside the working code.

Challenges

The hardest part was keeping a rejected action completely separate from trusted state. The two-phase check solved that. A blocked move can change the receipt and learning timeline, but it cannot mutate the switch map or accepted-action count.

The second challenge was presentation. A judge should understand the audience, outage and safety idea in ten seconds, so the first screen now states the problem, solution, evidence counts and one-click demo path before the technical console.

Accomplishments

  • The app explains why a move is unsafe instead of returning a black-box answer.
  • The guided demo ends with all 700 customers and the hospital restored while the fault remains isolated.
  • Six unit tests, four browser tests and the production build pass.
  • The repository contains the planning trail, code tour, screenshots, captions and Remotion source.
  • The live app works without an account, API key or setup.

What we learned

Small, inspectable rules made the AI-assisted build easier to test. Planning first also stopped the project from growing into a full power-flow simulator. The proof stays focused on one decision: should this proposed switch action be allowed before it changes the network?

What's next

Add more feeder scenarios, a scenario-authoring format and instructor scoring. The safety engine will remain deterministic and the product will stay a training model, not an operational switching tool.

Built With

Share this project:

Updates

Submission history