Skip to content

n-j-m06/WaitSafe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

42 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

WaitSafe πŸ›‘οΈπŸ“±

Intelligent Real-Time Safety Tracking and Emergency Alert Ecosystem

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.

🌟 Key Features

πŸ“ Real-Time GPS Tracking

Continuously streams device coordinates using hardware-level GPS integration.

πŸ—ΊοΈ Intelligent Geofencing

Automatically computes safe zones and detects route deviations.

⏱️ ETA Monitoring

Compares actual travel progress against expected arrival times.

🚨 Panic Button

Allows users to instantly send emergency alerts with current coordinates.

πŸ“© Automated SMS Dispatch

Uses Twilio integration to send real-time emergency notifications.

πŸ” Secure Authentication

Implements JWT-based user authentication and Argon2 password hashing.

πŸ’Ύ Local Persistence

Stores preferences and session data using Shared Preferences.

🌐 Cross-Platform Deployment

Runs seamlessly on Android, Web, and Desktop platforms.

🎨 Cyber-Safety UI

Modern neon-glassmorphism interface optimized for high-stress visibility.


πŸ—οΈ System Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                         WaitSafe Frontend Client                     β”‚
β”‚      Flutter + Provider + Geolocator + Shared Preferences            β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                β”‚
                                β–Ό
                        Asynchronous HTTP REST
                                β”‚
                                β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                         WaitSafe Backend API                         β”‚
β”‚        FastAPI + SQLAlchemy + Pydantic + JWT + Twilio                β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                β”‚
                                β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                          PostgreSQL Database                         β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ› οΈ Technology Stack

Frontend Technologies

  • 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)

Backend Technologies

  • 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

Database

  • PostgreSQL

🎨 Frontend Architecture

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]

UI / UX Engineering

  • 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

Core Flutter Widgets Used

  • Scaffold
  • AppBar
  • SafeArea
  • SingleChildScrollView
  • Scrollbar
  • Container
  • Row
  • Column
  • Expanded
  • ConstrainedBox
  • TextField
  • SwitchListTile
  • ElevatedButton
  • SnackBar
  • ListTile
  • CircleAvatar

βš™οΈ Backend Architecture

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]

Backend Responsibilities

  • 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

πŸ” Security Features

  • Argon2 password hashing
  • JWT-based authentication and authorization
  • Secure bearer token workflows
  • Protected emergency endpoints
  • Input validation with Pydantic schemas

πŸ“‘ Emergency Alert Workflow

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

🌍 Supported Platforms

  • Android
  • Web (Chrome, Edge, Firefox)
  • Windows Desktop
  • macOS Desktop
  • Linux Desktop

πŸš€ Future Enhancements

  • AI-based route anomaly detection
  • Push notifications
  • Live contact tracking dashboard
  • Voice-activated SOS
  • Wearable device integration
  • Offline emergency queueing

πŸ‘¨β€πŸ’» Contributors

  • Niranjan J Menon and Atmihaa M B

πŸ“„ License

This project is intended for academic and research purposes. Licensing terms may be added upon open-source publication.

About

WaitSafe is a cross-platform personal safety application built with Flutter and FastAPI that provides real-time GPS tracking, intelligent geofencing, ETA monitoring, and instant SOS alerts via automated SMS notifications.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors