SynapseAid is an interactive, browser-based emergency-response simulation prototype implementing deterministic multi-agent coordination (Gale-Shapley matching), client-side hybrid retrieval (dense vector + BM25 ranking), and optional LLM integration for disaster scenarios.
🌐 Live Demo: https://synapse-aid.vercel.app
To ensure complete interview defensibility and clarity regarding what is built from scratch vs. external/simulated:
| System Layer | Technical Implementation Details | Implementation Scope |
|---|---|---|
| Gale-Shapley Matcher | Stable-matching algorithmic solver prioritizing role affinities, distance matrices, certifications, and responder score ratings | Implemented from scratch (TypeScript) |
| Dense + Sparse RAG Engine | Client-side 24-D synthetic semantic vector projection + BM25 keyword tokenizer with rank fusion and XAI explainability chips | Implemented from scratch (TypeScript) |
| Deterministic Audit Ledger | Cryptographic SHA-256 block receipt generator creating immutable verification trails for disaster manifests | Implemented from scratch (TypeScript) |
| GIS Tactical Map & Vectors | Interactive relief map, dynamic incident bounding boxes, and transit vector rendering | Implemented from scratch (Canvas / DOM) |
| Speech & NLU Processing | Real-time speech-to-text distress capture and speech synthesis via Web Speech API (with optional Google Gemini API fallback) | Browser API & Optional External LLM |
| Emergency Telemetry & Depletion | Synthetic multi-agent response timings (~97ms latency models) and regional warehouse depletion rate simulations | Deterministic Simulation Layer |
Note
Zero Mandatory Cloud Dependencies: The system executes 100% deterministically in the client browser out-of-the-box, with zero external database or paid API requirements.
📡 Civilian Distress Signal (Voice SOS / NLP Report)
│
▼
🤖 NLP Entity Triage & Severity Classification (Critical / High / Medium / Low)
│
▼
📚 Hybrid Vector RAG Retrieval (24-D Dense Cosine + BM25 Sparse Overlap)
│
▼
🧠 Multi-Agent Coordination Mesh (Simulated)
├── 📦 Logistics & Route Router (Depot buffer allocation & transit vectors)
├── 👥 Gale-Shapley Matcher (Role affinity, proximity, mission rating)
└── 🛡️ Audit Ledger (SHA-256 manifest block receipt hashing)
│
▼
🚨 Operations GIS Tactical Map & Mission Manifest PDF Export
- Web Speech API: Real-time Speech-to-Text (STT) distress capture and Text-to-Speech (TTS) audio dispatch playback (English, Hindi, Spanish).
- Simulation Scenarios: One-click test scenarios for Riverside Flood Inundation, Building Collapse, and Shelter Evacuation.
- Collapsible Layout: Left coordination desk can be collapsed (
[◀ Hide Assistant]) to expand the GIS studio to full screen.
- Bounded Layout: Clean separation between the interactive map canvas and the dedicated incident operations panel below.
- Map Elements:
- District / sector boundaries (
Sector Alpha Industrial,Sector Bravo Riverbank,Sector Gamma Highland,Sector Delta Residential). - Translucent flood inundation zone polygon styling.
- Safe Shelters (🟢 with live capacity tracking).
- Tactical Supply Depots (🔵 with VHF radio channels).
- Field Responders (🟣 with deployment tracking).
- Pulsing deployment route vectors and interactive map legend.
- District / sector boundaries (
- Dense + Sparse Rank Fusion: Combines 24-D semantic projection with BM25 lexical overlap.
- Explainable AI (XAI): "Why this match?" keyword tags (
✓ Flash flood,✓ Water purification) highlight retrieval rationale. - Technical Breakdown: Displays real-time Semantic Cosine %, Keyword BM25 %, and Final Hybrid Score %.
- Protocol Inspector: In-memory document chunker and full-text viewer for NDRF, FEMA, and WHO crisis manuals.
- Stable Matchmaker Algorithm: Matches field responders based on role priority, distance matrices, certifications, and past mission ratings.
- Dynamic AI Match Scores: Real-time progress bars (
⭐ 98% Match,⭐ 94% Match) calculated against active incident requirements.
- Hourly Supply Burn Curve: Area chart with
1H | 6H | 24Htime-range selector. - Sub-Agent Latency Waterfall: Visualizes simulated pipeline execution latency across agents.
- KPI Metrics: Resource burn velocity (
431 units/hr), priority incident ratio, and warehouse buffer allocations.
- Generates SHA-256 block receipts and exports printable, high-resolution mission PDF reports using
jspdfandhtml2canvas.
- Frontend: React 18, TypeScript, Vite
- Styling: Tailwind CSS v4, Custom CSS Design System
- Data Visualization: Recharts, Canvas Confetti
- Icons: Lucide React
- Document Generation: jsPDF, html2canvas, DOMPurify
- AI & NLP: Client-side synthetic vector projection, BM25 tokenizer, optional Google Gemini API
- Node.js: v18.0.0 or higher
- npm: v9.0.0 or higher
# Clone the repository
git clone https://github.com/lakshiaharan/synapse-aid.git
cd synapse-aid
# Install dependencies
npm install
# (Optional) Configure Gemini API Key
cp .env.example .env
# Add your Gemini key in .env if desired: VITE_GEMINI_API_KEY=your_key_here
# Start local development server
npm run devVisit http://localhost:5173/ in your browser.
# Build production bundle
npm run build
# Preview production build locally
npm run previewThis project is configured for one-click deployment on Vercel:
- Fork or push this repository to your GitHub account.
- Import the project in Vercel.
- Build Settings:
- Framework Preset:
Vite - Build Command:
npm run build - Output Directory:
dist
- Framework Preset:
- (Optional) Add
VITE_GEMINI_API_KEYunder Environment Variables. - Click Deploy.
MIT License © 2026 Lakshi Haran. See LICENSE for details.