Know where your family is. Always. SafeNest delivers live location tracking, device health monitoring, and weather-based safety alerts — all in a dark-cyber UI built for real families.
SafeNest is a production-ready mobile application that gives families real-time visibility into each other's location, device status, and local safety conditions — with zero compromise on architecture quality.
Built end-to-end in TypeScript with a React Native (Expo) frontend and Firebase backend, it's engineered for scale: clean service layers, background task handling, and Firestore subscriptions that update live across all family members simultaneously.
- Live family map with Firestore realtime subscriptions
- Background location sync via Expo Location + Task Manager
- Online/offline detection using 30-second freshness logic
- Custom neon-animated map markers per family member
- Live battery percentage sync to Firestore
- Foreground/background presence tracking
- Last-seen timestamps logged automatically
- Status updates triggered without user interaction
Powered by OpenWeatherMap API with a rule-based alert system:
| Condition | Threshold | Action |
|---|---|---|
| 🌡️ Temperature | > 35°C | Heat Alert |
| 🧊 Temperature | < 10°C | Cold Alert |
| 🌧️ Rain Probability | > 60% | Carry Umbrella |
| 💨 Wind Speed | > 40 km/h | Stay Cautious |
| ✅ Normal | — | Conditions Safe |
- Avatar upload to Firebase Storage (
profiles/{uid}.jpg) - Editable display name and role:
Parent / Child / Guardian - Live battery level + online status visible across all members
- Realtime profile sync via Firestore listeners
- Global theme system with CSS-like design tokens
- Custom Google Maps dark styling
- Neon pulsing marker animations
- Interactive bottom sheet with member details
| Layer | Technology |
|---|---|
| 📱 Frontend | React Native (Expo SDK 55) |
| 🔤 Language | TypeScript |
| 🔐 Auth | Firebase Authentication |
| 🗄️ Database | Cloud Firestore (Realtime) |
| 🗃️ Storage | Firebase Storage |
| 🗺️ Maps | react-native-maps |
| 🌤️ Weather | OpenWeatherMap API |
| 📦 Build | EAS CLI |
App Launch
│
▼
Firebase Auth resolves session
│
▼
Fetch familyId from user document
│
├──► Background tracking service starts
│ └── Battery + GPS synced to Firestore
│
└──► Presence listener attaches
├── Foreground → mark online
└── Background → mark offline
└── Sync: currentLocation, lastLocation, lastOnline
Map Screen subscribes to families/{familyId}/members and renders:
- Animated markers for each member
- Bottom sheet: Profile · Battery · Weather · Safety Recommendation
SafeNest-App/
├── src/
│ ├── screens/ # App screens (Map, Profile, Auth)
│ ├── components/ # Reusable UI components
│ ├── services/ # All Firebase & API logic (isolated)
│ ├── hooks/ # Custom React hooks
│ ├── theme/ # Global colors, fonts, spacing
│ ├── utils/ # Helpers & formatters
│ └── config/ # Firebase init, env config
├── assets/
├── App.tsx
├── app.json
├── eas.json
├── firestore.rules
└── storage.rules
Design principle: All Firebase logic lives exclusively in
/services. Screens and components stay pure and presentation-focused.
- Node.js ≥ 18
- Expo CLI
- Firebase project (see setup below)
- OpenWeatherMap API key
git clone https://github.com/siddhart3000/SafeNest-App.git
cd SafeNest-App
npm install- Create a Firebase project at console.firebase.google.com
- Enable Email/Password Authentication
- Enable Firestore (Production Mode)
- Enable Firebase Storage
- Add your config to
src/config/firebase.ts - Deploy rules:
# Apply Firestore + Storage security rules
firebase deploy --only firestore:rules,storage# Create .env in root
echo "EXPO_PUBLIC_WEATHER_API_KEY=your_key_here" > .envRestart the Expo dev server after adding environment variables.
npm start
# Then press:
# a → Android Emulator
# w → Web Browsernpm install -g eas-cli
eas login
# Preview APK (for testing)
eas build -p android --profile preview
# Production AAB (for Play Store)
eas build -p android --profile productionThis isn't a tutorial clone. SafeNest solves real engineering problems:
- Realtime at scale — Firestore subscriptions keep all family members in sync without polling
- Background reliability — Expo Task Manager keeps location alive even when the app is minimized
- Presence system — Accurate online/offline state without a WebSocket server
- Safety intelligence — API data transformed into human-readable, actionable alerts
- Deployment-ready — EAS builds, security rules, and env config all production-configured
- Maintainable architecture — Service layer pattern keeps business logic decoupled from UI
Skills demonstrated: Realtime systems · Mobile device APIs · BaaS integration · Deployment pipelines · TypeScript architecture · Clean code
- Push notifications (FCM)
- Geofencing — Home / School zones with entry/exit alerts
- Web dashboard for Parents
- Admin analytics panel
- Location history timeline
- Granular privacy controls per member