The Emergency Distress Signal Web App is a lightweight, easy-to-use platform designed to help users send emergency alerts instantly during critical situations.
When a user clicks the emergency button, the app captures key details (such as time, user location if available, or other incident info) and immediately stores them securely in a Firebase Firestore database. This helps security personnel like Highway Patrols, Police Outposts, and Check Gates to monitor and act on emergency events quickly.
This app is particularly useful for:
- Highway Security Monitoring
- Accident Reporting
- Criminal Activity Reporting
- critical case
- Emergency Situations like harassment, theft, or medical crises
Its simple architecture ensures fast performance
The system architecture is composed of:
- Flutter Mobile App (Frontend) — A fast, modern, and user-friendly mobile application for sending distress signals.
- Node.js Backend Server — Handles API requests, processes incoming emergency data, and manages communication with the database.
- Firebase Firestore Database — A scalable, NoSQL cloud database used to store emergency alert records securely and retrieve them in real-time.
- Reporting road accidents
- Alerting police about criminal or suspicious activity
- Medical emergencies
- Public safety situations (e.g., harassment, theft, fights)
The primary goal of the system is to enable users to request help instantly and allow authorities to respond efficiently, thereby improving public safety and emergency handling.
Follow these steps to set up the project locally:
- Open a terminal and navigate to the backend folder:
cd Backend
- open a terminal and navigate to the Frontend folder:
-
Launch the Flutter App:
- Open the app on your mobile device or emulator.
-
Press the "Emergency" Button:
- When you encounter an accident, unlawful activity, or need immediate help, tap the Emergency button.
-
Send Distress Signal:
- The Flutter app sends an API request to the Node.js backend server.
-
Backend Processing:
- The Node.js server receives the distress signal.
- The server stores emergency information in Firebase Firestore.
-
Authorities Notification:
- Authorized personnel (e.g., Highway Patrol, Police Checkposts) can monitor emergency cases through the stored data and take appropriate action.
✅ The whole process happens in real-time to ensure rapid response during emergencies.
- Firebase Authentication used for secure user login/signup.
- Supports:
- Email and Password login
- (Phone OTP / Google login can be added later)
- User identity is verified before sending emergency reports.
- Firebase Admin SDK is used on backend for token verification.
- Endpoint:
/api/emergency/send - Method:
POST - Description: Receives emergency distress signals from the Flutter frontend and stores them in Firebase Firestore.
| Field | Type | Description |
|---|---|---|
userId |
String |
Unique ID of the user sending the emergency. |
latitude |
Number |
Latitude coordinate of the user location. |
longitude |
Number |
Longitude coordinate of the user location. |
emergencyType |
String |
Type of emergency (e.g., Accident, Crime, Medical). |
timestamp |
String |
Timestamp when the emergency is reported. |
details |
String |
(Optional) Additional information about the situation. |
database |
String |
(Optional) stores information about the situation and the users data. |