Track rides. Earn points. Stay safe. Share memories.
A cross-platform Flutter app for cyclists who want more than just a stopwatch.
- Project Overview
- Features
- Architecture
- Tech Stack
- Installation
- Usage
- Configuration
- Folder Structure
- Screens & UI
- Future Improvements
- Contributing
- License
RiderMate is a Flutter-based mobile (and web/desktop) application designed for cycling enthusiasts. It provides real-time ride tracking with simulated GPS data, a gamified points system, social features for connecting with friends, an SOS emergency alert system, and a "Memories" feature to geo-tag special moments during a ride.
The app is built entirely in Dart/Flutter with a dark, high-contrast UI theme, targeting Android as its primary platform (with CI that auto-builds a release APK). It is structured as an early-stage prototype โ all data is currently in-memory/simulated, with clear placeholders for backend and map integration.
| Tab | Description |
|---|---|
| Today | Shows today's distance, a large "Start Ride" CTA, quick stats (avg speed, max speed, calories), and a referral code panel |
| History | Lists past rides with distance, duration, and points earned |
| Friends | Live map placeholder + scrollable friends list with real-time status indicators |
| Memories | Geo-tagged location memories with privacy controls (Public ๐ / Friends ๐ฅ / Private ๐) and a like counter |
- Live HUD โ Real-time speed, distance, and elapsed time overlay on a map canvas
- Simulated GPS โ Speed fluctuates using a sine wave + random noise (ready for real GPS integration)
- Speed Warning Banner โ Flashes a red alert when current speed exceeds the configured limit (default 60 km/h)
- Memory Capture โ Mid-ride dialog to drop a text note + photo stub at the current location
- SOS Button โ Prominent red emergency button that simulates sending an alert with GPS coordinates to contacts
- Music Button โ Stub for in-ride music controls
- End Ride โ Stops the timer, saves the ride, awards points, and navigates back
- Distance-based points:
distance km ร 10 = pts - Referral system with bonus points per referred friend
- Running total displayed prominently in the app header
RiderMate currently follows a single-file monolithic Flutter architecture (all code in main.dart). For the current prototype scale, this is intentional and functional. The conceptual layers are:
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Presentation Layer โ
โ HomeScreen (StatefulWidget, 4-tab navigator) โ
โ RideScreen (StatefulWidget, live HUD overlay) โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ State Management โ
โ Local setState() โ ephemeral in-memory state โ
โ Timer (dart:async) โ 1-second ride loop โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ Data Models โ
โ RideHistory (name, distance, duration, date) โ
โ Memory (name, lat, lon, note, privacy, likesโ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ Platform / Native Layer โ
โ Android ยท iOS ยท Web ยท Windows ยท Linux โ
โ (Flutter multi-platform targets) โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Design note: For production, a clean separation into
models/,screens/,widgets/,services/, andproviders/is strongly recommended. See Future Improvements.
| Layer | Technology |
|---|---|
| UI Framework | Flutter 3.x (Material 3) |
| Language | Dart 3.10+ |
| State Management | setState (local, ephemeral) |
| Async / Timer | dart:async โ Timer.periodic |
| Math / Simulation | dart:math โ sin, Random |
| CI/CD | GitHub Actions โ builds release APK on every push |
| Linting | flutter_lints ^6.0.0 |
| Icons | Flutter Material Icons + Cupertino Icons |
| Target Platforms | Android (primary), iOS, Web, Windows, macOS, Linux |
- Flutter SDK 3.x or later (tested with
3.38.3) - Dart SDK
^3.10.1(bundled with Flutter) - Android Studio / Xcode (for emulator/device testing)
- A connected Android device or emulator for the APK build
# 1. Clone the repository
git clone https://github.com/rithwikkr0/Ridermate.git
cd Ridermate/ridermate_app
# 2. Fetch dependencies
flutter pub get
# 3. Run on a connected device or emulator
flutter run
# 4. (Optional) Build a release APK
flutter build apk --release
# Output: build/app/outputs/flutter-apk/app-release.apkflutter run -d chromeflutter run -d linux # or windows / macos- Launch the app โ you land on the Today tab.
- Tap ๐ START RIDE to enter the active Ride Screen.
- Watch live speed, distance, and elapsed time update every second.
- Use the bottom bar during a ride:
- ๐ท Memory โ drop a geo-tagged note
- ๐ต Music โ (placeholder)
- ๐ SOS โ sends simulated emergency alert
- ๐ฅ Friends โ (placeholder live view)
- โน End Ride โ saves and awards points
- Return to History tab to see past rides.
- Check Memories tab to browse saved geo-tagged moments.
- Share your referral code from the Today tab to earn bonus points.
Currently all configuration is hard-coded in main.dart. Key values to customize:
| Variable | Location | Default | Description |
|---|---|---|---|
speedLimit |
_RideScreenState |
60.0 |
Speed (km/h) above which warning triggers |
points |
_HomeScreenState |
1250 |
Initial points balance |
todayDistance |
_HomeScreenState |
23.5 |
Seed distance shown on Today tab |
| Referral code | _buildTodayTab() |
RIDER2025XYZ |
Static referral code string |
| Theme colors | RiderMateApp.build() |
#0066FF, #FF6B35 |
Primary blue & accent orange |
For production: Move these into a
Configclass, environment variables, or a remote config service (e.g. Firebase Remote Config).
Ridermate/
โโโ .github/
โ โโโ workflows/
โ โโโ build.yml # CI: builds release APK on every push
โ
โโโ ridermate_app/ # Flutter project root
โโโ assets/
โ โโโ logo/
โ โโโ icon.png # App icon
โ
โโโ lib/
โ โโโ main.dart # โ ๏ธ Entire app โ all screens, models, widgets
โ
โโโ test/
โ โโโ widget_test.dart # Default Flutter widget smoke test (needs update)
โ
โโโ android/ # Android platform project
โโโ ios/ # iOS platform project
โโโ web/ # Web platform project
โโโ linux/ # Linux desktop project
โโโ windows/ # Windows desktop project
โโโ macos/ # macOS desktop project
โ
โโโ pubspec.yaml # Dependencies & Flutter config
โโโ pubspec.lock # Locked dependency versions
โโโ analysis_options.yaml # Linting rules
โโโ README.md # Default Flutter README (placeholder)
Note: Add real screenshots here by running the app and capturing the device display.
| Screen | Description |
|---|---|
Home โ Today |
Dark-theme dashboard with distance card, START RIDE button, stats row, referral panel |
Home โ History |
Scrollable list of past ride cards with distance, duration, and earned points |
Home โ Friends |
Map placeholder + avatar list with live indicators |
Home โ Memories |
Privacy-tagged memory cards with coordinates and like counts |
Ride Screen |
Full-screen map canvas + HUD overlay + bottom action bar |
Ride โ SOS Dialog |
Red emergency dialog with simulated location coordinates |
Ride โ Memory Dialog |
Text input + photo stub for mid-ride geo-tagging |
- Real GPS integration โ Replace simulated speed/distance with
geolocatorpackage for actual GPS tracking - Google Maps / Mapbox โ Render a real map tile layer in
RideScreeninstead of the placeholder text - Backend & Auth โ Add Firebase Auth + Firestore (or Supabase) to persist rides, memories, and user profiles
- State Management โ Migrate to
Riverpod,Bloc, orProviderto remove scatteredsetStatecalls
- Split
main.dartโ Refactor into proper folder structure:screens/,widgets/,models/,services/ - Fix widget test โ
widget_test.dartreferencesMyAppwhich doesn't exist; update to testRiderMateApp - Publish assets โ Register
assets/logo/icon.pnginpubspec.yamlso it loads at runtime - Real SOS โ Integrate SMS/push-notification service (Twilio, FCM) for actual emergency alerts
- Music integration โ Connect the music button to
just_audioor a system media intent
- Dark/Light theme toggle
- Localization / i18n support
- Ride route polyline โ Draw the GPS path on the map after a ride
- Leaderboard โ Compare points with friends
- Elevation tracking โ Add altitude data from GPS
- Bluetooth sensor support โ Heart rate monitors, cadence sensors (via
flutter_blue_plus)
Contributions are welcome! Here's how to get started:
- Fork the repository on GitHub
- Clone your fork:
git clone https://github.com/<your-username>/Ridermate.git - Create a branch:
git checkout -b feature/your-feature-name - Make your changes โ keep commits atomic and well-described
- Run lints:
flutter analyze - Run tests:
flutter test - Push your branch and open a Pull Request against
main
- Follow the Dart style guide
- Keep widgets small and composable โ extract reusable pieces into
lib/widgets/ - Prefer named constructors and
constwidgets where possible
Open a GitHub Issue with:
- Steps to reproduce
- Expected vs actual behaviour
- Flutter version (
flutter --version) - Device / OS details
This project is licensed under the MIT License.
MIT License
Copyright (c) 2025 rithwikkr0
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
Built with โค๏ธ using Flutter ยท github.com/rithwikkr0/Ridermate