Inspiration
At Virginia Tech, we are all too familiar with the "Crime Alert" emails that hit our inboxes every week. They follow a heartbreakingly consistent pattern: an incident on campus, a survivor and offender who knew each other, and a community left reacting to a tragedy that has already happened.
We built SafeNight because "What happens next?" isn't a good enough question; we want to change what happens before.
SafeNight is a proactive safety ecosystem designed to prevent emergencies from escalating. By empowering users with real-time tools to monitor alcohol intake, stay tethered to a trusted community network, and access instant intervention, we are moving the needle from notification to prevention.
SafeNight provides a complete safety ecosystem:
$$ \text{Safety Score} = f(\text{BAC}, \text{Location}, \text{Community}, \text{Time}) $$ Smart Drink Tracking - Log drinks via voice or manual input, with real-time BAC estimation using the Widmark formula: $$ \text{BAC} = \frac{A \times 5.14}{W \times r} - 0.015 \times H $$
Where: A = Alcohol consumed (oz) W = Body weight (lbs) r = Gender constant (0.55 for women, 0.68 for men) H = Hours since first drink
AI Safety Assistant - Chat with an AI that provides personalized safety advice, venue recommendations, and plan suggestions Community Ride Sharing - Request or offer rides with verified users heading the same direction Emergency SOS - One-tap emergency alerts with location sharing to trusted contacts Venue Safety Map - View crowd levels, security ratings, and women-owned establishments
How we built it
Planning & Design - Identified key safety features and designed a cohesive UX with glassmorphism aesthetics Frontend Development - Built a cross-platform app using Expo with React Native and TypeScript AI Integration - Implemented voice logging with ElevenLabs transcription and AI chat with Gemini via OpenRouter Backend & Database - Created Express.js API with Snowflake for scalable user data storage Real-time Features - Added live simulation for community feed to demonstrate social features
Challenges we ran into
Voice Transcription on Web The ElevenLabs Scribe API required native file system access (expo-file-system), which isn't fully supported on web. We implemented a dual-mode approach: native recording on mobile, demo fallback on web.
AI Rate Limiting Gemini API rate limits caused issues during testing. Solution: Implemented OpenRouter as primary with Gemini as fallback, plus demo responses as a final safety net: typescript // Fallback chain: OpenRouter → Gemini → Demo try { response = await callOpenRouter(prompt); } catch { response = await callGemini(prompt); } catch { response = getDemoResponse(prompt); }
Real-time Community Simulation Creating a convincing "live" social feed for the demo required generating realistic user profiles, messages, and ride requests with proper timestamps and profile pictures.
Cross-Platform Map Rendering React Native Maps doesn't work on the web, so we implemented platform-specific components:
MapView.native.tsx → React Native Maps MapView.web.tsx → Leaflet with dynamic loading
- Demo Mode vs Production Balancing a functional demo without requiring backend connectivity meant building comprehensive local storage fallbacks for all features.
What's next for SafeNight
Real-time location sharing with trusted contacts Venue partnerships for verified safety ratings. (LineLeap) Integration with ride-share apps (Uber, Lyft) Wearable support for discreet SOS activation ML-based anomaly detection for proactive safety alerts
Built With
- bcrypt
- elevenlabs
- expo.io
- express.js
- firebase
- github
- google-gemini
- jwt
- leaflet.js
- localtunnel
- maps
- native
- ngrok
- openrouter
- randomuser.me
- react
- router
- snowflake
- typescript
- vscode
- zustand

Log in or sign up for Devpost to join the conversation.