A comprehensive Flutter application designed for hackathon demonstration, featuring real-time location tracking, geo-fencing, AI-powered anomaly detection, and a police dashboard for monitoring tourist safety.
- Digital Tourist ID Registration: Complete KYC process with Aadhaar/Passport verification
- Real-time Location Tracking: Continuous GPS monitoring with 1-2 second updates
- Geo-fencing Alerts: Automatic alerts when entering high-risk zones
- AI Anomaly Detection: Detects prolonged inactivity (5+ minutes)
- Panic Button: One-tap emergency alert system
- Blockchain-style ID: SHA256 hashed unique identifiers
- Real-time Dashboard: Live monitoring of all registered tourists
- Alert Management: Real-time alert notifications with location data
- Tourist Tracking: Complete tourist information and location history
- Alert Resolution: Mark alerts as resolved with officer attribution
- Flutter: Cross-platform mobile and web application
- Material Design 3: Modern, accessible UI components
- Real-time Updates: StreamBuilder for live data synchronization
- Firebase Authentication: User management and security
- Cloud Firestore: NoSQL database for real-time data storage
- Firebase Core: Cross-platform Firebase integration
- Location Service: GPS tracking and geo-fencing logic
- Firebase Service: Database operations and user management
- AI Anomaly Detection: Simple inactivity detection algorithm
- High-Risk Zone Management: Predefined dangerous areas
- Login/Registration screens
- KYC information collection
- Main dashboard with panic button
- Location tracking status
- Safety tips and information
- Real-time tourist monitoring
- Alert management interface
- Location tracking visualization
- Alert resolution workflow
- Flutter SDK (3.0+)
- Firebase project
- Android Studio / Xcode (for mobile development)
- Web browser (for police dashboard)
git clone <repository-url>
cd travel-safeflutter pub get- Go to Firebase Console
- Create a new project named "travel-safe"
- Enable Authentication and Firestore Database
- Add Android app with package name:
com.example.travel_safe - Download
google-services.json - Replace
android/app/google-services.jsonwith your file
- Add iOS app with bundle ID:
com.example.travelSafe - Download
GoogleService-Info.plist - Replace
ios/Runner/GoogleService-Info.plistwith your file
- Add Web app
- Copy Firebase configuration
- Update
web/firebase-config.jswith your config
- Run
flutterfire configure(if you have FlutterFire CLI) - Or manually update
lib/firebase_options.dartwith your configuration
- Go to Authentication > Sign-in method
- Enable "Email/Password" provider
- Go to Firestore Database
- Create database in "test mode"
- Set up security rules (for production)
flutter runflutter run -d chromeEdit lib/models/high_risk_zone.dart to customize:
- Zone locations (latitude/longitude)
- Zone radius (in meters)
- Risk levels and warnings
- Zone descriptions
Modify lib/services/location_service.dart to adjust:
- Update frequency (currently 1-2 seconds)
- Inactivity threshold (currently 5 minutes)
- Permission handling
Customize detection logic in lib/services/location_service.dart:
- Inactivity detection algorithm
- Alert triggering conditions
- Time thresholds
{
id: "blockchain_hash",
userId: "firebase_auth_uid",
email: "user@example.com",
fullName: "John Doe",
phoneNumber: "+1234567890",
idNumber: "123456789012",
idType: "aadhaar",
tripItinerary: "Travel plans...",
emergencyContacts: ["+1234567890"],
location: {
latitude: 28.6139,
longitude: 77.2090,
timestamp: "2024-01-01T00:00:00Z"
},
createdAt: "2024-01-01T00:00:00Z",
lastUpdated: "2024-01-01T00:00:00Z"
}{
id: "alert_hash",
userId: "firebase_auth_uid",
alertType: "panic|geo-fence|prolonged-inactivity",
description: "Alert description",
location: { /* location data */ },
timestamp: "2024-01-01T00:00:00Z",
isResolved: false,
resolvedBy: "officer_id",
resolvedAt: "2024-01-01T00:00:00Z"
}- Firebase Authentication: Secure user authentication
- Blockchain-style IDs: SHA256 hashed unique identifiers
- Location Privacy: User consent for location tracking
- Data Encryption: Firebase handles data encryption
- Permission Management: Granular location permissions
- Trigger: User enters high-risk zone
- Data: Zone information, user location, timestamp
- Action: Immediate notification to police dashboard
- Trigger: No location updates for 5+ minutes
- Data: Last known location, inactivity duration
- Action: Alert sent to police dashboard
- Trigger: User presses panic button
- Data: Current location, user information
- Action: Immediate high-priority alert
tourists: Tourist profiles and location dataalerts: Safety alerts and incident reports
- Tourist location updates
- New alert notifications
- Alert status changes
flutter testflutter test integration_test/- Register a new tourist account
- Complete KYC information
- Test location tracking
- Trigger panic button
- Monitor police dashboard
flutter build apk --releaseflutter build ios --releaseflutter build web --release- Location Updates: Optimized for 1-2 second intervals
- Battery Usage: Efficient GPS tracking
- Data Usage: Minimal Firestore operations
- Real-time Sync: Optimized for low latency
- Push Notifications: Real-time alert notifications
- Offline Support: Local data caching
- Multi-language: Internationalization support
- Advanced AI: Machine learning for anomaly detection
- Integration: Emergency services API integration
- Analytics: Usage and safety metrics
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
For support and questions:
- Create an issue in the repository
- Contact the development team
- Check the documentation
This project was designed for hackathon demonstration with:
- Complete end-to-end functionality
- Real-time data synchronization
- Professional UI/UX design
- Scalable architecture
- Comprehensive documentation
Perfect for showcasing modern mobile development, real-time systems, and safety technology integration.
Built with โค๏ธ for tourist safety and peace of mind