A comprehensive personal safety application with panic button functionality, real-time location tracking, voice transcription, AI-powered analysis, and a fake call feature for emergency situations.
- Real-time location tracking with map visualization
- Live voice recording with automatic transcription
- AI-powered threat analysis using Google Gemini
- Automatic 911 alert for critical situations (urgency > 7/10)
- Save and export emergency encounter data
- Simulate realistic phone calls for safety
- Multi-language support (12 languages)
- Text-to-speech powered by Eleven Labs
- Customizable preferred language per user account
- Full-screen call interface for authenticity
- Secure authentication with JWT
- Save home and work/school locations
- Set preferred language for fake calls
- Persistent user settings
- Interactive map with OpenStreetMap
- Distance calculations between saved locations
- Real-time GPS tracking
- Location context for AI analysis
- Node.js 18+
- Python 3.8+
- npm or yarn
- Install dependencies:
npm install- Set up backend environment:
cd backend
cp .env.example .envEdit backend/.env and add your API keys:
GEMINI_API_KEY=your_gemini_api_key
ELEVENLABS_API_KEY=your_eleven_labs_api_key
JWT_SECRET=your_jwt_secret- Install Python dependencies:
cd backend
python -m venv venv
# On Windows:
venv\Scripts\activate
# On macOS/Linux:
source venv/bin/activate
pip install -r requirements.txtRun both frontend and backend:
npm run dev:allOr run them separately:
Frontend only:
npm run devOpens at http://localhost:5173
Backend only:
npm run dev:backendRuns at http://localhost:5000
The fake call feature helps users create the appearance of being on an important phone call, which can be useful for:
- Walking alone at night
- Uncomfortable social situations
- Any scenario where appearing occupied provides safety
-
Set Your Language (Profile page):
- Choose from 12 supported languages
- Language preference is saved to your account
-
Start a Call (Fake Call page):
- Click "Start Call" to begin
- Realistic call interface appears
- AI-generated voice conversation plays in your selected language
- Timer shows call duration
-
End the Call:
- Click "End Call" to stop
- Returns you to the home screen
- English
- Spanish (EspaΓ±ol)
- French (FranΓ§ais)
- German (Deutsch)
- Italian (Italiano)
- Portuguese (PortuguΓͺs)
- Chinese (δΈζ)
- Japanese (ζ₯ζ¬θͺ)
- Korean (νκ΅μ΄)
- Arabic (Ψ§ΩΨΉΨ±Ψ¨ΩΨ©)
- Hindi (ΰ€Ήΰ€Ώΰ€¨ΰ₯ΰ€¦ΰ₯)
- Russian (Π ΡΡΡΠΊΠΈΠΉ)
Get your key from: https://makersuite.google.com/app/apikey
- Used for analyzing recorded conversations
- Provides threat assessment and recommended actions
Get your key from: https://elevenlabs.io/
- Powers text-to-speech for fake calls
- Supports multilingual voice generation
- Free tier available for testing
- React 18
- Vite
- React Router
- Leaflet (maps)
- Web Speech API (transcription)
- Express.js
- SQLite3
- JWT authentication
- bcrypt for password hashing
- Multer for file uploads
- Google Gemini (AI analysis)
- Eleven Labs (text-to-speech)
- OpenStreetMap (geocoding & maps)
CREATE TABLE users (
id INTEGER PRIMARY KEY,
email TEXT UNIQUE NOT NULL,
password_hash TEXT NOT NULL,
home_location TEXT,
work_location TEXT,
preferred_language TEXT DEFAULT 'en',
created_at TEXT NOT NULL,
updated_at TEXT NOT NULL
);POST /api/auth/signup- Create new accountPOST /api/auth/login- LoginGET /api/auth/me- Get current user
PUT /api/profile/locations- Update saved locationsPUT /api/profile/language- Update preferred language
POST /api/fake-call/generate- Generate call audio (requires auth)
POST /api/analyze-transcript- Analyze conversation transcript
hacklytics/
βββ src/
β βββ components/ # React components
β βββ pages/ # Page components
β βββ context/ # React context (Auth)
β βββ App.jsx # Main app component
βββ backend/
β βββ server.js # Express server
β βββ db.js # Database functions
β βββ python/ # Instagram integration scripts
β βββ conversations/ # Stored conversations
βββ package.json
To add support for a new language in fake calls:
- Update ProfilePage.jsx - Add option to language selector
- Update FakeCallPage.jsx - Add language name mapping
- Update server.js - Add conversation script for the language
- Never commit
.envfiles with real API keys - Use HTTPS in production
- Keep JWT_SECRET secure and random
- Consider rate limiting for API endpoints
- Instagram integration stores credentials temporarily
- Real 911 integration (location-based)
- Emergency contact notifications
- Video call simulation option
- More language support
- Custom conversation scripts
- Offline mode with cached audio
- Apple Watch / Android Wear integration
- Share location with trusted contacts
For detailed setup instructions, see SETUP.md
For Instagram integration issues:
- GitHub: https://github.com/subzeroid/instagrapi
- Note: May require session management for 2FA accounts
This project was created for Hacklytics hackathon.