MechResQ is a comprehensive emergency roadside assistance mobile application built with Flutter. It connects users with nearby mechanics during vehicle emergencies, providing real-time tracking, service billing, digital payments, receipt generation, and multi-language support.
- Features
- Architecture
- Tech Stack
- Project Structure
- Getting Started
- Configuration
- Localization
- Firebase Setup
- Permissions
- Build and Run
- Key Services
- App Statistics
- Theming
- Roadmap
- License
- Emergency SOS - Quick access to emergency assistance with one tap
- Real-time Location Tracking - Live mechanic tracking with Google Maps integration
- Find Nearby Mechanics - Discover mechanics based on your current location
- In-app Chat - Direct communication with assigned mechanics
- Ratings and Reviews - Rate and review mechanic services
- Service Request Management - Create, track, and manage service requests
- Smart Bill Screen - Auto-calculated service estimate shown immediately after request creation
- Dynamic Pricing Engine - Calculates cost based on vehicle type, issue complexity, distance, labour, spare parts, platform fee, and GST (18%)
- Pay by Cash or Digitally - Razorpay integration for digital payments; cash payment flow with confirmation
- Digital Receipts - Instant PDF receipt generation after digital payment
- PDF Download - Unlimited receipt downloads with MechResQ branding
- Payment History - Full payment history screen with filter options
- Estimate Mode - Bill screen shown after submission with Cancel Request option
- Tracking Mode - Track on Map button appears in Active tab when request is accepted
- History Mode - View Bill and Pay button in History tab for completed requests
- Receipt View - View Receipt button after payment; accessible from History tab indefinitely
- Phone OTP Authentication - Login via mobile number with SMS OTP verification
- Profile Management - Complete user profile with personal and vehicle information
- Vehicle Management - Add and manage multiple vehicles
- Emergency Contacts - Store and manage emergency contact information
- Service Reminders - Schedule and receive vehicle service reminders
- Multi-language Support - English and Kannada with full localization coverage
- Dark and Light Theme - Hazard-focused theme with customizable appearance
- Push Notifications - Real-time notifications for service updates with smart navigation
- Request History - View all past service requests with delete options (individual and bulk)
- SOS History - Track all emergency events
- Legal and Support - Terms, Privacy Policy, and Help documentation
MechResQ follows a feature-based architecture with clear separation of concerns:
lib/
+-- core/ # Core utilities and constants
+-- l10n/ # Localization files (English and Kannada)
+-- models/ # Data models
+-- screens/ # UI screens
+-- services/ # Business logic and Firebase integration
+-- utils/ # Helper utilities
+-- widgets/ # Reusable UI components
+-- locale_provider.dart # Language management
+-- theme_controller.dart # Theme management
+-- theme.dart # App theming
+-- main.dart # App entry point
- Provider for state management
- Service Layer for business logic separation
- Repository Pattern for data access
- Singleton Pattern for Firebase services
- Flutter 3.10+ - Cross-platform UI framework
- Material Design 3 - Modern UI components
- Provider - State management solution
- Firebase Authentication - Phone number authentication with SMS OTP
- Cloud Firestore - Real-time NoSQL database
- Firebase Storage - Image and file storage
- Firebase Cloud Messaging - Push notifications
- Google Maps Flutter - Map integration
- Geolocator - Location services
- Geocoding - Address resolution
- Razorpay Flutter - Payment gateway (Test and Live mode support)
- PDF - Receipt and invoice generation
- Printing - PDF preview, download, and share
- flutter_localizations - Internationalization
- intl - Date/time formatting and localization
- cached_network_image - Efficient image loading
- image_picker - Camera and gallery access
- url_launcher - External link handling
- flutter_secure_storage - Secure data storage
- permission_handler - Runtime permissions
- timezone - Timezone handling
- path_provider - File system access for PDF saving
MechResQ_App/
+-- android/ # Android native code
+-- ios/ # iOS native code
+-- assets/ # Images, icons, and assets
| +-- icons/ # App icons
| +-- mechresq_logo.png # App logo (used in receipts and PDF)
| +-- mechresq_logo.svg # SVG version of logo
+-- lib/
| +-- core/ # Core utilities
| | +-- config/
| | +-- payment_config.dart # Razorpay keys and settings
| +-- l10n/ # Localization
| | +-- app_en.arb # English translations (350+ strings)
| | +-- app_kn.arb # Kannada translations (350+ strings)
| | +-- app_localizations.dart
| +-- models/ # Data models
| | +-- emergency_contact.dart
| | +-- payment.dart
| | +-- receipt.dart
| | +-- request_tracking.dart
| | +-- service_reminder.dart
| | +-- sos_event.dart
| | +-- vehicle.dart
| +-- screens/ # UI Screens
| | +-- bill_screen.dart
| | +-- chat_mechanic_screen.dart
| | +-- create_request_screen.dart
| | +-- home_screen.dart
| | +-- login_screen.dart
| | +-- my_requests_screen.dart
| | +-- payment_history_screen.dart
| | +-- receipt_detail_screen.dart
| | +-- receipt_success_screen.dart
| | +-- request_tracking_screen.dart
| | +-- settings_screen.dart
| | +-- submit_review_screen.dart
| | +-- track_mechanic_screen.dart
| | +-- ... (additional screens)
| +-- services/ # Business logic services
| | +-- auth_service.dart
| | +-- billing_service.dart
| | +-- firestore_service.dart
| | +-- location_service.dart
| | +-- notification_service.dart
| | +-- payment_firestore_service.dart
| | +-- pdf_receipt_service.dart
| | +-- razorpay_service.dart
| | +-- receipt_service.dart
| | +-- request_firestore_service.dart
| | +-- request_tracking_service.dart
| | +-- review_service.dart
| | +-- sos_service.dart
| | +-- vehicle_service.dart
| +-- utils/ # Helper utilities
| +-- widgets/ # Reusable components
| +-- locale_provider.dart # Language management
| +-- theme_controller.dart # Theme management
| +-- theme.dart # App theming
| +-- main.dart # Entry point
+-- test/ # Unit and widget tests
+-- pubspec.yaml # Dependencies
+-- l10n.yaml # Localization config
+-- README.md # This file
- Flutter SDK 3.10.0 or higher
- Dart SDK 3.10.0 or higher
- Android Studio or Xcode (for mobile development)
- Firebase Account (for backend services)
- Google Maps API Key (for map features)
- Razorpay Account (for payment features)
-
Clone the repository
git clone <repository-url> cd MechResQ_App
-
Install dependencies
flutter pub get
-
Generate localization files
flutter gen-l10n
-
Configure Firebase (see Firebase Setup section)
-
Add Google Maps API Key (see Configuration section)
-
Run the app
flutter run
- Get an API key from Google Cloud Console
- Enable Maps SDK for Android and Maps SDK for iOS
- Add the key to:
Android: android/app/src/main/AndroidManifest.xml
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="YOUR_API_KEY_HERE"/>iOS: ios/Runner/AppDelegate.swift
GMSServices.provideAPIKey("YOUR_API_KEY_HERE")Open lib/core/config/payment_config.dart and update:
static const String razorpayKeyId = 'rzp_live_YOUR_KEY_HERE';
static const bool isTestMode = false;For test mode, use the test key. For production, replace with your live key from the Razorpay Dashboard.
MechResQ supports multi-language internationalization.
- English (en) - Complete (350+ strings)
- Kannada (kn) - Complete (350+ strings)
- Hindi (hi)
- Tamil (ta)
- Telugu (te)
- Malayalam (ml)
- All screens fully localized
- Dynamic language switching at runtime
- Language preference persisted across app restarts
- Billing and receipt screens fully translated
- Create a new ARB file:
lib/l10n/app_<locale>.arb - Copy
app_en.arband translate all strings - Add the locale to
main.dartsupported locales:supportedLocales: const [ Locale('en'), Locale('kn'), Locale('hi'), // New language ]
- Run
flutter gen-l10n
- Go to Firebase Console
- Create a new project
- Add Android and/or iOS app
Android:
- Download
google-services.json - Place in
android/app/
iOS:
- Download
GoogleService-Info.plist - Place in
ios/Runner/
- Authentication: Phone Number with SMS OTP
- Cloud Firestore: Create database
- Cloud Storage: Create storage bucket
- Cloud Messaging: Enable for push notifications
The app uses the following Firestore collections:
| Collection | Purpose |
|---|---|
users |
User profiles |
requests |
Service requests |
requestTracking |
Real-time mechanic tracking |
payments |
Payment transactions (legacy) |
receipts |
Service receipts (current) |
reviews |
Mechanic ratings and reviews |
mechanics |
Mechanic profiles (read by user app) |
sosEvents |
SOS emergency events |
rules_version = '2';
service cloud.firestore {
match /databases/{database}/documents {
match /users/{userId} {
allow read: if request.auth != null;
allow write: if request.auth != null && request.auth.uid == userId;
}
match /requests/{requestId} {
allow read: if request.auth != null;
allow create: if request.auth != null;
allow update: if request.auth != null;
}
match /receipts/{receiptId} {
allow read: if request.auth != null;
allow create: if request.auth != null;
allow update: if request.auth != null;
}
match /reviews/{reviewId} {
allow read: if request.auth != null;
allow create: if request.auth != null;
}
}
}<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION"/>
<uses-permission android:name="android.permission.POST_NOTIFICATIONS"/>
<uses-permission android:name="android.permission.CAMERA"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.READ_MEDIA_IMAGES"/><key>NSLocationWhenInUseUsageDescription</key>
<string>We need your location to find nearby mechanics</string>
<key>NSLocationAlwaysUsageDescription</key>
<string>We need your location for real-time tracking</string>
<key>NSCameraUsageDescription</key>
<string>We need camera access to take photos of vehicle issues</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>We need photo library access to select images</string># Run on connected device or emulator
flutter run
# Run on specific device
flutter devices
flutter run -d <device-id>Android APK (single file):
flutter build apk --releaseAndroid APK (split by architecture - smaller size):
flutter build apk --release --split-per-abiAndroid App Bundle (Play Store - recommended):
flutter build appbundle --releaseiOS:
flutter build ios --release# Analyze code
flutter analyze
# Run tests
flutter test
# Check for outdated dependencies
flutter pub outdated
# Clean build cache
flutter clean && flutter pub get- Calculates service estimates based on vehicle type, issue description keywords, distance, and fixed charges
- Complexity detection: Low, Medium, High, Critical based on keywords
- Charges: Base service fee, Labour, Call-out/travel, Spare parts estimate, Platform fee, GST 18%
- Wraps the Razorpay Flutter SDK
- Handles payment success, failure, and external wallet events
- Test mode and live mode configuration
- CRUD operations on the
receiptsFirestore collection - Marks receipts as paid (digital via Razorpay or cash via mechanic confirmation)
- Real-time stream of user receipts
- Generates single-page A4 PDF receipts using the
pdfpackage - Includes MechResQ logo, itemised breakdown, payment info, GST note
- Share or save via system sheet using the
printingpackage
- Manages the
requestTrackingFirestore collection - Creates tracking documents on request submission
- Falls back to
requestscollection if tracking doc is missing (auto-creates) - Sends local notifications on status transitions
- Local notifications via
flutter_local_notifications - FCM integration via
firebase_messaging - Smart navigation on notification tap
- Typed convenience methods for each notification event
- Submit, update, and delete mechanic reviews
- Recalculates mechanic average rating on each submission
- Helpful/not-helpful vote system
- Phone number registration and login via SMS OTP
- OTP verification and session management
- Profile setup after first login
| Metric | Value |
|---|---|
| Screens | 35+ |
| Services | 15+ |
| Models | 7 |
| Localized Strings | 350+ per language |
| Supported Languages | 2 (English, Kannada) |
| Firebase Services | 4 (Auth, Firestore, Storage, Messaging) |
| Payment Gateway | Razorpay |
MechResQ uses a hazard-focused theme:
- Primary Color: High-visibility yellow (#FFD400)
- Accent Color: Orange (#FF8A00)
- Dark Theme: Full dark mode support with hazard palette
- Light Theme: Clean white background with yellow primary
- Material Design 3: Modern accessible UI components
- Dynamic Switching: Users can switch Light, Dark, or System in Settings
- Core service request and tracking features
- Real-time location tracking
- Bill screen with smart pricing engine
- Razorpay digital payments
- PDF receipt generation and download
- Multi-language support (English, Kannada)
- Push notifications with smart navigation
- User profile and vehicle management
- SOS emergency features
- Ratings and reviews system
- Request history with bulk delete
- Mechanic app (separate app for mechanics)
- Cash payment confirmation by mechanic
- Auto-trigger review screen after service completion
- Real GPS distance passed to billing
- FCM token saved to Firestore for server-push notifications
- Chat with Firebase Realtime integration
- Add more languages (Hindi, Tamil, Telugu)
- AI-powered issue diagnosis
- Video call support
- Subscription plans for mechanics
- Referral and promo code system
- Advanced analytics dashboard
This project is proprietary software. All rights reserved.
For support, email support@mechresq.com or open an issue in the repository.