Skip to content

Tech-Super-Kings/FirstHand-EmergencyResponse

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

14 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

FirstHand πŸš‘

AI-Assisted Emergency Response Platform

React FastAPI License

🚨 Problem Statement

In critical emergencies, delays in:

  • bystander coordination
  • triage assessment
  • hospital discovery
  • emergency communication

can cost lives.

Victims often suffer during the "golden hour" because emergency response systems are fragmented and uncoordinated.

FirstHand helps coordinate emergency response instantly using real-time workflows and AI-assisted decision support.

πŸ’‘ Solution

FirstHand is an AI-assisted emergency response coordination platform built for rapid accident response, triage, hospital routing, and emergency handoff in real time.

The platform enables:

  • Real-time bystander coordination
  • Guided emergency triage
  • Intelligent hospital discovery
  • Structured emergency handoff generation
  • Emergency workflow simulation

Features

Accident Simulation

  • Simulated emergency trigger system
  • Real-time workflow activation

πŸ‘₯ Real-time Bystander Coordination

  • Crowd coordination system
  • Role assignment:
    • First Aid
    • Medical Lead
    • Crowd Control

AI-Assisted Triage Flow

  • Guided emergency assessment
  • Severity classification:
    • Critical
    • Serious
    • Stable

πŸ₯ Smart Hospital Routing

  • Nearby hospital recommendation
  • Distance-based routing
  • Drive-time estimation
  • Capability filtering:
    • ICU
    • Trauma Care
    • Surgery
    • Blood Availability

πŸ“„ Emergency Handoff Notes

  • Structured emergency briefing
  • Victim condition summary
  • GPS location support
  • Bystander role tracking

πŸ“‘ Live Backend APIs

  • FastAPI-powered backend
  • Swagger/OpenAPI documentation
  • WebSocket-based live updates

Modern Responsive UI

  • Dark-themed emergency dashboard
  • Responsive mobile-friendly design
  • Real-time workflow visualization

Demo Flow

  1. Simulate emergency incident
  2. Nearby bystanders join coordination mesh
  3. AI-assisted triage evaluates victim
  4. Severity level is generated
  5. Nearby hospitals are recommended
  6. Emergency handoff note is generated
  7. Hospital receives structured briefing

πŸ“Έ Demo Screenshots

🚨 Triage Flow

Triage Flow

⚠️ Severity Result

Severity Result

πŸ‘₯ Bystander Coordination

Bystander Mesh

πŸ₯ Hospital Finder

Hospital Finder

πŸ“„ Emergency Handoff

Handoff Note

πŸ“‘ Swagger API Documentation

Swagger Docs

πŸ›‘οΈ Good Samaritan Protection

Good Samaritan

System Architecture

User / Bystander
        ↓
React Frontend (Vite)
        ↓
FastAPI Backend
        ↓
Triage Engine
        ↓
Hospital Recommendation System
        ↓
Emergency Handoff Generator
        ↓
Hospital Communication Flow

Tech Stack

Frontend

  • React
  • Vite
  • CSS3
  • Leaflet Maps

Backend

  • FastAPI
  • Python
  • SQLite
  • WebSockets

APIs & Services

  • Swagger/OpenAPI
  • REST APIs
  • Live WebSocket Updates

πŸ₯ Hospital Routing

The platform dynamically routes incidents to nearby hospitals based on:

  • distance
  • severity
  • trauma capability
  • ICU availability
  • surgery support

Includes IITM Institute Hospital integration for Chennai-based routing simulation.

πŸ“‘ API Endpoints

Method Endpoint Description
POST /api/trigger Trigger emergency
POST /api/bystander/commit Commit bystander role
POST /api/triage Emergency triage
GET /api/hospitals Hospital discovery
POST /api/handoff Generate handoff note
POST /api/sms Emergency SMS
POST /api/simulate Run simulation

Local Setup

Backend

cd backend
pip install -r requirements.txt
py -3 -m uvicorn main:app --reload --port 8000

Frontend

cd frontend
npm install
npm run dev

🌐 Local URLs

Service URL
Frontend http://127.0.0.1:5173
Backend API http://127.0.0.1:8000
Swagger Docs http://127.0.0.1:8000/docs

πŸ“‚ Project Structure

FirstHand-EmergencyResponse/
β”‚
β”œβ”€β”€ backend/
β”‚   β”œβ”€β”€ main.py
β”‚   β”œβ”€β”€ db.py
β”‚   β”œβ”€β”€ hospitals.py
β”‚   β”œβ”€β”€ sms.py
β”‚   β”œβ”€β”€ triage.py
β”‚   └── requirements.txt
β”‚
β”œβ”€β”€ frontend/
β”‚   β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ public/
β”‚   └── package.json
β”‚
β”œβ”€β”€ screenshots/
β”‚
β”œβ”€β”€ .gitignore
β”œβ”€β”€ LICENSE
└── README.md

Impact

FirstHand is designed to reduce emergency response delays during the critical golden hour after accidents.

By improving coordination between bystanders, hospitals, and emergency responders, the platform aims to save lives through faster and smarter emergency workflows.

πŸš€ Future Scope

  • Real ambulance integration
  • Live GPS tracking
  • AI voice-assisted triage
  • Government emergency integration
  • Real-time hospital bed availability
  • Multi-language emergency support
  • Offline disaster response mode
  • Mobile app deployment

Key Highlights

  • Modern dark-themed responsive UI
  • Real-time emergency coordination
  • Hospital capability filtering
  • WebSocket-based live updates
  • IIT Madras hospital integration
  • Modular FastAPI backend
  • Clean React frontend architecture
  • Simulation-driven emergency workflow

πŸ‘¨β€πŸ’» Team

Tech Super Kings

πŸ“œ License

MIT License

About

FirstHand is an AI-assisted emergency response platform that coordinates bystanders, triage, hospital discovery, and emergency handoff in real time.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors