Zero internet, zero infrastructure: an autonomous, peer-to-peer mesh network that transforms everyday devices into a decentralized lifeline by leveraging local LLMs to route and structure SOS payloads in network-dead zones.
Zero internet, zero infrastructure: an autonomous, peer-to-peer mesh network that transforms everyday devices into a decentralized lifeline by leveraging local LLMs to route and structure SOS payloads in network-dead zones.
During severe natural disasters—such as intense monsoon flooding, landslides, or earthquakes—centralized communication infrastructure is the first point of failure. Cell towers lose power, fiber-optic cables are severed, and surviving networks are immediately overwhelmed by panicked traffic.
In these "network-dead" zones, stranded individuals are unable to broadcast their status, and rescue organizations (NDRF, local authorities) are forced to operate blindly. The core vulnerability of modern crisis management is our absolute dependency on the internet. When the grid goes down, coordination stops.
zerogrid-sos entirely removes the need for centralized internet or specialized radio hardware. It turns standard consumer devices (Android phones, personal laptops) into an autonomous, self-healing emergency mesh network.
Using Wi-Fi Direct and Bluetooth Low Energy (BLE), devices dynamically connect to one another, passing encrypted SOS payloads hop-by-hop across the localized grid. However, a localized chatroom is chaotic during a disaster. To solve this, zerogrid-sos introduces the "Sentinel Agent"—a locally hosted Small Language Model (SLM) running on a base station laptop.
The Sentinel intercepts raw, panicked text messages, autonomously parses them for critical context (medical urgency, trapped status, location), and feeds structured, actionable data directly to an offline-first rescue dashboard.
100% Offline Multi-Hop Routing: Devices connect directly to each other via Android Wi-Fi P2P. If Device A cannot reach the Base Station, it routes its SOS through Device B seamlessly.
The AI "Sentinel" (Local LLM): Instead of relying on cloud APIs like OpenAI, the system runs a quantized LLM (like Llama-3-8B or Phi-3) locally via Ollama. It converts chaotic human input ("water rising fast grandma needs insulin") into structured JSON triage data.
Store-and-Forward Architecture: If a user is completely isolated, their SOS is cached in a local SQLite/Room database. The moment another mesh node walks into range, the payload is automatically pushed into the network.
Tactical Offline Dashboard: Rescue workers utilize a React-based Progressive Web App (PWA) equipped with locally cached maps (Leaflet.js) to view prioritized, AI-triaged distress pins in real-time.
The system is divided into three distinct, open-source pillars:
The Edge Node (Android/Java): The victim's smartphone. Features a high-contrast UI for broadcasting SOS text. It handles the complex P2P discovery and payload broadcasting without needing a SIM card or Wi-Fi router.
The Base Station (Python/FastAPI): A standard laptop running the Python backend. It listens on the mesh network, receives the raw text payloads, and acts as the bridge to the AI layer.
The Brain & Command Center (React + Ollama): The Python backend feeds the raw text to the local Ollama instance. The AI extracts the severity and intent, outputting structured data to the React frontend, which instantly drops a high-priority pin on the offline map.
Built entirely with FOSS tools, ensuring accessibility, privacy, and compliance.
Mobile/Networking: Java, Android Wi-Fi Direct API, Room Database.
Backend & API: Python, FastAPI, WebSockets.
Local AI Integration: Ollama, LangChain (for prompt structuring and JSON parsing).
Frontend & Mapping: React.js, Vite, Leaflet.js (Offline Base Maps).
No Proprietary APIs: This project explicitly avoids cloud-based AI (like GPT-4 or Groq) in favor of local, entirely open-source model inference via Ollama, ensuring it works when external networks are dead (Rule #2).
Meaningful Problem: Addresses the critical failure of communication during climate emergencies and natural disasters, prioritizing human life and safety (Rule #7).
Privacy-First: Because all data remains on the localized mesh and is processed by edge-based AI, sensitive location and medical data are never transmitted to corporate cloud servers.