Ionic 5 - Taxi Booking Platform with Firebase
  • Ionic 5 Taxi Complete Platform using Firebase - User, Driver Admin Apps
  • Why use this Starter
  • Setup and Deployment
    • Initial Dev Environment Setup
    • Running the App (Web Browser)
    • Deploying app as PWA
    • Building App on device
  • How to Use this Starter
    • Taxi Booking Complete Setup
    • Taxi User App - Setup
    • Taxi Driver App - Setup
    • Taxi Admin App - Setup
    • Testing Complete Platform
  • Platform Features
    • User App
    • Driver App
    • Admin App
  • Firebase Setup
    • New Firebase Project Setup
    • Firebase Integration Into User App
  • Extra
    • App Specific Requirements
    • Add More Features
    • FAQs
    • Firebase Setup (Ionic 4 Version)
    • Firebase Functions (Ionic 4 version)
      • Overview
      • Firebase Function in Code
      • How to Deploy Firebase Functions
Powered by GitBook
On this page
  • Login/Sign up along with social logins
  • OTP and Forgot password page
  • Home page for taxi booking
  • Google auto complete API integration
  • Select cab type feature
  • Change payment page
  • Estimate fare page
  • Edit profile page
  • History page with details of past ride
  • Add card page
  • Help page
  • Booking confirmation page
  • Google map integration
  • Code Structure
  • Plugins

Was this helpful?

  1. Platform Features

User App

Check out User app pages and feature explanation

PreviousTesting Complete PlatformNextDriver App

Last updated 5 years ago

Was this helpful?

This Taxi / cab booking App is made by expert UI developers to provide a great app UI for your own taxi booking app. Now you can start your own taxi app with these functionalities. This is a great starting point for app development, as more than half the work is done here. All pages and components are set. Hence, all you need here is to integrate your back-end and feed in the data. This app has many features common with popular apps like , etc. You can also choose an of this app from our store‌

Login/Sign up along with social logins

‌

This page will check the authentication of user from Firebase‌

OTP and Forgot password page

‌

OTP flow is not functional for this app and you can make it working for that you have to remove firebase auth and create your own auth because firebase doesn't support OTP authentication currently.‌

Home page for taxi booking

with option for manually selecting pickup and destination location or get user current location

​‌

Google auto complete API integration

‌

In This page we will get location from Google API.‌

Select cab type feature

Cab types showing here is static you can make it dynamic by making new table is Firebase DB‌

Change payment page

‌

All payment Type is also static here you can make it dynamic by adding New Table in Firebase DB.‌

Estimate fare page

‌

Fare estimate Showing here is also Static you camn add your own API for calculating Fare Estimate Here‌

Edit profile page

‌

This page is not connected To firebase for make it working you have to add new columns In user DB which we have it already‌

History page with details of past ride

‌

History Page is dynamic here and connected to firebase as well.‌

Add card page

‌

Add card page just adding card in Your local variables not In Firebase DB. For make it working you have to make new Table in Firebase DB named Card and link it to the used DB with his ID.‌

Help page

‌

Booking confirmation page

‌

Also, if you want to implement a push notification feature for booking flow, you can follow our detailed tutorial for the same

Google map integration

with route shown between origin and destination

‌

Here we are using AGM for showing route in the map

Code Structure

Cab app Code Structure

​‌

The src/app/pages folder contains the code related to‌

  • Login - Email login

  • Signup - Email signup

  • Pickup - Take Pickup location

  • Drop Off - Take Drop location

  • Profile - Edit Driver Profile

  • Customer -Request - Ride requests show

  • Fare Estimation - Calculate the fare estimation according to Travelling Distance

  • Booking Conformation - Conform the Booking

  • History - Show Previous Rides

‌

These files use service data and functions provided in src/app/‌

  • auth.service.ts - For Authentication functions

  • ionCab.service.ts - For all the api calls here

Plugins

  • Geolocation

We have written this code for getting driver Current location

public getcurrentLocations() {
    this.geolocation
      .getCurrentPosition()
      .then(resp => {
        this.lat = resp.coords.latitude;
        this.lng = resp.coords.longitude;
        const obj = {};
        obj['lat'] = this.lat;
        obj['lng'] = this.lng;
        this.locationOrigin = obj;
        const uid = this.userId.uid;
        this.fire.updateData(obj, uid);
      })
      .catch(err => {
        console.error('Error getting location', err);
      });
  }
  • Googlemaps

We have written this code for access google map functionality

    const geocoder = await new google.maps.Geocoder();
      const latlng = await new google.maps.LatLng(lat, lng);
      const request = { latLng: latlng };

      await geocoder.geocode(request, (results, status) => {
        if (status === google.maps.GeocoderStatus.OK) {
          const result = results[0];
          console.log(result);
          const rsltAdrComponent = result.address_components;
          console.log(rsltAdrComponent);
          if (result !== null) {
            if (rsltAdrComponent[0] !== null) {
              this.block = rsltAdrComponent[0].long_name;
              this.street = rsltAdrComponent[2].short_name;
              console.log(this.street);
              this.building = rsltAdrComponent[1].short_name;
              console.log(this.building);
            }
            if (this.serviceProvider.flag === true && this.serviceProvider.pickup !== 'India') {
              this.serviceProvider.showpickup = this.block + ' ' + this.street + ' ' + this.building;
            } else if (this.serviceProvider.pickup !== 'India') {
              this.serviceProvider.showdestination = this.street + this.building;
            }
          } else {
            alert('No address available!');
          }
        }
      });

You can learn Geolocation and geocoding in detail in our

For More Information about this plugin check out ​‌

For More Information about this plugin check out ​

Implement push notification in Ionic apps
Ionic 4 tutorial here
this link
this link
Uber
Ola
Ionic 3 version