尚未偵測到更新。GitHub 發布版本後會顯示在這裡。
個人 GitHub 帳號下公開儲存庫的擁有者可以登入並驗證所有權,自行管理介紹,無需管理員核准。
登入並產生驗證檔案,在 30 分鐘內將其提交至此儲存庫的預設分支。其他分支或分叉儲存庫中的檔案無效。然後在下方檢查檔案,即可無需管理員核准直接管理專案。請保留檔案以維持管理權限。
如需登入,將前往登入頁面。登入後請回到此處,再次點擊所選的驗證按鈕。
在專案資料夾中執行 /nomorevibe verify,即可驗證所有權並自行管理介紹。
一分鐘完成驗證正在載入完整 README。 以下為已儲存的摘錄。
🛡️ KAVACH · कवच Real-Time Crisis Communication & Hazard-Aware Evacuation for Foreign Tourists When the cell towers collapse and the internet dies, vital safety information must still arrive, be cryptographically verifiable, and be understandable in the tourist's native language. -brightgreen.svg?style=for-the-badge) Pilot Region: Mamallapuram (Mahabalipuram) & the Chennai Coastal Corridor, Tamil Nadu, India檢視完整 README ↗
When the cell towers collapse and the internet dies, vital safety information must still arrive, be cryptographically verifiable, and be understandable in the tourist's native language.
Pilot Region: Mamallapuram (Mahabalipuram) & the Chennai Coastal Corridor, Tamil Nadu, India
| 🌐 Resource | 🔗 URL | 📝 Note |
|---|---|---|
| Live App | https://kavach-drab.vercel.app/ | No-install PWA with full offline caching |
| Authority Interface | https://kavach-drab.vercel.app/#/authority | Sign-in required; alerts issued here are Drills |
| Demo Video | Google Drive Demo Folder | 2–5 min end-to-end walkthrough video |
During sudden extreme weather crises (e.g., flash floods, storm surges, or tropical cyclones along the Bay of Bengal):
Kavach (कवच — "Armour / Shield") is a zero-install, offline-first Progressive Web App (PWA) that opens in seconds via physical QR codes placed in hotel lobbies, airport immigration desks, and tourist taxis.
It functions continuously across all 5 levels of connectivity (from high-speed 5G down to zero-data SMS relay) with zero loss of cryptographic trust.
┌────────────────────────────────────────────────────────────────────────┐
│ KAVACH 5 CORE INNOVATIONS │
├────────────────────────────────────┬───────────────────────────────────┤
│ 1. Signed Alert Packets │ Compact ECDSA P-256 WebCrypto │
│ 2. Universal Alert Codecs │ Pre-translated 8-language engine │
│ 3. 5-Rung Connectivity Ladder │ Dynamic adaptive UI degradation │
│ 4. Grounded Offline Assistant │ Deterministic MiniSearch KB (No AI│
│ │ hallucinations for safety facts) │
│ 5. Zero-Tile Vector Map & Routing │ 15.5k node graph avoiding floods │
└────────────────────────────────────┴───────────────────────────────────┘
Every official emergency warning is signed using ECDSA P-256 with SHA-256 and packed into a dot-separated string strictly under 140 characters.
authorityKeys.json).Packets carry only semantic codes (Hazard: FL, Level: 3, Zones: Z1-Z2, Expiry: 1p8s). The user's device decodes the string and immediately generates the complete warning in the tourist's native language (English, Tamil, Hindi, French, German, Arabic, Chinese, Japanese) using pre-installed templates stored on the device.
The app actively senses connection quality and displays a prominent status chip: $$\text{Live (5G/Wi-Fi)} \longrightarrow \text{Degraded (3G)} \longrightarrow \text{Cellular-Only} \longrightarrow \text{Offline} \longrightarrow \text{Relay (SMS/QR)}$$ The interface adapts features gracefully: disabling heavy video/tiles on cellular, using on-device search in offline mode, and accepting manual SMS/QR handovers in relay mode.
Kavach does not download gigabytes of map image tiles. It bundles an indexed 785 KB road graph (15,599 nodes, 18,292 edges).
journey
title Sarah's Evacuation Journey During Cyclone Nivar
section 1. Arrival & Discovery
Scans QR code at hotel reception: 5: Sarah
Instant PWA loads in 1.2s (No App Store): 5: Sarah
Selects German & fills local Medical ID: 5: Sarah
848 KB safety pack cached to IndexedDB: 5: Sarah
section 2. Crisis & Network Loss
Storm knocks out 4G cell towers: 3: Sarah
Kavach switches status to "Offline": 5: Kavach
Receives 120-character SMS alert: 5: Sarah
App verifies ECDSA signature offline: 5: Kavach
Reads alert in German: 5: Sarah
section 3. Hazard-Aware Evacuation
Opens zero-tile vector map: 5: Sarah
App routes to shelter avoiding flood: 5: Kavach
Shows Tamil phrase card + TTS to driver: 5: Sarah
section 4. Safe Arrival & SOS
Reaches cyclone shelter safely: 5: Sarah
One-tap "I'm Safe" check-in: 5: Sarah
Outbox queues & syncs to control room: 5: Kavach
Arrival & Zero-Friction Setup:
The Cyclone Hits (Network Dead):
Live $\rightarrow$ Offline.Kavach Alert: /#/a/KV1.k1.CY.3.Z1-Z2.1p4q.1p8s.1.D.MEQCIC...
k1, and flashes a green "ECDSA Verified" badge."Offizielle Zyklon-Warnung (Stufe 3) für Mamallapuram Strandbereich. Begeben Sie sich sofort in eine befestigte Notunterkunft."
Hazard-Aware Evacuation (No Map Tiles):
/#/map). With zero map tiles, Kavach draws the vector road graph, shelter markers (shields), and red-hatched flood zones.Overcoming the Language Barrier:
/#/phrases) and selects "I need shelter from the cyclone".flowchart TD
subgraph Authority ["🏛️ Disaster Management Control Room (/authority)"]
AUTH_UI[Authority Console] -->|P-256 Private Key| SIGNER[ECDSA WebCrypto Signer]
SIGNER -->|Compact String < 140 chars| PACKET["KV1.k1.FL.3.Z1-Z2.1p4q.1p8s.1.D.SIG"]
PACKET --> SMS_GATEWAY[2G SMS Gateway]
PACKET --> POSTER_GEN[Printable QR Posters]
end
subgraph Transit ["📡 Unreliable Delivery Channels"]
SMS_GATEWAY -.-> SMS_LINK[SMS Text Link: /#/a/PACKET]
POSTER_GEN -.-> PHYSICAL_QR[Physical QR at Hotels/Taxis]
end
subgraph Client ["📱 Tourist Device PWA (100% Offline)"]
SMS_LINK --> ROUTER[HashRouter /#/a/:packet]
PHYSICAL_QR --> SCANNER[Camera / QR Scan]
ROUTER --> VERIFY_ENGINE[Offline WebCrypto Verifier]
SCANNER --> VERIFY_ENGINE
PUB_KEY[(Bundled Public Key k1)] --> VERIFY_ENGINE
VERIFY_ENGINE -->|Signature Valid| PACK_TEMPLATES[(8-Language Templates)]
PACK_TEMPLATES --> RENDER_ALERT[Localized Action Card]
RENDER_ALERT --> STORE[IndexedDB / Dexie]
STORE --> MAP_ENGINE[Zero-Tile Vector Map]
ROADS_GRAPH[(Offline Road Graph 15.5k Nodes)] --> MAP_ENGINE
MAP_ENGINE --> DIJKSTRA[Offline Dijkstra Router Worker]
DIJKSTRA --> SAFE_ROUTE[Safe Evacuation Path]
end
KV1)The payload is composed of 9 dot-separated base36 tokens: $$\text{KV1} ,., \text{kid} ,., \text{hazard} ,., \text{level} ,., \text{zones} ,., \text{issuedMin} ,., \text{expiresMin} ,., \text{seq} ,., \text{mode} ,., \text{signature}$$
KV1 . k1 . FL . 3 . Z1-Z2 . 1p4q . 1p8s . 1 . D . MEQCIC6n...
│ │ │ │ │ │ │ │ │ └─ 64-byte raw IEEE P1363 signature (base64url)
│ │ │ │ │ │ │ │ └─── Mode: 'D' (Drill) or 'L' (Live Broadcast)
│ │ │ │ │ │ │ └─────── Sequence number (Base36 integer)
│ │ │ │ │ │ └───────────── Expiry minute (Base36 Unix minute)
│ │ │ │ │ └──────────────────── Issuance minute (Base36 Unix minute)
│ │ │ │ └─────────────────────────── Target zones hyphen-separated
│ │ │ └───────────────────────────────── Severity Level (0=All-Clear, 1=Advisory, 2=Watch, 3=Warning, 4=Emergency)
│ │ └───────────────────────────────────── Hazard Code (FL, CY, HT, WN, LS, AC)
│ └────────────────────────────────────────── Public Key Identifier in registry (k1)
└──────────────────────────────────────────────── Protocol Version (KV1)
crypto.subtle.verify to immediately fail with signature mismatch.alertState.ts):
0 or Hazard AC (All-Clear) explicitly clears active warnings across specified zones.mode: 'D') are isolated from Live alerts (mode: 'L').Traditional mapping libraries fail during disasters because downloading raster/vector map tiles requires gigabytes of bandwidth. Kavach solves this using a pure vector topology:
┌──────────────────────────────────────────────────────────┐
│ 5. User Position Dot + Accuracy Ring (GPS) │
├──────────────────────────────────────────────────────────┤
│ 4. Dynamic Safe Route (White casing + Blue line) │
├──────────────────────────────────────────────────────────┤
│ 3. Emergency POIs (Shelters: 🛡️, Hospitals: ➕, Police: 🔷)│
├──────────────────────────────────────────────────────────┤
│ 2. Flagged Hazard Zones (Red fill + Diagonal hatching) │
├──────────────────────────────────────────────────────────┤
│ 1. Offline Road Network Graph (15,599 Nodes, 18,292 Edges│
├──────────────────────────────────────────────────────────┤
│ 0. Base Flat Ground Canvas (#E4EAEF) │
└──────────────────────────────────────────────────────────┘
router.worker.ts).Emergency safety tools must never invent phone numbers or give dangerous medical advice. Kavach enforces strict determinism:
User Crisis Query
│
┌──────────────┴──────────────┐
▼ ▼
[Online AI Active] [Network Down / Flaky]
│ │
Supabase Edge Function Proxy On-Device MiniSearch BM25
(System Safety Context) │
│ Matches Curated Offline KB
Gemini 2.5 Flash (First Aid / Decision Trees)
│ │
└──────────────┬──────────────┘
▼
┌────────────────────────────────────┐
│ Verified Grounded Response Card │
│ • Severity Pill (Level 0-4) │
│ • Numbered Step-by-Step Actions │
│ • Source Chip: [Pack Verified] │
│ • TTS Read-Aloud Audio Button │
└────────────────────────────────────┘
The Authority Console (/#/authority) gives disaster management officials a desktop-first dashboard to issue and manage alerts.
┌─────────────────────────────────────────────────────────────────────────────────────────────┐
│ KAVACH AUTHORITY CONSOLE [ DRILL MODE · 演習 ] Signed in: Control Room (TNDMA) [Sign Out] │
├──────────────────────────┬──────────────────────────────────────────────────────────────────┤
│ 🚩 Create Alert │ STEP 3 OF 4: REVIEW & TRANSLATION PREVIEW │
│ 📡 Active Alerts (2) │ ─────────────────────────────────────────────────────────────── │
│ 📜 History Ledger │ Hazard: FLOOD (FL) · Level: LEVEL 3 (WARNING) · Zones: Z1, Z2│
│ 📢 Community Reports (3) │ Preview in 8 Languages: [EN] [TA] [HI] [FR] [DE] [AR] [ZH] [JA] │
│ 👥 Zone Check-ins (154) │ "Offizielle Hochwasser-Warnung für Zone(n) Strandbereich..." │
│ │ Payload: KV1.k1.FL.3.Z1-Z2.[issued].[expires].[seq].D (121 chars)│
│ │ [◀ Back: Zones] [▶ Sign & Broadcast Alert] │
└──────────────────────────┴──────────────────────────────────────────────────────────────────┘
| Rung | Connectivity State | Visual Chip | Active Features |
|---|---|---|---|
| 🟢 Live | Fast Wi-Fi / 5G | Live | Real-time weather ingestion, online LLM assistant, live outbox synchronization. |
| 🟡 Degraded | Flaky 3G / High Latency | Degraded | Aggressive timeouts, cached risk snapshot display, offline search fallback. |
| 🟠 Cellular | Metered tourist data / Roaming | Cellular-only | Pauses video & map tiles; enables pure text, compressed vector roads, and QR codes. |
| ⚪ Offline | Power failure / Airplane mode | Offline | 100% operation from preloaded 848 KB content pack, offline road routing, Medical ID. |
| 🟣 Relay | Zero data (SMS/Voice only) | Relay | Standalone packet verification from SMS links or paper QR scans; show-a-local TTS. |
| Route | View Component | Key Capabilities | Offline Resilience |
|---|---|---|---|
/#/ | HomePage.tsx | Status chip, risk meter (Level 0–4), quick actions, safety check-in. | IndexedDB cached snapshot |
/#/alerts | AlertsPage.tsx | Verified crisis alerts inbox, age tickers, translated steps. | 100% local database |
/#/a/:packet | PacketPage.tsx | Standalone packet decoder, ECDSA verification, template render. | WebCrypto offline |
/#/map | MapPage.tsx | Zero-tile vector map, POI sheet, Dijkstra router, full-screen Compass. | 15.5k node bundled graph |
/#/assist | AssistPage.tsx | AI crisis assistant, severity pills, TTS read-aloud. | MiniSearch BM25 KB |
/#/sos / /#/aid | AidPage.tsx | 22px high-contrast GPS display, 112/108 speed dial, emergency SMS generator. | Native device APIs |
/#/phrases | PhrasesPage.tsx | Show-a-local cards with large Tamil script and Text-to-Speech audio. | Preloaded pack + Web Speech |
/#/me | MePage.tsx | On-device Medical ID, lock-screen emergency QR generator, WebGPU AI toggle. | Local-only IndexedDB |
/#/scan | ScanPage.tsx | Camera QR scanner and manual packet text decoder. | Pure client-side |
/#/authority | AuthorityPage.tsx | Official alert issuance wizard, active alert management, QR posters. | Desktop-first lazy chunk |
The content pack located in public/pack/ (~848 KB total) contains all data required for offline survival:
| File | Size | Records / Details | Source |
|---|---|---|---|
places.json | 17 KB | 63 verified emergency shelters, clinics, hospitals, police, pharmacies. | OpenStreetMap + TNDMA |
roads.json | 785 KB | 15,599 nodes, 18,292 edges (topologically indexed graph for Mamallapuram). | OpenStreetMap Overpass |
zones.geojson | 7 KB | 9 alert zones (Z1 to Z9) with flood vulnerability attributes. | TNDMA Hazard Atlas |
contacts.json | 2 KB | Emergency hotlines (112, 108, 1070, 100, 101, 1363) and embassies. | National Disaster Registry |
templates/*.json | 72 KB | Pre-translated emergency templates across 8 languages for 6 hazard codes. | Certified Translations |
kb/*.json | 80 KB | 17 first-aid documents, CPR guide, cyclone checklist, search index. | Red Cross / NDMA Guidelines |
phrases/*.json | 56 KB | 40 emergency communication phrases with Tamil script & transliteration. | Linguist Curated |
Follow this 3-minute walkthrough to verify all core features:
Step 1: Authority Issuance ──▶ Step 2: Tourist Verification ──▶ Step 3: Offline Map & Evacuation
(https://kavach-drab.vercel.app/#/authority) (https://kavach-drab.vercel.app/#/alerts) (https://kavach-drab.vercel.app/#/map)
Step 1: Open the Authority Console
Demo Authority (Judge Access · Drill-Only).FL) and Level 3 (Warning). Click Next.Sign & Broadcast Alert (ECDSA P-256).Print QR poster to preview the evacuation poster layout.Step 2: Verify in the Tourist App
Step 3: Test Zero-Tile Map & Evacuation Routing
Start route — see the client-side Dijkstra engine compute a safe route navigating around the flooded zones!Compass to open the full-screen directional needle.Step 4: Test Show-a-Local Phrasebook & SOS
Read aloud to hear spoken Tamil.# Clone the repository
git clone https://github.com/karthiktotad/kavach.git
cd kavach
# Install dependencies
npm install
# Start local dev server
npm run dev
# App available at http://localhost:5173
# Run all 41 test files (369 unit & integration tests)
npm test
# Run TypeScript strict type-checking
npm run typecheck
# Run ESLint validation
npm run lint
# Build production bundle with Service Worker
npm run build
DRILL · 演習 in the UI and inside cryptographic payloads.DISCLOSURES.md.Built with pride for Hackathon Excellence · Free Tier & 100% Offline Resilient
Safe Haven & "I'm Safe" Check-In:
/#/sos) to see her exact coordinates and taps "I'm Safe · Tell my contacts".