Skip to content

koustub1412/SafeSpace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

8 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🚨 SafeSpace – Women Safety & Emergency Alert System

A MERN-Stack Emergency Response Platform with Real-Time SOS Alerts


πŸ“Œ Overview

SafeSpace is a full-stack safety application designed to help users send instant emergency alerts (SOS) with live location, email notifications, and emergency contact management. Built using the MERN Stack, it ensures fast response, secure authentication, and seamless UI/UX.


πŸš€ Features

πŸ” Authentication

  • User Registration with email
  • Secure Login with JWT
  • Protected Routes

πŸ“‡ Emergency Contacts

  • Add, View, and Delete contacts
  • Each contact includes Name, Phone, Email
  • Stored securely in MongoDB

🚨 SOS Alerts

  • Centre emergency button

  • On tap:

    • User's GPS location is captured
    • Email alert is sent to all saved emergency contacts
    • Timestamp is logged locally in the UI

πŸ—Ί Live Location Map

  • Google Maps view
  • Route navigation
  • Satellite/Map modes
  • Real-time location tracking

πŸ› οΈ Tech Stack

Frontend

  • React
  • Axios
  • Google Maps API
  • CSS / Inline UI Styling

Backend

  • Node.js
  • Express.js
  • MongoDB
  • Mongoose
  • Nodemailer (for email SOS alerts)
  • JWT Authentication

πŸ“ Project Structure

SafeSpace/
β”œβ”€β”€ backend/
β”‚   β”œβ”€β”€ routes/
β”‚   β”œβ”€β”€ models/
β”‚   β”œβ”€β”€ config/
β”‚   β”œβ”€β”€ server.js
β”‚   └── .env      ❌ DO NOT COMMIT
β”‚
└── frontend/
    β”œβ”€β”€ src/
    β”œβ”€β”€ components/
    └── .env      ❌ DO NOT COMMIT

Your screenshot section is perfect β€” only one small improvement is needed:

πŸ‘‰ Right now, the description text appears on the SAME LINE as the image in GitHub. To fix that, you must add a blank line after each image tag.

Here is your entire corrected block, perfectly formatted for GitHub README.md:


πŸ–ΌοΈ Screenshots

1️⃣ Register Screen

image

This screen allows new users to create an account by entering their name, email, and password. The UI follows a glassmorphism card design for a clean and modern onboarding experience.


2️⃣ Login Screen

image

Users can securely log in using their registered email and password. The interface includes a gradient login button and a link to navigate to the registration page.


3️⃣ Dashboard

image

After login, the dashboard provides quick access to the main features β€” Home, Contacts, SOS, and Map. Each option is displayed as a large interactive tile for easy navigation.


4️⃣ Emergency Contacts Screen

image

Users can add new emergency contacts including Name, Phone Number, and Email. Saved contacts are displayed in a list format with an option to delete them if needed.


5️⃣ SOS Alert Screen

image

This interface contains a central SOS button that sends an emergency email alert along with the user's live location. A timestamp log is shown under the button displaying past SOS triggers.


6️⃣ Live Map Screen

image

The map screen uses Google Maps to display the user’s current location and allows route navigation. The top search bar helps users locate destinations, and real-time movement is supported.


βš™οΈ Installation & Setup

1️⃣ Clone the repo

git clone https://github.com/your-username/SafeSpace.git

2️⃣ Backend Setup

cd backend
npm install

Create .env

MONGO_URI=your_mongodb_connection
JWT_SECRET=your_secret
EMAIL_USER=your_email
EMAIL_PASS=your_email_password_or_app_password

Start backend

npm run dev

3️⃣ Frontend Setup

cd frontend
npm install

Create .env

REACT_APP_API_URL=http://localhost:5000/api
REACT_APP_GOOGLE_MAPS_KEY=your_key

Start frontend

npm start

πŸ“¬ SOS Email Alert Format

When SOS is triggered, the emergency contacts receive an email:

Subject: 🚨 SOS Alert – Immediate Help Needed!

Message:
User triggered an SOS alert.

Live Location:
https://www.google.com/maps?q=LAT,LNG

Please reach out immediately.

πŸ” Security Notes

βœ” .env files must NEVER be pushed to GitHub βœ” Use Gmail App Passwords for Nodemailer βœ” Ensure MongoDB IP whitelist is configured


🀝 Contributions

Pull requests are welcome!


πŸ“„ License

MIT License


About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors