š” Inspiration
During major natural disasters (hurricanes, flash floods, earthquakes), cellular networks collapse and emergency dispatchers are overwhelmed with fragmented, panic-driven citizen messages. Field volunteers communicating over open mesh or radio airwaves risk leaking sensitive personal information (PII).
I built Needflare to solve both bottlenecks: an autonomous, privacy-first disaster intelligence platform that strips PII at the edge, ingests field reports asynchronously into Google Cloud, dispatches humanitarian aid with Sphere-compliant calculations, and synthesizes universal visual survival broadcasts for panic-stricken victims.
ā” What it does
Needflare operates as an autonomous Taskmaster agent across three coordinated tiers:
- Edge PII Stripping & Offline Triage: Volunteers submit incident reports. An edge model (Google Gemma 4) cleanses phone numbers, names, and precise coordinates in real-time, classifying urgency and category even before leaving the device. In network blackouts, reports buffer in an offline store-and-forward queue.
- Asynchronous Event Ingestion: As soon as connectivity (satellite, LoRa mesh, or restored 4G) appears, reports burst-sync into Google Cloud Pub/Sub and persist in Cloud Firestore (
needflare-db). - Autonomous Taskmaster Dispatcher: Powered by Gemini 3.7 Flash via GenKit, the agent asynchronously evaluates incoming reports, updates tactical sector threat levels, computes humanitarian payloads (water liters, medical trauma kits based on Sphere standards), and auto-dispatches supply convoy tasks without human dispatch bottlenecks.
- Universal Visual Guidance: For victims facing language barriers or extreme shock, the agent triggers Google Veo 3.1 Fast to generate zero-text, high-contrast 8-second visual survival video guides (e.g. water purification, trauma wound care) viewable in an interactive tactical gallery.
š ļø How I built it
- Autonomous Reasoning & Tools: Google GenKit v1.41 (
@genkit-ai/google-genai) orchestrating Gemini 3.7 Flash with specialized tools:triageSectorTool,createLogisticsTaskTool, andtriggerVeoVisualGuideTool. - Edge Intelligence: Google Gemma 4 (
models/gemma-4-26b-a4b-it) hosted API with client-side regex heuristics fallback for instant local PII anonymization. - Visual Video Engine: Google Veo 3.1 Fast (
models/veo-3.1-fast-generate-preview) long-running prediction pipeline polling and streaming MP4 assets to Firestore (veo_guides). - Cloud Infrastructure:
- Google Cloud Run: Serverless containerized agent backend auto-scaling from zero.
- Google Cloud Pub/Sub: Asynchronous event ingestion topic (
needflare-reports). - Google Cloud Firestore: Enterprise Native database (
needflare-db) for reports, tasks, and visual guides.
- Frontend & Field Terminal: React 19, TypeScript, Vite, and interactive Leaflet tactical grid mapping.
- UI/UX Prototyping: Google AI Studio was utilized during early design to scaffold the structural layout and wireframe positioning of dashboard components.
š§ Challenges I ran into
- Handling long-running asynchronous video generation with Google Veo while keeping the user interface responsive required building an asynchronous polling worker that caches progress states and seamlessly updates Firestore upon video completion.
- Ensuring zero PII leakage under chaotic network conditions required designing a robust Local-First architecture that seamlessly transitions between online Gemma 4 API calls and on-device regex scrubbing during total connectivity loss.
š Accomplishments that I'm proud of
- Achieving end-to-end integration across three cutting-edge Google AI models: Gemini 3.7 Flash (autonomous reasoning), Gemma 4 (edge privacy), and Google Veo 3.1 (universal survival video synthesis).
- Deploying a truly production-grade Google Cloud stack (Cloud Run, Pub/Sub, Firestore, Secret Manager) that runs autonomously in the background without human dispatch delays.
- A fully responsive tactical dashboard featuring interactive maps, live video previews, and real-time AI rationale telemetry.
š What I learned
- How to harness GenKit flows and tools to build autonomous background agents that go far beyond standard conversational chatbots.
- How to orchestrate Veo 3.1 Fast's asynchronous predictLongRunning operations inside a serverless Cloud Run environment.
š® What's next for Needflare
- Integrating dedicated Google Cloud Storage (GCS) multi-region buckets with Cloud CDN for global edge caching of survival video broadcasts.
- Connecting physical LoRa SX1262 transceiver hardware via the Web Serial API for true off-grid disaster mesh operations.
- Adding multilingual spoken companion tracks using Gemini 3.7 Voice generation.
Built With
- express.js
- gemini-3.7-flash
- gemma-4
- genkit
- google-ai-studio
- google-cloud-firestore
- google-cloud-pubsub
- google-cloud-run
- google-secret-manager
- google-veo
- leaflet.js
- node.js
- react-19
- typescript
- vite

Log in or sign up for Devpost to join the conversation.