Lisk.js 2021 officialy announced. Read more.  

Building the Lisk Ride Project

  • By Jean-Michel Alandou in Apps
  • 16 Dec 2020
  • 4 min read

Introduction

LiskRide is a community platform that connects drivers with free seats to passengers looking for a ride in the same direction. We aim to remove intermediaries and allow direct transactions.

This project is part of the sharing economy and takes advantage of the Lisk blockchain application platform, and has been developed as a progressive web app based on Reactjs.

 

How does it work?

In our ecosystem there are two types of participants:

  • The driver
  • The passenger

Firstly, the prerequisites for the driver are explained, followed by the passenger.

 

Common passenger and driver prerequisites

 

Authentication

 

Building the Lisk Ride Project

 

Building the Lisk Ride Project

 

To use the LiskRide app, the driver and passenger will need to create their accounts via the authentication page and keep the passphrase secure. The passphrase and address are automatically generated on the "Register" page.

If users already have an account, they will need to log in through the Login page.

 

Transfer

 

Building the Lisk Ride Project

 

Once logged in, on the Transfer page, users will be able to collect tokens to use the platform. It should be noted that this transfer is made for the POC.

 

 

The driver requirements prerequisites

The following steps are required by the driver:

 

Publication of the travel plan

 

Building the Lisk Ride Project

 

The driver can add their travel plan by choosing the city of destination, the city of departure, the date of departure, the fee per seat, and the number of available seats.

 

 

Reservation of passengers and securing of funds

 

Building the Lisk Ride Project

 

When a passenger books the journey, the contact information is sent to the driver. In addition, funds are withdrawn from the passenger and deposited in the travel account to guarantee the passenger is able to pay for the journey.

 

 

Travel

 

Building the Lisk Ride Project

 

When the driver meets the passenger, they must then agree to start the journey together. This action must be done in the presence of both parties. This will unblock the transfer of funds to the driver’s account.

 

 

Receipt of payment

 

Building the Lisk Ride Project

 

The driver will be able to recover the funds and evaluate the passenger via a withdrawal interface accessible through his trip list. In the future, the withdrawal will be possible after a period of 24 hours.

 

 

The passenger requirements prerequisites

The following steps are required by the passenger:

 

Finding a trip to the desired destination

 

Building the Lisk Ride Project

 

To search for a planned travel journey, the passenger simply has to enter their destination, their city of departure, and the corresponding date. It will then be possible to choose a route from the results obtained. If more information is required, they can contact the driver before booking.

The search was made possible by the use of the extended API by Moosty: @moosty/lisk-extended-api.

 

 

Payment and securing of funds

 

Building the Lisk Ride Project

 

The passenger books their trip and will be automatically debited for the corresponding amount. These funds will be deposited in the travel account.

 

 

Travel

 

Building the Lisk Ride Project

 

At the request of the driver, the passenger must agree to begin the journey. This action must be done in the presence of both participants. The transfer of funds to the driver's account can then be made.

 

 

Custom Transactions

LiskRide uses the following custom transactions:

 

Type

Name

Description

30

AddAccountInfoTransaction

Add complementary information to the driver’s account

31

RegisterTravelTransaction

Create a travel journey as an account

32

BookTravelTransaction

Add the passenger to the travel account and their corresponding funds

33

StartTravelTransaction

Allow the driver to rate the passenger and withdraw the funds

34

EndTravelTransaction

Transfer funds to the driver's account, rate the passenger, and remove the passenger from the travel account

 

Conclusion

As a JavaScript developer, it was a pleasant experience to work with the Lisk SDK. Indeed, the use of JavaScript is easily interfaced with other web technologies, especially with my front-end in Reactjs.

I did not encounter any particular difficulty with both the debug and the deployment of the application, which was very advantageous.

I also appreciated the custom transactions which allowed me to focus on the business side of my project.

Now that my proof of concept is developed, the next steps are as follows:

  • Share with the community
  • Improve the business logic
  • Improve the user interface to take into account UX experiences related to the Lisk blockchain
  • Improve the travel search system
  • Add a dispute management system
  • Build a team

In the near future, LiskRide could be an alternative to existing carpooling applications.

 

Resources

Desktop Web Demo: https://boring-banach-a0e04c.netlify.app

Mobile Web Demo: http://lisk-ride.com

Source Code: https://github.com/blackjmxx/LiskRideApp

 

Disclaimer: This blog post was written by our community member, Blackjmxx (LinkedIn profile) as part of his participation in the Lisk Builders program.

Jean-Michel Alandou

Jean-Michel Alandou is a full stack developer who studied intelligent and communicating systems at the University of Cergy Pontoise. His passion for new technologies gave him the opportunity to win several hackathons, including one that allowed him to co-founded Universal Voucher. Currently, he is interested in and developing projects related to Blockchain.