Inspiration

When a disaster hits, responders need to understand where the danger is, who may need help, and which resources are available. Inspired by State Farm’s “The Worst Day, at Scale” challenge, we built StateWatch to bring that information together. We wanted to help employees prepare before an emergency and keep vulnerable households from being overlooked afterward.

What it does

StateWatch is a disaster preparedness and response dashboard covering tornadoes, earthquakes, hurricanes, wildfires, blizzards, and floods.

Users can explore an interactive U.S. map, filter disaster layers, and inspect affected households, assistance needs, and response teams. Preparedness and response views connect the situation before a disaster with the work needed afterward.

Our backend supports household check-ins, outreach tracking, help requests, and team assignments. We also developed explainable prioritization, overdue-contact detection, and team-matching logic. The prototype uses synthetic households and simulated disaster scenarios.

Before, during, and after impact

  • Prepare: Inspect an area’s severity and exposure evidence, request an AI review, and approve risk-specific preparation notifications. Before impact, households can confirm they are safe; unanswered notices remain visible.
  • Check in again: Advance the simulated clock to after impact and approve a fresh follow-up notification. Households can report safe or need help, and each area gets its own 30-minute reply window. Earlier safe responders are excluded from repeat outreach under the demo policy.
  • Coordinate help: Explicit help replies automatically reserve compatible available units. If no unit matches, the request stays queued. Overdue unanswered follow-ups require employee approval for a response unit.
  • Close the loop: Complete active rescues, retain their history, and release units for waiting requests. Shared database records persist across reloads and synchronize between enrolled employees.

Assistance is prioritized by urgency and need. Customer status supplies proactive outreach context; non-customers can also receive assistance. Silence means unknown safety, not confirmed injury.

[!NOTE] Hackathon prototype. Households, hazard scenarios, notifications, and response operations are synthetic or simulated. The app does not deliver real messages or dispatch real units. It does not use actual State Farm customer records or internal systems.

How we built it

We built the frontend with Next.js, React, and TypeScript, using Leaflet and OpenStreetMap for the interactive map.

SpacetimeDB powers our backend, storing disaster zones, households, requests, teams, assignments, and activity history. Server-side reducers validate operational changes, while subscriptions keep connected dashboards updated.

We created repeatable scenario datasets across all six disaster types and developed rules that consider urgency, vulnerability, hazard severity, and time since contact. Team recommendations account for capabilities, capacity, availability, and distance.

Gemini supports on-demand area reviews, follow-up questions, and a map-wide assistant using compact scenario snapshots. The assistant explains supplied evidence; it cannot send notifications, dispatch teams, change records, or set priority scores. Deterministic decision logic remains independent of AI generation.

Challenges we ran into

One challenge was turning six different disaster types into a consistent interface without losing the details that make each hazard different. We also had to distinguish geographic context from actual impact areas so the map would communicate exposure clearly.

Keeping operational data consistent was another major challenge. Assigning a team needs to update the request, team availability, and assignment together while preventing conflicting dispatches.

As our datasets grew, we worked on clustering, viewport filtering, and paginated lists to keep the map usable. Coordinating shared schemas and connecting separately developed frontend and backend components also required careful integration.

Accomplishments that we’re proud of

We’re proud of building a shared foundation for both preparedness and response, with six disaster types represented in one dashboard.

Our backend validates assignments, enforces employee access, and records operational changes in an activity history. We also built repeatable scenarios and automated checks for authorization, workflow transitions, exposure calculations, and recommendation logic.

We made our decision logic explainable: priority scores include contributing reasons, and team recommendations show eligibility factors and clearly labeled travel estimates.

What we learned

We learned that disaster coordination depends on carefully defined states. A household reporting that it is safe does not necessarily mean its assistance needs are resolved, and an available team may still lack the right capabilities.

We also gained experience with SpacetimeDB subscriptions, transactional backend logic, geographic data, and map performance. Building together reinforced the value of agreeing on data contracts early and testing integration throughout development.

What’s next for StateWatch

Our next step is completing browser validation and refining the dashboard controls for prioritization, outreach, and dispatch so employees can reliably manage the full workflow from the interface. This includes two-session synchronization, keyboard access, responsive layouts, and the separate Google Maps routing workspace.

From there, we want to integrate live hazard feeds, expand road-aware routing, add shelter and supply information, and support opt-in notification delivery. We also want to validate our prioritization assumptions with emergency-response professionals and expand testing across larger scenarios.

Demo walkthrough

Target: 2–3 minutes. Start at /demo in Disaster prep.

  1. Inspect an area. Select an area alert, review its evidence, and choose Take action.
  2. Send a preparation check-in. Review the High/Medium/Low messages and approve the initial notification. Simulate one safe confirmation; leave another household unanswered.
  3. Advance to impact. Select Skip 2 hours → After impact, reopen the area, and approve the second notification. Earlier safe responders are excluded from repeat outreach.
  4. Respond to help. Simulate need help to reserve an available compatible unit automatically. If none is available, the request remains queued.
  5. Follow up on silence. Select Skip 30 min → Check responses, then approve a response unit for an unanswered household after its area's reply deadline.
  6. Complete and replay. Select Skip 30 min → Complete rescues. Completed households leave the unresolved queue; freed units can serve queued help requests. Newly assigned rescues finish on a later completion skip. Use Reset demo to rehearse again.

Use / with database mode to demonstrate persisted shared records. Each second notification starts its own 30-minute reply window; switching views or hazard filters does not advance time.

Technology

  • Interface: Next.js 16.4.5, React 19.3.0, TypeScript, and Tailwind CSS 4.
  • Mapping: Leaflet and OpenStreetMap for the operational dashboard; a separate Google Maps response-routing workspace.
  • Backend: A TypeScript SpacetimeDB module with validated transactional reducers, authorized employee views, and generated client bindings.
  • Live state: SpacetimeDB subscriptions synchronize committed operational changes.
  • Decision logic: Explainable rules for exposure, priority, overdue contact, and compatible-team recommendations.
  • AI: Server-side Gemini routes consume compact scenario snapshots; deterministic prioritization stays independent of the model.
  • Scenarios: Reproducible Small (60 households), Demo (10,000), and Stress (100,000) fixtures.

[!IMPORTANT]

The deployed statewatch backend uses the Demo fixture: 10,000 households, 56 disaster areas, and 220 teams. Normal source builds use Small. Follow the fixture publication guidance before rebuilding or publishing to preserve the intended shared reset dataset.

Built With

Share this project:

Updates

Submission history