SpeedTrack is a real-time vehicle speed tracking and family safety application built with Flutter, Riverpod, and Firebase.
- Real-Time Tracking: Track the live location and speed of your family members or group.
- Speed Alerts: Receive push notifications when a group member exceeds the defined speed limits.
- Offline Resilience: Automatic local queueing of GPS data when connectivity is lost, syncing securely when back online.
- Polyline Route Compression: High-efficiency route saving via Google Polyline algorithms to bypass Firestore document limits.
- Spam Protection: Prevents notification spam for continuous speeding.
- Scalable Architecture: Uses batch processing and RTDB
onChildChangedevents to gracefully scale to thousands of users.
lib/
├── core/ # App-wide configurations, constants, theme, routing, error handling
├── features/ # Feature-first domain folders
│ ├── auth/ # Firebase Authentication, Login/Register UI
│ ├── tracking/ # Realtime Database maps, live speed processing
│ ├── analytics/ # Daily/Weekly speed reports, trip models
│ ├── family/ # Group management, invite codes
│ ├── settings/ # Privacy settings, ghost mode
│ └── subscription/ # RevenueCat integration, Paywalls
└── main.dart # App entry point
- Flutter SDK
^3.5.0 - Firebase Project (Firestore, RTDB, Auth, Storage, Functions)
- Node.js (for Cloud Functions)
The project uses .env files for secrets (ignored by git).
You must configure your Firebase project using the FlutterFire CLI:
dart pub global activate flutterfire_cli
flutterfire configureThis will generate lib/core/config/firebase_options.dart.
To generate Riverpod providers and JSON serializable models:
flutter pub run build_runner build --delete-conflicting-outputsTo deploy the backend functions (Daily Summaries, Spam Protection, Trip Archiving):
cd functions
npm install
firebase deploy --only functionsMake sure to deploy the custom Firestore security rules located in firestore.rules and the RTDB rules in database.rules.json to prevent unauthorized access to invite_codes and trips.
To run the automated test suite:
flutter test