Inspiration

During catastrophic events — flash floods, earthquakes, and severe storms — the first 72 hours (known as the Zero Hour) are the most critical for human survival. Yet, this is precisely when the modern software stack fails completely:

  • Cell towers lose power or are physically swept away.
  • Backhaul fiber lines snap and local ISP nodes go dark.
  • Cloud-dependent emergency apps and 911 dispatch lines fail completely.

Victims are left stranded with smartphones capable of billions of FLOPS, yet rendered useless because they cannot reach a remote server thousands of miles away.

We were inspired by a singular, urgent question:
Why should life-saving emergency AI require an active internet connection?

We built EDGE RESCUE to decentralize emergency disaster response. Our vision is an autonomous AI response engine that operates entirely on the edge — collecting localized SOS signals through off-grid radio/BLE mesh, triaging medical distress locally, and dispatching rescue teams with mathematical precision, with or without the internet.


What it does

EDGE RESCUE is a multi-tier emergency coordination ecosystem designed for zero-connectivity environments:

  1. Victim SOS Emergency Broadcast (Mobile / PWA):

    • Operates completely offline. Trapped victims log structured distress reports: emergency category (medical, trapped, flood, fire), vital signs, triage checklists, and GPS coordinates.
    • Compresses the report into compact binary packets transmitted over Bluetooth Low Energy (BLE GATT) and local edge protocols.
  2. Autonomous Edge Triage Engine:

    • Evaluates incoming distress packets in real-time.
    • Two-Tier AI Architecture: Leverages Gemma 4 26B (gemma-4-26b-a4b-it) via Google AI Studio when an internet uplink exists. If connectivity drops, the system seamlessly transitions to an offline rule-based clinical ontology with zero downtime or service interruption.
    • Extracts multilingual victim intent, verifies victim count, identifies hazards (e.g., rising water, collapsed structures), and assigns urgency scores.
  3. Tactical Command Supervisor & Field Responder Portal:

    • Command Supervisor: Real-time geospatial incident command map visualizing triage priorities, density hotspots, and team operational status.
    • Field Responder: Mission routing view for dispatched units showing victim vitals, dynamic hazard updates, and mission completion workflows.

How we built it

EDGE RESCUE was architected from the ground up for extreme resilience across three synchronized tiers:

  • Edge Backend Engine: Built with FastAPI (Python 3.10) using asynchronous pipelines (asyncio, SQLAlchemy 2.0). Designed with an autonomous dual-engine database layer: if cloud PostgreSQL is unreachable, the engine automatically engages a local embedded SQLite engine (sqlite+aiosqlite) without restart.
  • AI & Language Models: Integrated Google Gemma 4 26B (gemma-4-26b-a4b-it) for deep multimodal reasoning and multilingual distress synthesis, paired with a deterministic medical taxonomy for 100% offline edge execution.
  • Algorithmic Priority Scoring: Implemented multi-factor composite priority ranking in Python:
    • Urgency Time-Decay: Distress urgency increases as waiting time elapses: $$U(t) = 1.0 + \alpha \cdot \left(1 - e^{-\lambda \cdot \Delta t}\right)$$
    • Composite Matching Score: Dispatches the optimal responder unit based on role match, Haversine geodesic distance, battery level, and clinical skill coverage: $$S_{\text{composite}} = w_{\text{role}} \cdot M_{\text{role}} + w_{\text{dist}} \cdot \left(1 - \frac{D}{D_{\max}}\right) + w_{\text{batt}} \cdot \left(\frac{B}{100}\right) + w_{\text{onto}} \cdot \Omega_{\text{skills}}$$
  • Mesh & Telemetry Relay: Developed a custom BLE GATT relay daemon (drone/ble_relay.py) with manufacturer identifier 0x5A48 for drone and ground relay communication.
  • Frontend Web Application: Built with React 18, Vite, and Leaflet for geospatial mapping. Styled with dark-mode glassmorphism and real-time WebSocket state synchronization.

Challenges we ran into

  1. The "True Offline" Constraint: Modern web and AI frameworks assume constant cloud connectivity. Ensuring every single API route, database query, and WebSocket subscriber gracefully degraded to edge fallback required rewriting our data layer to support dual PostgreSQL/SQLite adapters and offline heartbeats.
  2. Event Loop Discrepancies on Edge OSs: Dealing with asynchronous event loops across different edge operating environments (Windows Proactor vs. Unix Selector loops in asyncio and psycopg) required low-level event loop policy adaptation.
  3. BLE MTU Size Restrictions: Standard BLE advertising packets are limited to 31 bytes. We had to design an efficient binary telemetry structure capable of packing victim ID, lat/long coordinates, severity bits, and hazard flags into tight GATT characteristic envelopes.

Accomplishments that we're proud of

  • Zero-Dependency Resilience: The backend and frontend can boot up completely disconnected from the internet, seed local responders, triage incoming packets, and execute mission assignments autonomously.
  • Sub-Second Edge Triage: The local deterministic scoring pipeline evaluates incidents in under 15 milliseconds, allowing immediate automated response even before manual operators can read a report.
  • Production-Grade Test Suite: Wrote and passed 26 rigorous integration and algorithmic tests covering ontology classification, geospatial calculations, and edge fallback states.
  • Production Deployment: Successfully deployed to Vercel (https://edge-rescue.vercel.app/) and packaged with 1-click cloud blueprints for Render and Google Cloud Run.

What we learned

  • Edge AI is a humanitarian necessity: When critical infrastructure collapses, centralized cloud models are unreachable. Designing hybrid systems that leverage massive cloud LLMs when online, yet fail gracefully to efficient edge heuristics when offline, is essential for disaster tech.
  • Hardware-software co-design: Optimizing payload structures for low-bandwidth mesh radios (BLE/LoRa) taught us that every byte saved translates directly to increased transmission range and longer battery life in disaster zones.

What's next for EdgeRescue

  • Physical Drone Companion Testing: Deploying the BLE relay service onto Raspberry Pi companion computers mounted on autonomous search-and-rescue UAVs running PX4 / ArduPilot.
  • Long-Range LoRa Mesh: Expanding radio transport beyond Bluetooth to 915 MHz / 868 MHz LoRa radios (e.g. Meshtastic integration) for 15+ kilometer range between isolated valleys.
  • Acoustic Distress Detection: Integrating on-device edge acoustic models to classify cries for help, tapping sounds under rubble, and water rush directly from smartphone microphones.

Built With

Share this project:

Updates

Submission history