Skip to content
pawansai-codePublic

About

No description, website, or topics provided.

Resources

Stars

2 stars

Watchers

2 watching

Forks

Latest commit

 

History

90 Commits

Folders and files

Repository files navigation

🚨 Road-SOS

Your Digital Lifeline in Critical Emergencies
A unified mobile ecosystem that bridges the gap between emergency onset and response dispatch.

React Native Expo Django PostgreSQL

📖 Table of Contents

🎯 About the Project

In critical situations (road accidents, sudden medical crises), every second counts. Traditional methods of calling emergency services lack instant location sharing, automated contact notification, and quick access to critical medical history.

Road-SOS is a comprehensive React Native application designed to solve this. With a single tap, it triggers an SOS event, starts live location tracking, dispatches formatted SMS to pre-saved emergency contacts, and logs the event history.

✨ Key Features

  • Single-Tap SOS Trigger: Immediately alert relevant authorities (Police, Fire, Medical, disaster..) with real-time GPS coordinates.
  • Automated SMS Dispatch: Auto-generates and sends text messages to up to 5 stored emergency contacts with live tracking links.
  • Digital Medical Profile: Stores crucial data (Blood Group, Allergies, Medical Notes) for instant access by first responders.
  • Live Location Tracking: Continuous GPS polling to ensure responders are heading to your exact, real-time location.
  • Event Logging & History: Maintains an audit trail of past emergencies via our Django backend.

🛠 Tech Stack

Frontend (Mobile App)

  • Framework: React Native & Expo
  • State Management: Redux Toolkit (userSlice, sosSlice, contactsSlice)
  • Styling: NativeWind (Tailwind CSS)
  • Native APIs: Expo Location, Expo SMS, Expo Image Picker

Backend (REST API)

  • Framework: Python & Django REST Framework
  • Database: PostgreSQL (psycopg2-binary)
  • Authentication: Firebase Auth (Mocked MVP via X-Firebase-Uid)

🏗 Architecture

Road-SOS employs a decoupled Client-Server Architecture:

  1. Client: The Expo app manages the UI and interfaces with device hardware (GPS, SMS).
  2. Server: The Django REST API processes incoming SOS triggers, stores contact lists, and manages user medical profiles.
  3. Communication: Data is exchanged via secure JSON payloads over HTTP/REST.

🚀 Getting Started

Prerequisites

  • Node.js & npm/yarn
  • Python 3.9+ & pip
  • PostgreSQL
  • Expo CLI (npm install -g eas-cli)

Frontend Setup

cd frontend
# Install dependencies
npm install

# Start the Expo development server
npx expo start

Backend Setup

cd backend
# Create virtual environment
python -m venv venv
source venv/bin/activate # or venv\Scripts\activate on Windows

# Install Python requirements
pip install -r requirements.txt

# Run migrations and start server
python manage.py migrate
python manage.py runserver 0.0.0.0:8000

Note: Ensure your frontend API base URL matches your local IPv4 address (e.g., http://192.168.x.x:8000/api).

🔌 API Reference

Method Endpoint Description
GET/PUT /api/users/profile/ Fetch/Update user's medical profile
POST /api/sos/trigger/ Trigger active SOS & send coordinates
GET/POST /api/services/sos-event/ Log or fetch historical SOS events
GET/POST /api/contacts/ Manage emergency contacts (max 5)

For testing purposes, requests expect a header of X-Firebase-Uid: dummy_user_123.

ouput screens

  1. Homesscreen
image
  1. Profile screen
image
  1. Map screen

    image

🤝 Contributors

This project is built and maintained by our incredible team:


Developed with ❤️ for a safer tomorrow.

About

No description, website, or topics provided.

Resources

Stars

2 stars

Watchers

2 watching

Forks

Releases

Packages

Contributors

Languages