Inspiration
The inspiration for FIREWISER comes directly from the unique and terrifying challenges posed by wildfires in communities like Pacific Palisades. This isn't just about fighting a fire; it's about managing a complex human crisis in a geographically difficult area.
Here’s how the app addresses the core problems seen in real-world events:
The Resident's Dilemma: Panic and Indecision When an evacuation order hits the Palisades, residents face a chaotic reality: Canyon Traps: Winding canyon roads like Topanga or Kanan Dume can become bottlenecks or death traps. The safest route isn't always the most direct. Information Overload: Multiple news sources, conflicting social media posts, and official alerts create a confusing picture.
Decision Paralysis: In the face of imminent danger, the simple question, "What do I grab?" can waste precious, life-saving minutes. A family with toddlers has vastly different immediate needs than an elderly couple.
FIREWISER's Solution: Hyper-Personalized Guidance: This is the core of the system. Instead of a generic checklist, FIREWISER uses Gemini to generate an immediate, prioritized action plan based on the user's specific household profile. For a "Parent with Young Children," the first step is "Secure Children First," not "shut off the gas." This cuts through the panic and provides clear, actionable steps.
The Custom SafeRoute Map: The app doesn't just show a Google Maps route. It overlays critical, real-time fire data: the current perimeter, no-go "Code Red" zones, and, crucially, an AI-predicted spread boundary. It provides one clear, safe path to a designated shelter, removing the guesswork and preventing people from driving toward danger.
The Commander's Dilemma: A Lack of Ground Truth For the Incident Commander at the forward operating base, the biggest challenge is a lack of real-time intelligence: Where are the people? Are there still residents in the evacuation zone? Where are the highest concentrations of people who haven't left yet? How do we prioritize? With limited resources, which neighborhoods need the most immediate assistance? How do we use air support effectively? An air tanker dropping retardant is an incredibly powerful tool, but dropping it in the wrong place is a monumental waste. Where can a single drop protect the most lives and homes?
FIREWISER's Solution: Dynamic Triage Overlay (Command View): This is the game-changer. By getting consent for anonymous location sharing, FIREWISER transforms the commander's map from a static street grid into a live, dynamic view of the human landscape. They can see clusters of "orange dots" (people en route) and know exactly where the stragglers are. This allows them to dispatch ground crews to the most at-risk areas with precision.
AI-Optimized Air Operations (Air Ops View): This is where the system becomes truly proactive. The app feeds the real-time location data of the at-risk "orange dot" clusters to a Gemini model. The AI instantly calculates the optimal drop zone—the single location where a retardant drop will most effectively shield the largest group of evacuating residents from the fire's path. The commander isn't guessing; they are executing a data-driven, life-saving maneuver, vetted and confirmed by AI, and sent directly to the air asset.
In essence, the inspiration for FIREWISER is to bridge the critical information gap between panicked residents and overwhelmed commanders. It uses Google's AI to turn the chaos of a wildfire evacuation into a coordinated, intelligent, and ultimately safer operation for everyone involved
The FIREWISER platform is a direct response to the escalating catastrophe of the 2025 Pacific Palisades wildfires, which exposed a critical gap in contemporary emergency management—the failure to transition from reactive alerting to predictive, personalized resource triage. The verified loss of 6,837 structures and up to $131 billion in economic damage confirms that conventional systems reliant on static data fail under dynamic risk. FIREWISER solves this by creating an Intelligent Digital Twin of the evacuation environment, prioritizing not just proximity but personalized, behavioral vulnerability
What it does
The FIREWISER Architecture is engineered on a multi-layered, Hybrid AI Orchestration model that delivers actionable operational intelligence within high-stakes environments.
FIREWISER presents a more elegant, technically disciplined, and user-centric solution that solves the critical problem of human behavior and operational precision during a high-stakes, real-time crisis.
At the core of the evacuee experience is the Evacuee Digital Twin, powered by the Gemini 2.5 Flash model. Its primary cognitive role is Hyper-Personalized Guidance Generation. The system employs a sophisticated zero-shot prompting strategy that ingests a user's specific profile (e.g., "Parents with Young Children") and generates a highly-structured JSON object. The true novelty lies in the strict enforcement of a responseSchema, which compels the LLM to function not as a mere text generator, but as a reliable policy engine. This ensures the output—a tailored evacuation checklist and psychological coaching messages—is immediately machine-readable, guaranteeing UI population without complex parsing.
Simultaneously, the system performs Real-Time Spatio-Temporal Hazard Forecasting. It integrates multi-layered data (Google Maps, Google Air Quality API) and simulates a Vertex AI Predictive Boundary, enabling the Custom SafeRoute to intelligently navigate around future high-risk zones, rather than just current closures.
The Command Center orchestrates Multi-Agent Triage & Tactical Asset Optimization. The Dynamic Triage Overlay uses a high-throughput Gemini model simulation to perform real-time cluster analysis, distilling movement patterns into clear "En Route" vs. "Safe" metrics without exposing PII. The core Air Asset Optimization algorithm (getOptimalDropZone) analyzes at-risk evacuees relative to the predicted fire path, calculating the geometric centroid of the most vulnerable cluster to identify the single most effective fire retardant drop zone. This holistic approach ensures absolute clarity in high-stakes environments.
It is a dual-interface crisis management system designed to mitigate the two most critical challenges in a wildfire evacuation: resident panic and commander uncertainty. It operates by transforming raw data into actionable intelligence for both civilians and first responders, leveraging Google's AI as a core decision-support engine.
At a high level, the system functions in two distinct, yet interconnected, modes:
- For the Resident: A Hyper-Personalized Evacuation Engine For the individual caught in an unfolding disaster, FIREWISER moves beyond generic alerts. It acts as a personalized "mission control" that delivers immediate, life-saving guidance by: Generating Bespoke Action Plans: It ingests a user's household profile (e.g., "Parents with Young Children," "Elderly Household") and uses Google's Gemini AI to instantly generate a prioritized, machine-readable evacuation checklist. This cuts through decision paralysis by providing clear, context-aware instructions tailored to the user's specific needs.
Providing a Dynamic SafeRoute Map: The system doesn't just show a fire on a map; it renders a custom, dynamic route to safety. This map integrates multiple data layers: the current fire perimeter, a "Code Red" no-entry zone, real-time weather conditions, and crucially, an AI-predicted fire spread boundary. This provides the user with one unambiguous, safe path to a designated shelter, preventing them from inadvertently driving toward danger.
- For the Incident Commander: A Dynamic Triage & Resource Optimization Platform For emergency responders, FIREWISER provides an unprecedented level of real-time situational awareness through its command-level interfaces, which are activated by user consent to anonymous location sharing. The Dynamic Triage Overlay (Command View): This is the system's core intelligence feature. It transforms the commander's tactical map from a static grid into a live, anonymized census of the affected population. It visualizes clusters of evacuees currently "en route" versus those who have reached a "safe" shelter. This enables commanders to shift from reactive searching to data-driven triage, allowing them to identify and prioritize at-risk population clusters and allocate ground resources with precision.
AI-Optimized Air Operations (Air Ops View): This represents the system's most advanced capability. FIREWISER ingests the real-time location data of the highest-risk evacuee clusters and feeds it to an AI model. The model then calculates and recommends the single optimal drop zone for an aerial asset (e.g., an air tanker) to lay down retardant. This powerful feature changes the paradigm of aerial firefighting from area denial to proactive population protection, ensuring that high-value, limited aerial resources are deployed for maximum life-saving impact. In essence, FIREWISER acts as an intelligent orchestration layer between the public and emergency services. It closes the critical information gap during a crisis, converting the chaos of an evacuation into a coordinated, data-driven, and ultimately safer operation.
How we built it
From an architectural standpoint, FIREWISER is engineered as a high-performance, client-centric Progressive Web Application (PWA). The fundamental design principle was to push as much logic and rendering to the edge as possible, maximizing resilience and responsiveness.
Multi-Tiered AI Orchestration: This is the core innovation. We orchestrate a fleet of specialized models based on requirements for latency, privacy, power, and cost:
Tier 1: Cloud Intelligence (Google Gemini API): Reserved for complex computational tasks. Our use of the Gemini API is highly disciplined: we treat it as a structured, on-demand data transformation service. By enforcing a rigid responseSchema and setting the responseMimeType to application/json, we compel the LLM to behave as a predictable API endpoint. This is the critical technique for ensuring reliability and eliminating non-deterministic "creative" responses in a life-or-death context.
Tier 2: Edge AI (Chrome's Built-in AI): Leveraged for tasks demanding zero-latency and absolute privacy, such as instantaneous summarization and rephrasing of checklist items. This provides cognitive aids to users under stress without a network round-trip.
Tier 3: High-Fidelity Tactical Simulation: The getOptimalDropZone function is an intentionally architected, high-fidelity simulation of a future backend ML model. This allowed us to decouple frontend and backend development, enabling parallel refinement of the end-to-end Air Operations command workflow.
High-Performance Visualization Architecture: We implemented a critical architectural pattern in the Map.tsx component: separating state management from high-frequency rendering. All high-frequency updates (e.g., 60fps fire and asset animations) are handled directly by a requestAnimationFrame loop that mutates the properties of underlying google.maps.Marker objects. This avoids overwhelming React's Virtual DOM, ensuring a fluid and responsive tactical overview even under heavy data load.
The Intelligence Layer: A Hybrid AI Architecture FIREWISER integrates AI at two distinct levels—cloud and on-device—to optimize for both power and performance. Cloud AI (Google Gemini): For complex, generative tasks, we utilize the Gemini API via @google/genai in services/aiService.ts. The key to its reliable integration is the use of structured output with responseSchema. We don't just ask for text; we instruct the model to return a strict, machine-readable JSON object. This transforms Gemini from a simple chatbot into a predictable, policy-driven API endpoint for generating bespoke evacuation checklists. On-Device AI (Chrome's Built-in AI): For low-latency UI enhancements, we leverage the experimental window.ai API, as implemented in services/chromeAiService.ts. This allows us to perform tasks like summarizing checklists and rephrasing items for urgency instantly on the user's device. This hybrid model is critical: it provides immediate, helpful micro-interactions without network latency and enhances user privacy by keeping that data local, while offloading the heavy generative work to the cloud.
- Tech Stack & Tooling Framework: React with TypeScript provides a robust foundation. TypeScript ensures type safety across our complex data models (e.g., WiseOutput, Dot, Aircraft), significantly reducing runtime errors. Styling: Tailwind CSS is used for rapid, utility-first styling, allowing us to build a polished, responsive UI with a consistent design language. API Integration: All external data fetching (Google Air Quality, Gemini API) is centralized in services/aiService.ts, creating a clean separation of concerns between data logic and UI presentation. Asynchronous operations are managed with modern async/await and Promise.all for efficient, parallel data fetching during the loading sequence.
Challenges we ran into
Hardening a Generative AI for Mission-Critical Use: The inherent non-determinism of LLMs posed a significant risk of malformed JSON output or API failure.
Resolution: We implemented a defense-in-depth strategy. Our primary defense was strict schema enforcement on the Gemini API calls. Our secondary defense was the critical safety net in aiService.ts: if the Gemini API call fails for any reason, the system immediately and seamlessly falls back to pre-vetted, static guidance (ROLE_BASED_GUIDANCE). This guarantees high availability for the core life-saving feature.
Maintaining 60fps Visualization Under Load: Initial implementations tied map marker positions to the application state, leading to catastrophic frame drops when animating multiple objects.
Resolution: We engineered a "marker manager" pattern that maintains direct references to the google.maps.Marker instances. Our animation loop bypasses the main rendering system, using native marker.setPosition() calls to directly mutate properties on the GPU-accelerated map canvas, achieving fluid, scalable visualization.
Mitigating User Anxiety During Asynchronous Operations: A blank loading screen is unacceptable in an emergency.
Resolution: We designed the loading sequence (Step3_Loading.tsx) as a "choreographed narrative." While concurrent data fetches are initiated (Promise.all), the UI presents a timed sequence of status updates, creating a powerful illusion of a deliberate, robust, multi-step process that builds user trust.
Accomplishments that we're proud of
The Multi-Tiered AI Orchestration Engine: We are particularly proud of the successful integration of cloud, edge, and simulated AI into a single, coherent application. This hybrid architecture represents the future of intelligent application design, strategically balancing immense power (Cloud Gemini), instantaneous response (Edge AI), and development agility (Simulation).
The Real-Time Dynamic Triage Overlay: This is the successful engineering of an actionable intelligence layer from raw, anonymized data. The system's ability to process and clearly visualize evacuee flow provides an unprecedented level of real-time situational awareness, enabling commanders to allocate life-saving resources with precision.
Achieving a Cinematic and Confidence-Inspiring UX: We made a conscious decision that the UI must be both functional and confidence-inspiring. By investing in high-fidelity custom animations and dynamic, pulsating data layers, we created a powerful "command center" experience. The underlying performance optimizations were the key engineering accomplishment that ensured this cinematic quality did not sacrifice critical performance.
What we learned
Treat LLMs as Constrainable Services, Not Oracles: Our most significant takeaway was the need to architecturally constrain generative AI. The shift from open-ended prompting to demanding structured JSON output via a schema was pivotal. It taught us to treat LLMs as powerful but fuzzy microservices, and that it is our engineering responsibility to define a rigid contract they must adhere to for reliable mission-critical performance.
Decouple Visual Rendering from Logic State: The performance lessons from Map.tsx ingrained the principle that purely visual phenomena updating at 60fps must be offloaded to browser-native APIs (requestAnimationFrame) to prevent the Virtual DOM from becoming a severe bottleneck in data visualization applications.
In High-Stress UX, Perceived Performance is Reality: Engineering the choreographed loading sequence taught us that communicating progress builds immense user trust and reduces anxiety, directly impacting the application's effectiveness during an emergency.
We Engineered a High-Performance, Real-Time Geospatial Engine in the Browser The single greatest technical challenge was rendering a dynamic, data-rich tactical map that remains fluid and responsive under heavy load. A lagging map in a life-or-death situation is unacceptable. The Accomplishment: We successfully built a map that can animate hundreds of individual elements—evacuee dots, aircraft, pulsating zones, flickering flames—at a smooth 60 frames per second.
How We Did It: We made a critical architectural decision to bypass React's standard render loop for high-frequency animations. Instead of relying on state changes to move objects, we use a single requestAnimationFrame loop to directly manipulate Google Maps marker positions (marker.setPosition()). We maintain a persistent Map of marker instances, which is orders of magnitude more performant than re-rendering components. This gives us the visual richness of a native application with the accessibility of the web.
We Transformed a Generative AI into a Predictable, Mission-Critical Policy Engine Generative AI is famously non-deterministic, which is a liability in a crisis tool that requires absolute reliability. We couldn't risk the AI outputting an unhelpful paragraph when a user needs a structured, machine-readable plan. The Accomplishment: We successfully engineered our service layer to treat the Gemini API as a deterministic, policy-driven endpoint. How We Did It: The key was rigorously enforcing a responseSchema in our API calls. By defining a strict JSON structure, we compel the model to return data that perfectly matches our TypeScript interfaces every time. Furthermore, we built in a crucial layer of resilience: if the API call fails for any reason, the system instantly and gracefully falls back to pre-defined, expert-vetted ROLE_BASED_GUIDANCE. This ensures the user always receives a safe, actionable plan, making the AI a powerful enhancement, not a single point of failure.
We Implemented a Sophisticated Hybrid AI Model for Unmatched Responsiveness Users need both powerful, cloud-based intelligence and instantaneous, zero-latency feedback in the UI. Relying solely on cloud API calls for every interaction would make the application feel sluggish. The Accomplishment: We created a hybrid AI architecture that leverages the best of both cloud and on-device processing.
How We Did It: We use the powerful Gemini API for the initial, heavy-lifting task of generating the structured evacuation plan. For subsequent, smaller tasks like summarizing the checklist or rephrasing items for urgency, we seamlessly switch to the experimental Chrome's Built-in AI (window.ai). This provides instant results directly on the user's device, making the UI feel incredibly responsive and "intelligent" while also enhancing user privacy by keeping that data local.
- We Designed a User Experience Based on "Progressive Disclosure" to Manage Cognitive Load Our primary user is operating under extreme stress. The biggest UI/UX challenge was to present a vast amount of complex information without causing "decision paralysis." The Accomplishment: We designed the entire application flow as a Finite State Machine (FSM) that guides the user through a linear, controlled sequence of steps. How We Did It: We adhere strictly to the principle of "Progressive Disclosure." The user is only ever shown the single most critical piece of information for their current step. First, their role. Then, consent. Then, the map and their one safe route. Only then do we present the detailed checklist. This methodical approach breaks down a terrifying, chaotic event into a series of clear, manageable actions, building user confidence and ensuring they can use the tool effectively when it matters most. The transition from a personal "panic" view to a high-level "command" view is a direct result of this deliberate, state-managed design.
What's next for FIREWISER
The current application validates our core architecture. The next phase focuses on scaling this to a production-grade, globally deployable system:
Transition to Real-Time Cloud Infrastructure: We will replace simulation and structure client-side logic with a robust Google Cloud backend. This will involve high-throughput Pub/Sub data ingestion, a Dataflow pipeline for real-time anonymization (e.g., using S2 cells for privacy), and WebSockets for secure, high-frequency broadcast of tactical updates to the command view.
Evolving to Multi-Modal AI Reasoning:
Dynamic, Predictive Routing: A backend Gemini model will continuously ingest real-time traffic, weather, and hazard reports to calculate and dynamically push updated, optimal evacuation routes to individual users.
Live Video Analysis: We will integrate live drone footage into a multi-modal Gemini endpoint. The model will perform real-time object detection to automatically identify new fire perimeters and stranded individuals, adding them as a dynamic intelligence layer to the tactical map.
Implementing a Closed-Loop Communication System: The system will evolve to a two-way network. Commanders will use geofencing to send targeted push notifications to specific zones. Conversely, evacuees will submit reports with photos, and a multi-modal AI will vet these reports, automatically updating the map and re-routing users around confirmed hazards, creating a self-healing safety network.
Built With
- api
- css
- fsm
- gemini
- react
- spa
- typescript
Log in or sign up for Devpost to join the conversation.