Peer-to-Peer Ridesharing Web App built using React and Ethereum smart contracts. The purpose of this application is to provide a platform for users to share rides with others, allowing them to save costs and reduce their environmental impact. The app also incorporates features such as hosting rides and creating votes to adjust the overall fare price.
You can live interact with the website https://peer-to-peer-ridesharing.vercel.app/.
The "Book Ride" feature enables users to find and book rides shared by other users. Users can specify their desired pickup and drop-off locations, along with the preferred date. The app will display a list of available rides matching the criteria, and users can book a seat in the desired ride. It integrates Google Maps API to tell you about the distance and estimated price you have to give for reaching your destination.
The "Host Ride" feature allows users to become ride hosts and offer their available seats to others. Users can specify the pickup and drop-off locations, date, time, and the number of available seats in their vehicle. Interested users can book these available seats.
The "Create Vote" feature enables users to initiate a voting process to increase or decrease the overall fare price for a specific ride. Users can create a vote, specify the reason for the fare adjustment, and invite other participants to vote. Once the voting period ends, the system will calculate the outcome based on the votes received.
To set up the Peer-to-Peer Ridesharing Web App locally, please follow these steps:
git clone https://github.com/mecskyverse/Peer-To-Peer-Ridesharing.git
Install dependencies using a package manager such as npm or yarn:
cd Peer-To-Peer-Ridesharing
npm install
or
yarn install
npm run dev
Access the application in your browser at http://localhost:5173.
Connect Your Metamask wallet with the app make sure you are on sepolia testnet.
Explore the available rides by using the "Book Ride" feature.
To offer a ride, use the "Host Ride" feature and provide the necessary details.
Engage in the voting process by using the "Create Vote" feature when necessary.
Manage your bookings, host rides, and active votes through the corresponding sections of the app.
Contributions are welcome! If you would like to contribute to this project, please follow these steps:
Fork the repository. Create a new branch for your contribution. Make the necessary changes and commit them. Push your changes to your forked repository. Submit a pull request describing your changes. Please make sure to follow the code style guidelines and write clear commit messages.
This project is licensed under the MIT License.
We would like to express our gratitude to the following resources and libraries that made this project possible:
React Ethereum Hardhat ethers.js
If you have any questions, suggestions, or feedback, please feel free to reach out to Twitter