In-browser emergency guidance: Nia retrieves protocol-style excerpts, Groq turns them and your description into clear steps. Use voice or text, find nearby hospitals, read responses aloud, and use follow-up chat—one HTML page, nothing to install.
- Retrieval + generation — Optional Nia search (package + web-style) feeds snippets into the prompt; Groq generates streaming protocol-style guidance.
- Voice — Speech-to-text (Web Speech API) and read-aloud (speech synthesis).
- Hospitals — Geolocation + OpenStreetMap (Overpass) + Photon, with links to Google Maps.
- Follow-up chat — Ask more about the same scenario after you get a protocol (requires Groq).
- History & settings — Stored locally in your browser (
localStorage).
-
Open
DisasterDocs.htmlin a browser, or serve the folder soindex.htmlredirects to the app:cd /path/to/SDX python3 -m http.server 8080Then visit
http://localhost:8080/. -
Open Settings and add your Groq API key (free tier at console.groq.com). Optional: Nia API key for protocol retrieval before the model runs.
Note: Geolocation and some APIs work best over HTTPS or http://localhost. Opening the file as file:// may block location or other features.
| Setting | Purpose |
|---|---|
| Groq API key | Required for main protocol generation and follow-up chat. |
| Groq model | Choose smaller (8B) or larger (70B) model in Settings. |
| Nia API key | Optional; enables Nia search before Groq. Without it, answers come from Groq only. |
| Language / voice speed / text size | Stored locally; adjust in Settings. |
Keys are saved in browser local storage only—treat them like passwords. Do not paste keys into tracked source files or commit them. The repo’s .gitignore ignores common env/secret patterns (.env*, credentials.json, *.pem, etc.); keep using Settings in the app for keys.
| File | Role |
|---|---|
DisasterDocs.html |
Full app (CSS + JS inline). |
index.html |
Redirects to DisasterDocs.html for simple local servers. |
Vanilla HTML/CSS/JS (no build step). External services: Groq (OpenAI-compatible chat API), Nia (apigcp.trynia.ai), Overpass, Photon, browser speech and geolocation APIs.
DisasterDoc is a software demo for education and preparedness. It is not a substitute for professional emergency services, medical care, or official incident instructions. Call your local emergency number when life or safety is at risk. Do not rely on AI output in place of trained responders.