Blockchain-Powered Ride Booking: Introducing Crypto Commute 🚗
Introduction
Hi! My name is Shah, I'm a web developer, a web3 enthusiast (Yes, I know that's a cliche 😂) and I like to design & develop cool things for the web.
So, What's Crypto Commute?🤔 -
It's a decentralized taxi-booking web application or a taxi dApp 🚗 created on Ethereum platform using the blockchain technologies like Solidity (A blockchain programming language), web3.js, ethers.js, Alchemy and few more stuffs. Basically it's Uber with decentralization and crypto currency.
Before learning more about the project, let me first briefly explain the keywords I'll be using here to define my project -
Keywords
Decentralization - Users gain data sovereignty, with no singular entity monopolizing the web's infrastructure or user information.
Web3🌐 - The next evolution of the internet, incorporating decentralization and blockchain technology. Unlike Web1's read-only interface and Web2's interactive platforms (e.g., Instagram, YouTube), Web3 enables a decentralized internet with no intermediaries between users.
Crypto Currency🪙 - Digital money that lives on the internet. Instead of physical coins or bills, it's made using computer code & can be used to buy things online or traded for other types of money. The very popular example being Bitcoin.
Blockchain🔗 - A digital ledger📒 that records transactions in a secure and transparent way. It consists of a chain of blocks, each containing a list of transactions, and is maintained by a decentralized network of computers.
Ethereum - A decentralized platform enabling the creation of applications with smart contracts, allowing code to automatically execute agreements and transactions, powered by its native cryptocurrency called Ether (ETH).
Solidity - A programming language used to write smart contracts on blockchain platforms like Ethereum, enabling the creation of decentralized applications.
Smart Contract 📜 - Digital agreements that automatically execute and enforce rules when specific conditions are met, operating on blockchain technology without the need for intermediaries.
Now that we're done with our basic terminologies, let me tell you about the existing issues in the ride-hailing industry
Existing System Issues
The figure illustrates the typical ride-hailing process: the customer selects a destination and pickup point, the driver gets notified, picks up the passenger, drops them off, and receives payment. About 75% of the fare goes to the driver, while the ride-booking company takes a 25% commission.
Source? trust me bro (nah, just kidding)
Centralized Control:
Centralization can lead to issues of accountability, lack of transparency, and potential exploitation of drivers.Fixed Pricing Model:
This can lead to dissatisfaction among users who may find prices high during peak times, and drivers may feel it's unfair during periods of high demand.Driver Earnings and Job Security:
A bidding system should carefully balance fare negotiation to ensure fair compensation for drivers, as consistently low bids might negatively affect their income.
The Proposed System
The illustration demonstrates how the customer selects a destination and pickup point, which is sent to nearby drivers. A driver picks up the customer and drops them off at their destination. Payment is made using cryptocurrencies, with 90% of the fare going to the driver and 5% to the community fund, ensuring lower fees and higher driver earnings.
Decentralization:
In Crypto Commute, decentralization means no middleman! The blockchain handles everything, from ride requests to payments, with all transactions being transparent and tamper-proof. Everyone in the network plays a part—so it’s all for one, and one for all 😉
Transparent pricing:
Crypto Commute keeps pricing crystal clear with open-source algorithms. Fares are based on distance, time, and demand—no surprise surge pricing or hidden fees. You see the fare upfront before booking, so no last-minute shocks.
Enhanced Privacy:
Crypto Commute keeps privacy in check! With blockchain encryption, the personal details and ride history are stored securely, accessible only to those with the right keys.
Methodology & Working 🛠️
Blockchain Layer
The blockchain layer powers the Crypto Commute platform using Ethereum, with smart contracts handling key functions like ride booking, payment, and driver allocation. User actions, such as requesting a ride, trigger blockchain transactions. The UI uses APIs or web3.js to interact with Ethereum, executing smart contract functions and recording activities. This setup ensures transparency and security with an immutable ledger that supports transaction verification and auditing.
Payment Layer
After a ride, the payment layer settles transactions between riders and drivers. Users use digital wallets like MetaMask to securely sign and broadcast payments on the Ethereum network. The smart contract handles fund transfers from the rider’s wallet to the driver’s wallet. To boost security, the platform may integrate secure payment gateways for encrypted communication with payment processors.
Database Layer
The database layer stores essential user and driver data in a centralized repository, using MongoDB to handle user, driver, and vehicle details. MongoDB's document-oriented model provides flexibility and scalability for unstructured data. User and driver profiles, including personal information and preferences, are managed in MongoDB collections. To ensure optimal performance, data integrity, and privacy compliance, practices like indexing, sharding, and replication are employed.
Tools & Tech 🖥️
TypeScript ✍️
A superset of JavaScript that adds static typing. Enhances code quality and maintainability by catching errors at compile time.ReactJS ⚛️
A JavaScript library for building user interfaces, developed by Facebook. Features a component-based architecture and virtual DOM for efficient, dynamic web applications.Chakra UI 🧩
A modular and accessible component library for React.js. Provides customizable and composable UI components for consistent and responsive UIs.Nest.js 🏠
A Node.js framework for building efficient, reliable, and scalable server-side applications. Built with TypeScript for a structured development experience.MongoDB 📦
A NoSQL database management system known for its flexibility, scalability, and ease of use. Stores data in a document-oriented format.Socket.io 🔌
A JavaScript library for real-time, bidirectional communication between web clients and servers. Built on the WebSocket protocol for instant data exchange.Web3.js 🌐
A JavaScript library for interacting with the Ethereum blockchain. Supports smart contract interaction, transaction sending, and data querying for decentralized applications (DApps).Alchemy 🔮
A blockchain infrastructure platform offering tools and services for building, scaling, and managing decentralized applications (DApps) across various blockchain networks.Hardhat 🛠️
A development environment and testing framework for Ethereum smart contracts. Provides tools for writing, compiling, deploying, and testing smart contracts on the Ethereum blockchain.Google Maps API 🗺️
A collection of tools and services for integrating dynamic maps, location-based services, and geospatial data into web and mobile applications.
Conclusion ✨
This project is all about making ride-hailing better for everyone involved – passengers and drivers. By using Web3 and blockchain technology to shake things up in the transportation world. Also by spreading out control and making everything clear and fair, we're fixing some of the problems that people often face with apps like Uber or Ola.
We do this by changing how things are run behind the scenes. Instead of one company making all the decisions, we're letting the community have a say. This means fairer prices for passengers and better earnings for drivers.
Interested in learning more about the project?
Check this Project Report! 📒
Appendix
Here are few screenshots from the web dApp project
Project Partners -
Article by - Shah Abul Kalam A K
Subscribe to my newsletter
Read articles from Shah Abul Kalam A K directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
Shah Abul Kalam A K
Shah Abul Kalam A K
Hi, my name is Shah and I'm learning my way through various fascinating technologies.