Skip to content

DevAlexandreCR/gorda-driver

Repository files navigation

Gorda Driver

Project Overview

Gorda Driver is the Android application for drivers in the Gorda ride platform. It lets drivers receive ride requests, track trips and manage their profile. The app uses Firebase for authentication, real-time updates and push notifications. Location is tracked in the background and Google Maps is used to navigate from pick up to destination. Ride requests can originate from WhatsApp and appear in the driver's queue via the backend.

Tech Stack

  • Kotlin
  • Android Jetpack (Navigation, ViewModel, LiveData)
  • Firebase (Auth, Realtime Database, Firestore, Storage, Messaging)
  • Google Play Services and Google Maps SDK
  • Retrofit and Gson
  • Glide / Picasso for images
  • Sentry for crash reporting

Getting Started

Requirements

  • Android Studio with Android SDK 24 or newer
  • Google Maps API key and Firebase project
  • Sentry DSN (optional)

Local setup

  1. Clone the repository.
  2. Copy local.properties.example to local.properties and fill the required keys. The template contains the variables used by the build such as MAPS_API_KEY and Firebase emulator hosts.
  3. Open the project in Android Studio and let it download the Gradle dependencies.
  4. Connect an Android device or start an emulator.
  5. Build and run from Android Studio or execute ./gradlew installDebug.

Production build

Run ./gradlew assembleRelease to generate a release APK or App Bundle. Configure signing information in your Gradle properties or via Android Studio.

API Usage

The app reads and writes data to Firebase Realtime Database and Firestore. It also uses the Google Maps Directions API through maps/MapApiService.kt. Provide your own credentials in local.properties.

Components

  • activity – Application entry points (StartActivity, MainActivity).
  • background – Foreground services for location, fees meter and notifications.
  • location – Location provider helpers.
  • maps – Google Maps helpers and Retrofit API for directions.
  • models – Kotlin data classes such as Driver and Service.
  • repositories – Interaction layer with Firebase.
  • services – Firebase initialization and network utilities.
  • ui – Fragments and ViewModels for the different screens.

WhatsApp Integration Flow

Clients can request a ride through WhatsApp. The backend processes the message and creates a Service record in Firebase, referencing the client via wp_client_id. Drivers receive a push notification and can accept or reject the request directly from the app.

White-label build

Add new brands using the brand flavor dimension (published flavor: redblanca / gorda.driver).

  1. Duplicate the sample brand folders: create app/src/<brand>/res plus app/src/<brand>/google-services.json (match the applicationId).
  2. Add app_name, navigation header strings, and any brand-only strings in app/src/<brand>/res/values/strings.xml.
  3. Drop brand icons/splash assets by overriding ic_launcher* (and optional splash) under app/src/<brand>/res/mipmap-* or drawable.
  4. Override colors/themes if needed via app/src/<brand>/res/values/colors.xml.
  5. Provide brand Firebase config in app/src/<brand>/google-services.json and matching FCM/OAuth keys in local.properties or CI secrets.
  6. In app/build.gradle, add a new productFlavors { <brand> { ... } } block with applicationId, manifest placeholders (deep links/OAuth), buildConfigField values (BASE_URL, SUPPORT_EMAIL, etc.), and a versionCode = brandOffset + baseVersion.
  7. (Optional) Add a signingConfig <brand> keyed from Gradle properties (<Brand>StoreFile, <Brand>StorePassword, <Brand>KeyAlias, <Brand>KeyPassword).
  8. Build with ./gradlew :app:bundle<Brand>Release (release signing auto-picks the matching signingConfig when present).
  9. Upload the generated AAB to the corresponding Play Console track; keep redblanca using applicationId=gorda.driver for continuity.

CI matrix hint: run a matrix over brand ∈ {redblanca,demo} and buildType ∈ {debug,release} to produce one AAB per brand and upload with brand-specific service-account credentials.

Contributing

  1. Fork the project and create your feature branch from master.
  2. Commit your changes with clear messages.
  3. Open a pull request describing your changes.

License

This repository does not contain an explicit license file. All rights are reserved by the original authors.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages