Order Tracking & Delivery Dispatching

UberEats Clone Working Process:

  • The customer places a new order
  • The restaurant accepts/rejects the new order
  • If the restaurant accepts the order, it is assigned to a driver that is available nearby the restaurant.
  • The driver can decide to either accept or reject the order
  • If the driver accepts the order, he is assigned to pick up and drop delivery
  • The driver reaches the restaurant to pick up the order. Once the order is picked, the driver updates the status in the app for the customer
    After delivery, the driver can mark the order as completed on the driver app
  • If the driver rejects the order, the dispatch starts again from a driver available nearby.

Customers can track all the order delivery status on their delivery app. App uses Flutter code for making most of the order updates mentioned above.

But there is some difference in the delivery system as it works on the backend side, it will have access to all available nearby drivers and restaurants.

The delivery system is implemented via Firebase Function. You will be able to find this delivery function in the downloaded archive, under Firebase/functions/products/delivery.js. Have a look at it to understand the delivery system closely.

The delivery system is implemented via Firebase Function. You will be able to find this delivery function in the downloaded archive, under Firebase/functions/products/delivery.js. Have a look at it to understand the delivery system closely.

To operate your Firebase backend you’ll need to follow these steps.
Step 1: Install Firebase Tools

If you haven’t used Firebase functions before, you need to install this in the command line:
npm install -g firebase-tools

Step 2: Deploy the Firebase dispatch function

From the download archive locate the Firebase folder and run:
cd ~/Downloads/YOUR_PATH_TO_FIREBASE_FOLDER
npm install & firebase deploy

When it has been deployed, you’ll be able to find this function in your Firebase Console, under the Function tab.

It is even possible for you to inspect the logs of the delivery order, which will be shown for each order delivery that is in progress.