WaitSafe is a production-grade, cross-platform personal safety application designed to provide real-time journey monitoring, automated geofencing, and instant emergency alert dispatch. The system combines a highly responsive Flutter frontend with a robust FastAPI backend to create a secure and scalable ecosystem for personal safety.
The application enables users to:
- Track live geographic movement during travel.
- Define expected destinations and estimated arrival times.
- Automatically detect deviations from predefined routes or time thresholds.
- Trigger panic alerts manually via an emergency button.
- Notify trusted contacts through automated SMS messages containing live location data.
Continuously streams device coordinates using hardware-level GPS integration.
Automatically computes safe zones and detects route deviations.
Compares actual travel progress against expected arrival times.
Allows users to instantly send emergency alerts with current coordinates.
Uses Twilio integration to send real-time emergency notifications.
Implements JWT-based user authentication and Argon2 password hashing.
Stores preferences and session data using Shared Preferences.
Runs seamlessly on Android, Web, and Desktop platforms.
Modern neon-glassmorphism interface optimized for high-stress visibility.
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β WaitSafe Frontend Client β
β Flutter + Provider + Geolocator + Shared Preferences β
βββββββββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββββββββ
β
βΌ
Asynchronous HTTP REST
β
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β WaitSafe Backend API β
β FastAPI + SQLAlchemy + Pydantic + JWT + Twilio β
βββββββββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β PostgreSQL Database β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
- Core Language: Dart 3.x
- UI Framework: Flutter SDK
- State Management: Provider (^6.1.5+1)
- Local Persistence: Shared Preferences (^2.5.5)
- Networking: HTTP REST Client (^1.2.1)
- Geolocation: Geolocator (^14.0.2)
- Animations: Lottie (^3.1.2)
- Core Framework: FastAPI (Python 3.12+)
- ASGI Server: Uvicorn
- ORM: SQLAlchemy (Asynchronous)
- Validation: Pydantic v2
- Password Security: Passlib with Argon2
- Authentication: Python-Jose (JWT)
- Communication Services: Twilio REST SDK
- PostgreSQL
The Flutter frontend follows a reactive state-driven architecture where user interactions trigger state updates, local persistence, and asynchronous communication with the backend.
[User Interaction UI]
β
βΌ
[Provider State Layer] ββ(Persists Cache)βββΊ [Shared Preferences (Local)]
β
βΌ (Asynchronous HTTP Payload)
[Networking Client]
β
βΌ (REST API Handshake)
[WaitSafe Backend Service]
- Neon pink glow accents on ultra-dark backgrounds
- Glassmorphism-inspired cards and panels
- Linear gradients and custom shadow systems
- Fully responsive layouts for Web, Android, and Desktop
- High-visibility design optimized for emergency scenarios
ScaffoldAppBarSafeAreaSingleChildScrollViewScrollbarContainerRowColumnExpandedConstrainedBoxTextFieldSwitchListTileElevatedButtonSnackBarListTileCircleAvatar
The FastAPI backend acts as a stateless transactional engine that validates requests, authenticates users, performs geofencing computations, and dispatches emergency alerts.
[Mobile Frontend Client]
β
βΌ (HTTP Requests / Telemetry Stream)
[Uvicorn ASGI Gateway]
β
βΌ
[FastAPI Engine Layer]
β
βΌ
[SQLAlchemy ORM (Async)]
β
βΌ
[PostgreSQL Database]
- CORS validation
- Request schema validation using Pydantic
- JWT bearer token authentication
- Argon2 password hashing
- Asynchronous database session management
- Automated geofencing calculations
- Real-time location processing
- Panic event routing
- Twilio SMS alert dispatch
- Argon2 password hashing
- JWT-based authentication and authorization
- Secure bearer token workflows
- Protected emergency endpoints
- Input validation with Pydantic schemas
1. User presses Panic Button
2. Frontend retrieves current GPS coordinates
3. Coordinates are sent to FastAPI backend
4. Backend validates JWT and request schema
5. Twilio API sends SMS alerts to trusted contacts
6. Contacts receive emergency message with live location
- Android
- Web (Chrome, Edge, Firefox)
- Windows Desktop
- macOS Desktop
- Linux Desktop
- AI-based route anomaly detection
- Push notifications
- Live contact tracking dashboard
- Voice-activated SOS
- Wearable device integration
- Offline emergency queueing
- Niranjan J Menon and Atmihaa M B
This project is intended for academic and research purposes. Licensing terms may be added upon open-source publication.