Skip to content

Latest commit

ย 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿšจ AI Emergency Companion

An AI-powered mobile application that provides real-time emergency assistance using Sarvam AI, live location, weather, nearby emergency services, and contextual first-aid guidance.

๐Ÿ“ฑ Overview

AI Emergency Companion helps users respond quickly during emergencies by analyzing natural language descriptions, providing AI-generated first-aid instructions, finding nearby emergency services, and enabling SOS actions.

Example:

"My friend has burned his hand with hot oil."

The AI understands the situation, determines its severity, provides first-aid guidance, and recommends nearby hospitals and emergency contacts.


โœจ Features

  • ๐Ÿค– AI-powered emergency analysis using Sarvam AI
  • ๐Ÿฉน Step-by-step first-aid instructions
  • โš ๏ธ Emergency severity assessment
  • ๐Ÿ“ Live location detection
  • ๐Ÿฅ Nearby Hospitals
  • ๐Ÿ’Š Nearby Pharmacies
  • ๐Ÿ‘ฎ Nearby Police Stations
  • ๐Ÿš’ Nearby Fire Stations
  • ๐Ÿ—บ Google Maps navigation
  • ๐ŸŒค Real-time Weather
  • ๐ŸŒซ Air Quality Index (AQI)
  • ๐ŸŒ Active Disaster Monitoring
  • ๐Ÿ’ฌ Chat-based AI interface
  • ๐Ÿ“– Offline emergency knowledge
  • ๐Ÿšจ Long-press SOS button
  • ๐Ÿ“ Share live location with emergency contacts

๐Ÿ—๏ธ System Architecture

                           โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                           โ”‚        Mobile App            โ”‚
                           โ”‚   React Native + Expo        โ”‚
                           โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                                          โ”‚
                         โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                         โ”‚                                 โ”‚
                    Online Mode                     Offline Mode
                         โ”‚                                 โ”‚
                         โ–ผ                                 โ–ผ
               Node.js + Express API              SQLite Database
                         โ”‚                                 โ”‚
        โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”               โ”‚
        โ”‚                โ”‚                โ”‚               โ”‚
        โ–ผ                โ–ผ                โ–ผ               โ–ผ
                      RAG Search
   Redis Cache      Sarvam AI API    External APIs   Local Knowledge Base
        โ”‚                โ”‚                โ”‚               โ”‚
        โ”‚                โ”‚        โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”      โ”‚
        โ”‚                โ”‚        โ”‚       โ”‚        โ”‚      โ”‚
        โ–ผ                โ–ผ        โ–ผ       โ–ผ        โ–ผ      โ–ผ
 Conversation      AI Emergency  Weather AQI  Nearby   RAG Search
    Cache           Analysis      API    API Services  (SQLite)
                                           โ”‚
                                           โ–ผ
                                 AI Response Generator
                                           โ”‚
                                           โ–ผ
                              Stream Response to Mobile

๐Ÿ›  Tech Stack

Mobile

  • React Native
  • Expo
  • TypeScript
  • Expo Router
  • NativeWind (Tailwind CSS)
  • React Native Reanimated

Backend

  • Node.js
  • Express.js
  • TypeScript
  • Redis

AI

  • Sarvam AI

APIs

  • OpenStreetMap
  • Open-Meteo
  • NASA EONET
  • OpenWeather
  • Air Quality API

๐Ÿ“‚ Project Structure

AI-Emergency-Companion
โ”‚
โ”œโ”€โ”€ backend
โ”‚   โ”œโ”€โ”€ src
โ”‚   โ”œโ”€โ”€ knowledge
โ”‚   โ”œโ”€โ”€ scripts
โ”‚   โ”œโ”€โ”€ package.json
โ”‚   โ””โ”€โ”€ tsconfig.json
โ”‚
โ”œโ”€โ”€ mobile
โ”‚   โ”œโ”€โ”€ app
โ”‚   โ”œโ”€โ”€ components
โ”‚   โ”œโ”€โ”€ services
โ”‚   โ”œโ”€โ”€ hooks
โ”‚   โ”œโ”€โ”€ database
โ”‚   โ”œโ”€โ”€ offline
โ”‚   โ”œโ”€โ”€ assets
โ”‚   โ””โ”€โ”€ package.json
โ”‚
โ””โ”€โ”€ README.md

โš™๏ธ Installation

Clone Repository

git clone https://github.com/sonucodes40/AI-Emergency-Companion.git

cd AI-Emergency-Companion

Backend

cd backend

npm install

Create .env

OPENAI_API_KEY=YOUR_KEY
SARVAM_API_KEY=YOUR_KEY
OPENWEATHER_API_KEY=YOUR_KEY
GOOGLE_API_KEY=YOUR_KEY

Start backend

npm run dev

Mobile

cd mobile

npm install

npx expo start

๐Ÿš€ How It Works

  1. User describes an emergency.
  2. Mobile app sends the message to the backend.
  3. Backend gathers:
    • Location
    • Weather
    • AQI
    • Nearby emergency services
    • Disaster information
  4. Sarvam AI analyzes the emergency.
  5. AI returns:
    • Severity
    • First-aid guidance
    • Safety precautions
    • Nearby emergency services
  6. User can navigate to nearby services or trigger SOS.

๐Ÿ“ท Screenshots

Screenshot_1783965139 Screenshot_1783965297 Screenshot_1783965314 Screenshot_1783965318 Screenshot 2026-07-13 232735 Screenshot 2026-07-13 232748 Screenshot 2026-07-13 232821 Screenshot 2026-07-13 232848 Screenshot 2026-07-13 232901


# ๐Ÿ”ฎ Future Scope

- Voice-based emergency assistant
- Offline AI support
- Wearable device integration
- Emergency contact notifications
- Medical record integration
- Multi-language support

---

# ๐Ÿ‘จโ€๐Ÿ’ป Team

**Team Name:** OUTLIERS

### Sonu Kumar

Backend โ€ข AI Integration โ€ข React Native

---

# ๐Ÿ“„ License

This project is licensed under the MIT License.

---

# ๐Ÿ™ Acknowledgements

- Sarvam AI
- Expo
- React Native
- OpenStreetMap
- NASA EONET
- Open-Meteo
- Redis

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages