Backend API and IoT integration system for earthquake rescue coordination. Developed as part of a TUBITAK-supported research project to improve post-disaster communication, team coordination, and rescue operations through technology.
- Rescue Reports: GPS-based distress reporting with severity classification
- Team Management: Real-time tracking and assignment of rescue teams
- IoT Integration: MQTT-based sensor data collection (vibration, gas, sound)
- Auto-coordination: Nearest-team assignment with priority scoring
- Notifications: Priority-based alert routing for rescue operations
- Geospatial Queries: Find nearby reports using Haversine distance
┌──────────────┐ ┌──────────────┐ ┌──────────────┐
│ Mobile App │────▶│ FastAPI │────▶│ SQLite DB │
│ (Reports) │ │ Server │ │ │
└──────────────┘ └──────┬───────┘ └──────────────┘
│
┌──────────────┐ ┌──────▼───────┐ ┌──────────────┐
│ IoT Sensors │────▶│ MQTT Handler │────▶│ Coordinator │
│ (ESP32/RPi) │ │ (Mosquitto) │ │ (Auto-assign)│
└──────────────┘ └──────────────┘ └──────────────┘
│
┌──────▼───────┐
│ Notification │
│ Service │
└──────────────┘
| Method | Endpoint | Description |
|---|---|---|
| POST | /rescue/report |
Submit rescue report |
| GET | /rescue/reports |
List reports with filters |
| PUT | /rescue/reports/{id}/status |
Update rescue status |
| GET | /rescue/reports/nearby |
Find nearby reports |
| GET | /rescue/stats |
Dashboard statistics |
| POST | /teams |
Register rescue team |
| GET | /teams |
List active teams |
| PUT | /teams/{id}/location |
Update team GPS |
| POST | /teams/{id}/assign |
Assign team to report |
| POST | /devices/register |
Register IoT sensor |
| POST | /devices/{id}/data |
Submit sensor data |
git clone https://github.com/theYsnS/earthquake-rescue-api.git
cd earthquake-rescue-api
pip install -r requirements.txtdocker-compose up -d# Start API server
python main.py
# API documentation
# http://localhost:8000/docsMIT License - see LICENSE for details.