Help when you need it. Works offline.
Lighthouse is an offline-first emergency assistant for anyone in a crisis — not just trained responders. Open the app, see where you are on a map, describe what's happening by voice or text, and get clear guidance on what to do next.
Under the hood it runs a local agent (on-device rules engine): it remembers incidents, geotags reports, routes SOS to the right teams, detects contradictions, and speaks responses aloud — without cloud AI.
Built for the Google DeepMind Bangalore Hackathon – Best Use of Gemma 4: Local-First Agents, and designed so anyone can use it in an emergency.
During disasters such as:
- Earthquakes
- Floods
- Landslides
- Cyclones
- Building collapses
- Forest fires
internet connectivity often disappears.
Cloud AI assistants stop working. Offline chatbots only answer questions — they do not:
- remember rescue operations
- coordinate multiple incidents
- recover from missing information
- keep mission state
- continuously plan
This is where Lighthouse comes in.
Lighthouse is a map-first emergency app with an autonomous on-device agent.
- Home (map) — your GPS, MapKit map, What to do guidance, quick reports, voice mic
- Agents — SOS to ambulance, police, fire, disaster, or child-protection teams by location + country
- Guide — full field console for power users and demos
- Activity — message history
- Settings — agent brain status, peer sync, reset
It runs the full agent loop locally:
Sense → Decide → Act → Verify → Recover
Offline: agent inference (rules), voice, SwiftData, SOS routing, incident memory.
Online (optional): MapKit map tiles / reverse geocoding when the network is available.
The default tab is Home — built around where you are.
- MapKit with your location and priority-colored incident pins
- What to do card — latest agent guidance and next plan steps
- Quick report chips — "There's a fire near me", "People trapped", etc.
- Voice dock — mic, hands-free, photo + Vision OCR at the bottom of the home screen
The Agents tab routes SOS to specialized teams based on your input, GPS, and country:
| Agent | Examples |
|---|---|
| Ambulance | injured, chest pain, unconscious |
| Police | crime, attack, robbery |
| Fire & Rescue | fire, smoke, trapped |
| Disaster Response | flood, earthquake, storm |
| Child Protection | missing child, children in danger |
- Auto SOS — classifies your description and dispatches
- Per-agent SOS buttons with available / assigned unit counts
- Country-aware numbers — India (112/100/101/102/1098), US/CA (911), UK (999), AU (000), else 112
- Dispatches local units (simulated on-device) and logs geotagged incidents
- Tap the number link to dial — the app does not place calls automatically
- Tap the mic on Home or Agents and describe what's happening
- Lighthouse responds by voice with what to do next
- Uses on-device
SFSpeechRecognizer+AVSpeechSynthesizer; the rules engine parses the report
A 5-step flow ending with Get started — uses your GPS, no mission setup required.
- Welcome
- How it helps (agent loop)
- Permissions (mic required, location recommended) + voice test
- Optional AI / brain status
- Ready — quick start, or advanced custom mission + presets
Presets: Earthquake Chennai, Flood Kerala, Building Collapse Mumbai.
Power-user / demo view with:
- Agent loop bar (Sense → Decide → Act → Verify → Recover)
- Mission stats grid
- Agent briefing and plan steps
- Incident cards and recent timeline
- Play demo (scripted Chennai earthquake scenario)
Missions, incidents, victims, resources, timeline, chat, and memory stored in SwiftData — survives app restarts and airplane mode.
Incidents scored by severity, demographics, accessibility, and age. Priority recalculates when reports change (critical / high / medium / low).
Asks for clarification instead of guessing — e.g. "There may be another child" triggers confirm questions (age, conscious?, trapped?, injured?).
Detects conflicting victim counts and updates the mission after confirmation.
Query by voice or text:
- "How many critical incidents?"
- "Where am I?"
- "Show timeline."
- "Nearest incident"
Settings → Export / Import mission JSON — offline mission snapshot schema v1 for sharing between devices.
Built for Apple’s latest system look:
- iOS 18+
TabAPI, large titles, and NavigationStack - Liquid Glass–inspired materials (
.ultraThinMaterial, specular strokes, capsule voice dock) - System blue and priority colors for incident severity
- When built with Xcode 26 / iOS 26, standard controls pick up Liquid Glass automatically
| Layer | Technology |
|---|---|
| Platform | Swift 5, iOS 18+ |
| UI | SwiftUI (Liquid Glass–ready) |
| Maps | MapKit |
| Architecture | @Observable ViewModel → Repository → SwiftData |
| Database | SwiftData |
| Location | Core Location + CLGeocoder (country-aware SOS) |
| Voice | SFSpeechRecognizer + AVSpeechSynthesizer |
| OCR | Vision (VNRecognizeTextRequest) |
| Agent | On-device rules engine (parser, planner, SOS, recovery) |
| Project | XcodeGen |
lighthouse-ios/
├── Lighthouse/
│ ├── Agent/ # Orchestrator, parser, SOS, planner, demo
│ ├── Data/ # MissionRepository, JSON peer sync
│ ├── Models/ # SwiftData models
│ ├── Services/ # Location, voice, field capture / OCR
│ ├── Theme/ # Design system (glass cards, colors)
│ ├── ViewModels/ # MissionViewModel
│ ├── Views/
│ │ ├── Onboarding/
│ │ ├── Home/ # Map-first home + voice dock
│ │ ├── Agents/ # SOS screen
│ │ ├── Guide/ # Field console
│ │ ├── Activity/ # Chat log
│ │ ├── Settings/
│ │ ├── Components/
│ │ ├── MainTabView.swift
│ │ └── RootView.swift
│ ├── Assets.xcassets/
│ └── LighthouseApp.swift
├── project.yml # XcodeGen definition
├── Lighthouse.xcodeproj/
└── README.md
- Xcode 16+ (Xcode 26 recommended for Liquid Glass)
- iOS 18.0+ Simulator or device
- XcodeGen (
brew install xcodegen) - Physical device recommended for microphone / speech recognition
# Generate the Xcode project (after editing project.yml)
xcodegen generate
# Open in Xcode
open Lighthouse.xcodeprojSelect an iPhone simulator or device, then press Run (⌘R).
On first launch the app requests:
| Permission | Why |
|---|---|
| Microphone | Voice reports |
| Speech Recognition | On-device STT |
| Location When In Use | Geotag incidents + country SOS numbers |
| Camera / Photos | Field photo capture + OCR |
- Welcome — tagline and feature overview
- How it helps — Sense → Decide → Act → Verify → Recover
- Permissions — enable mic (required), location (recommended); optional voice test
- Optional AI — brain / variant status
- Ready — Get started creates an emergency mission at your GPS
Advanced: custom mission name / disaster type / location, or pick a regional preset.
After Reset in Settings (clears SwiftData + captures/), onboarding appears again until a new active mission exists.
- Lighthouse runs an offline rules engine — parse, plan, SOS, contradictions, and queries all work without the network.
- The bottom status bar shows the active brain mode.
Scripted walkthrough:
- Critical collapse report (children trapped)
- Unconscious victim update
- Contradiction (victim count)
- Blocked road
- Rescue logged
- Critical-incident query