PathSafe is a full-stack web application designed to enhance personal safety by providing real-time geographical awareness. It leverages situational data to generate dynamic heatmaps of potential risk areas and offers active navigation routes that help users avoid high-risk zones. Additionally, it features a comprehensive SOS alert system that integrates directly with trusted emergency contacts.
- Dynamic Risk Heatmaps: Visualizes areas based on reported historical data and real-time updates using an interactive Leaflet map.
- Safe Route Navigation: Provides active routing that consciously avoids high-severity zones to ensure safer travel.
- Emergency SOS System: Instantly triggers an SMS alert to all saved emergency contacts via Twilio integration, including precise GPS coordinates.
- Emergency Contacts Management: A fully integrated user profile system allowing the addition and management of trusted emergency contacts.
- Secure Authentication: User accounts and authorization secured by Firebase Authentication.
- Frontend: React, Vite, Tailwind CSS, Leaflet.js
- Backend: Node.js, Express
- Database: PostgreSQL (for emergency contacts)
- External Services: Firebase Auth, Twilio Programmable SMS
- Node.js (v16+)
- PostgreSQL installed and running locally
- Firebase Project with Authentication enabled
- Twilio Account with configured Phone Number and API Keys
Create a .env file in the root directory and configure the following environment variables:
PORT=3001
DB_USER=postgres
DB_PASSWORD=your_password
DB_HOST=localhost
DB_PORT=5432
DB_NAME=postgres
TWILIO_ACCOUNT_SID=your_twilio_sid
TWILIO_AUTH_TOKEN=your_twilio_auth_token
TWILIO_PHONE_NUMBER=your_twilio_phone
FIREBASE_API_KEY=your_firebase_key
FIREBASE_AUTH_DOMAIN=your_firebase_domain
FIREBASE_PROJECT_ID=your_firebase_project_id-
Install Dependencies Navigate to both the
frontendandbackenddirectories and install dependencies.cd frontend npm install cd ../backend npm install
-
Start Backend Server
cd backend node server.js -
Start Frontend Client
cd frontend npm run dev
This project is licensed under the MIT License.