AI-Powered Women's Safety Companion
SafeHer AI is a comprehensive safety application that uses artificial intelligence to detect harassment, provide emergency alerts, and keep women safe.
The solution is designed for women who face harassment, stalking, or feel unsafe in daily situations. Globally, about 1 in 3 women experience physical or sexual violence, and many lack instant access to help during emergencies. The system must be offline-capable, discreet, easy to use without technical knowledge, and able to send alerts within seconds. Success is achieved when a user can trigger an emergency alert with location in under 3 seconds and the AI detects over 70% of threatening messages.
SafeHer AI is an AI-powered safety companion that:
- π Harassment Detectiont - AI analyzes messages for toxic/threatening content using toxic-bert model
- π¨ Panic Button - One-tap emergency alerts with GPS location
- π Location Sharing: Automatic GPS location in alerts
- π± Automatic Protection - Shake/fall detection triggers automatic alerts
- π Safety Dashboard - Real-time safety statistics, threats and alert history
- π Sensor Detection: Support for accelerometer/fall detection
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β FRONTEND (React) β
β ββββββββββββ ββββββββββββ ββββββββββββ ββββββββββββ β
β βDashboard β β Scanner β β Sensors β β Panic β β
β ββββββ¬ββββββ ββββββ¬ββββββ ββββββ¬ββββββ ββββββ¬ββββββ β
βββββββββΌβββββββββββββΌβββββββββββββΌβββββββββββββΌβββββββββββ
β β β β
βΌ βΌ βΌ βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β BACKEND REST API (FastAPI) β
β /status /scan-message /panic β
βββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββ
β
βββββββββββββββββββΌββββββββββββββββββ
βΌ βΌ βΌ
ββββββββββββββββ ββββββββββββββββ ββββββββββββββββ
β AI Model β β Safety Agent β β Alert System β
β (toxic-bert) β β (Decision) β β(Twilio/Email)β
ββββββββββββββββ ββββββββββββββββ ββββββββββββββββ
| Layer | Technology | Why Chosen |
|---|---|---|
| Frontend | React 18, Axios, IS, HTML5, CSS3 | User interface, Component-based, sensor acces, large ecosystem |
| Styling | CSS3 | No dependencies, fast loading |
| Backend | FastAPI, Python, Uvicorn, Pydantic | Async, fast, auto-documentation, API endpoints |
| AI/ML | Hugging Face Transformers, PyTorch | State-of-the-art NLP models |
| Model | toxic-bert | Pre-trained for toxicity detection / Harassment detection |
| SMS | Twilio, SMTP | Reliable, global coverage, SMS and email notifications |
| Hosting | Vercel | Free tier, easy Serverless deployment |
SafeHER-AI/
βββ frontend/ # React frontend
β βββ src/
β β βββ App.js # Main component
β β βββ App.css # Styles
β β βββ config.js # API configuration
β β βββ PanicButton.js # Emergency button
β β βββ MessageScanner.js # AI text analyzer
β β βββ SensorDetection.js # Motion sensors
β β βββ StatusDashboard.js # Statistics
β βββ package.json
β
βββ backend/ # Python backend (local)
β βββ main.py # FastAPI server
β βββ model.py # AI harassment detection
β βββ goose_agent.py # Safety decision agent
β βββ alerts.py # SMS/Email system
β βββ requirements.txt
β
βββ api/ # Vercel serverless
β βββ index.py # Serverless API
β βββ requirements.txt
β
βββ docs/ # Documentation
β βββ DECISION_LOG.md # Technical decisions
β βββ RISK_LOG.md # Issues & resolutions
β βββ EVIDENCE_LOG.md # Sources & licenses
β
βββ .env.example # Environment template
βββ vercel.json # Deployment config
βββ LICENSE # MIT License
βββ README.md # This file
| Dashboard | Panic Button | Message Scanner | Sensor |
|---|---|---|---|
| π Stats |
π Message Analysis ![]() |
π¨ Emergency ![]() |
π± Automatic Protection ![]() |
- Python 3.9+
- Node.js 16+
- Git
# Clone the repo
git clone https://github.com/mmoneka11/SafeHER-AI.git
cd SafeHER-AI
# Copy environment template
cp .env.example .env
# Run setup script (Windows)
setup.bat
# OR manually:
# Backend
cd backend && pip install -r requirements.txt && uvicorn main:app --reload &
# Frontend
cd frontend && npm install && npm startThat's it! Open http://localhost:3000 π
Copy .env.example to .env and configure:
# Optional: For SMS alerts (Twilio)
TWILIO_ACCOUNT_SID=your_account_sid
TWILIO_AUTH_TOKEN=your_auth_token
TWILIO_FROM_NUMBER=+1234567890
EMERGENCY_CONTACT=+0987654321
# Optional: For Email alerts
SMTP_SERVER=smtp.gmail.com
SMTP_PORT=587
EMAIL_ADDRESS=your-email@gmail.com
EMAIL_PASSWORD=your-app-password
EMERGENCY_EMAIL=emergency@email.comNote: The app works without these - alerts are logged instead of sent.
| Endpoint | Method | Description |
|---|---|---|
/ |
GET | Health check |
/api/scan-message |
POST | Detect harassment |
/api/panic |
POST | Trigger emergency alert |
/api/status |
GET | Safety statistics |
/api/health |
GET | API health check |
/docs |
GET | Interactive API docs |
# Test API locally / Health Check
curl http://localhost:8000/api/health
# Test message scanning
curl -X POST http://localhost:8000/api/scan-message \
-H "Content-Type: application/json" \
-d '{"message": "Hello", "location": "40.7128,-74.0060"}'| SDG | Alignment |
|---|---|
| SDG 5: Gender Equality | Combats violence and harassment against women through technology-based safety solutions. |
| SDG 3: Good Health & Well-being | Supports womenβs mental and physical well-being through technology-based emergency protection. |
| SDG 11: Sustainable Cities & Communities | Promotes safer public spaces with technology-driven personal safety systems. |
- Sensor detection requires HTTPS (works on Vercel, not localhost)
- AI model uses keyword detection in serverless (ML model too large)
- Stats reset on Vercel cold start (no database yet)
- Add database for persistent storage
- Implement voice activation ("Hey SafeHer")
- Add trusted contacts management UI
- Create mobile app (React Native)
- Add multi-language support
If you're in immediate danger, contact local emergency services:
| Country | Number | Helpline |
|---|---|---|
| USA | 911 | National DV Hotline: 1-800-799-7233 |
| UK | 999 | Women's Aid: 0808-2000-247 |
| India | 100 | Women Helpline: 181 |
| EU | 112 | - |
| Name | Role | Contributions | GitHub |
|---|---|---|---|
| Moneka Meghwar | AI Developer | AI model integration, Backend API, Core features | @mmoneka11 |
| Kashmala Saddiqui | Security Specialist | Alert system, Sensor detection, Security review | @kashmalaasif |
| Umaima Rizwan | Documentation Lead | Documentation, UI/UX design, Testing | @umaim691 |
This project was built as part of the 75Her Challenge Hackathon, an initiative focused on developing innovative solutions that support women's empowerment, safety, and leadership through technology.
π Hackathon Page
https://75her-challenge.devpost.com/
SafeHer AI aims to provide women with:
- Instant emergency assistance
- AI-powered harassment detection
- Location-based alert systems
- Safer digital and physical environments
The project focuses on using technology for social good, helping build safer communities for women worldwide.
- Fork the repository
- Create feature branch:
git checkout -b feature/amazing-feature - Commit changes:
git commit -m 'Add amazing feature' - Push to branch:
git push origin feature/amazing-feature - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Twilio - SMS messaging API
- Hugging Face - AI model hosting
- Google Maps - Location services
- unitary/toxic-bert - Toxicity detection model (Apache 2.0)
- React - MIT License
- FastAPI - MIT License
- Axios - MIT License
- Transformers - Apache 2.0
- WHO Statistics on Violence Against Women
- UN Women Global Database
- Emoji icons (Unicode standard)
- Custom CSS (original)
If you find this project useful:
β Star the repository
π΄ Fork the project
π€ Contribute improvements
SafeHer AI - Because Your Safety Matters π‘οΈ
Built with β€οΈ by the IGOGs Team
for women's safety & empowermentβ¨


