TL;DR – SafeMate fuses real‑time personal‑safety tech with emotional‑wellness AI.
Two modes (🛡 Safe Walk & ❤️ HeartMate) keep you protected and supported, while a gamified XP system builds healthy habits.
Public beta opening soon – join the wait‑list at getsafemate.store.
🧠 Why We Built SafeMate
Personal‑safety apps are everywhere, but they’re mostly reactive panic buttons.
Mental‑health bots exist too, but they ignore situational danger.
We set out to merge the two worlds after hearing countless stories of:
- Students crossing empty campuses 🌙
- Women (and men) feeling uneasy on late‑night walks 🚶♀️
- Healthcare workers leaving shifts in dim parking lots 🏥
- Anyone fighting loneliness or anxiety in silence 🫂
Our question:
“What if technology could be a **guardian* and a companion at the exact same time?”*
✨ Core Value Proposition
Mode | What It Delivers | Tech Under the Hood |
---|---|---|
🛡 Safe Walk | Real‑time GPS, AI check‑ins, SOS alerts (Telegram), route safety scoring, geofenced safe‑zones | Gemini 2.5 Flash • LiveKit + Tavus • Deepgram (STT) • ElevenLabs (TTS) |
❤️ HeartMate | Emotional chat, mood tracking, guided breathing & meditation, calming sound‑scapes, face‑to‑face AI video | Gemini 2.5 Flash • Tavus avatars • Supabase Edge Functions |
🎮 Gamification | XP, levels, streaks, shareable achievement cards, analytics dashboard | React 18 • Tailwind • Supabase RLS |
🔥 Sneak‑Peek Screens
1 — Dashboard & Quick Actions
2 — Safe Walk Controls
3 — HeartMate Session (Chat + Voice)
4 — Analytics & XP Progress
5 — Achievements & Shareable Card
🛠 Tech Stack
Layer | Stack |
---|---|
Frontend | React 18 + TypeScript • Vite • Tailwind CSS • Ace UI • Framer Motion |
Backend | Supabase (Auth, Postgres RLS, Edge Functions) • Telegram Bot API |
AI & Realtime | Gemini 2.5 Flash • LiveKit • Tavus • Deepgram • ElevenLabs |
Dev Ops/Deploy | Vercel (web) • Netlify preview channels • Supabase hosting |
Smart Fallbacks – If any AI service becomes unavailable, SafeMate automatically downgrades to the next best option so users always have an active companion.
🧩 High‑Level Architecture
SafeMate is designed with a modular, privacy-first architecture to handle real-time audio/video safety interactions and intelligent emotional support. We combine Supabase for authentication and backend services, LiveKit and Tavus for streaming and avatars, and several cutting-edge AI APIs orchestrated via edge functions.
Below is a visual representation of our system architecture:
🔧 Key Components
🧑💻 Client (Frontend)
- React 18 + Tailwind + Ace UI: For blazing-fast, mobile-first interfaces with clean accessibility.
- LiveKit: WebRTC for low-latency, real-time voice/video communication.
- Tavus: Powers AI video avatar rendering for emotional support.
☁️ Backend
-
Supabase:
- Authentication (email/password, RLS)
- PostgreSQL database with row-level security
- Edge Functions (for serverless orchestration)
-
Supabase Edge Functions:
- Connect to various AI APIs (Gemini, ElevenLabs, Deepgram)
- Validate requests and fallback routing
-
PostgreSQL:
- Stores user safety preferences, emergency contacts, check-in data
🧠 AI Services
- Gemini 2.5 Flash: Empathetic and real-time conversational logic for HeartMate.
- ElevenLabs: Converts AI messages to lifelike, comforting voice audio.
- Deepgram: Converts live user speech to text for commands and check-ins.
🚨 Emergency Handling
- Telegram Bot API: Triggers SOS messages to trusted contacts instantly, even if the app is closed or backgrounded.
- Customizable Emergency Modes: Silent alerts, geofence triggers, and multi-channel notifications.
🧠 Smart AI Orchestration
All AI APIs are routed through Supabase Edge Functions that:
- Check service availability
- Auto-fallback to alternatives if any service is down
- Reduce latency by co-locating logic near the user (edge computing)
🔐 Privacy & Security Highlights
- Row-Level Security on all user data
- No hardcoded API keys — all managed via
.env
and serverless edge calls - All user preferences and emergency contacts scoped to authenticated sessions
- Encryption and role-based access control (RBAC) for sensitive interactions
This architecture allows SafeMate to scale securely while maintaining a deeply personal, AI-powered experience for users during their most vulnerable moments.
🚨 Emergency Response Engine
One of the most critical parts of SafeMate is its emergency engine, which ensures that help is just a tap away — even in the worst-case scenarios.
⚙️ Telegram Integration (Offline SOS)
When users press the SOS button:
- A secure Edge Function triggers from Supabase
- It sends an emergency message to the user’s trusted contacts via Telegram
- Includes:
- Real-time location
- Time of alert
- User identifier
- Emergency type (e.g., panic tap, fall detected, or geofence breach)
This ensures that even if the app is backgrounded or the user has weak internet, notifications are reliably delivered.
🎮 Gamified Safety & Emotional Wellness
To encourage long-term engagement and build safety habits, SafeMate features a gamification layer that blends purpose with motivation:
🏆 Features:
- XP System: Gain experience for completing walks, check-ins, and daily wellness sessions
- Achievement Badges: Unlockable awards for milestones (first walk, 7-day streak, etc.)
- Daily Streaks: Encourages consistency with check-ins and reflection activities
- Leaderboard (Coming Soon): Track your progress with friends or community members
All elements are built using local state (Phase 2), with support for syncing to Supabase in later phases.
📈 Analytics & Insights
SafeMate includes a powerful insights dashboard to help users visualize their physical and emotional safety patterns.
📊 Features:
- Mood trendline (based on check-ins and HeartMate feedback)
- Safety event timeline (SOS events, location alerts)
- Check-in frequency and completion history
- Achievement and XP tracker
These insights help users better understand their habits, triggers, and improvements over time.
🧠 What We Learned
This project taught our team more than we ever expected:
- AI-Oriented Architecture: We learned to orchestrate multiple AI services behind a unified interface.
- Supabase Mastery: From RLS to Edge Functions, Supabase enabled us to build fast and secure without worrying about DevOps.
- Mobile Audio Workarounds: We implemented dynamic handlers to trigger TTS/audio after user gestures (overcoming autoplay limits).
- Accessible UX for High-Stress: We designed every interaction to be accessible under panic or stress — bold buttons, keyboard nav, voice triggers.
- Fallback-First AI Systems: We introduced a smart detection mechanism to select the best available service automatically.
- Gamification with Purpose: Unlike novelty-based rewards, our gamification system encourages real-world safety engagement.
🔮 What’s Next?
We’re just getting started. Here’s what’s coming:
- 📱 Mobile App Launch: iOS & Android with offline-mode and wearable integration
- 🧑🤝🧑 Trusted Network: Friends and family mutual monitoring with presence indicators
- 🧘 Wellness Expansion: More meditations, breathing patterns, and AI mood exercises
- 🚓 Emergency Services API: Integration with regional 911/112 systems (via country code)
- ⌚ Smartwatch Support: Hands-free check-ins and panic triggers
- 🌍 Localization & Global Scaling: Support for Indian, European, and US safety systems
- 🏢 Enterprise Version: Institutions like universities, hospitals, and BPOs can deploy SafeMate for their employees/students
🔗 Join the Movement
SafeMate isn’t just an app — it’s a movement for tech-enabled compassion.
We’re currently in closed beta, and launching soon.
👉 Sign up now at https://getsafemate.store
👉 Or follow our Telegram bot for live alerts and demos: t.me/safemate_guardian
🙌 Built With ❤️ by @freaking_wish
- Frontend: React 18, Tailwind CSS, Aceternity UI
- Backend: Supabase, PostgreSQL, Edge Functions
- AI: Gemini 2.5, ElevenLabs, Deepgram, Tavus
- Voice/RTC: LiveKit, Telegram Bot API
“The guardian you trust. The companion you need.”
Let us know what you think. Feedback, ideas, or hugs → drop them in the comments!
🧠💙 Stay safe,
— Wish
Top comments (0)