A local marketplace (like OLX) to buy and sell pre-owned items, but on Web3.
Table of Contents
dopeShop is the Web3 alternative of the famous local marketplace OLX. It is basically a very basic eCommerce platform that gives any user to buy and sell products using a Web3 enabled browser and a wallet. There is a plethora of scope for improvement and features to be added.
Following technologies and libraries are used for the development of this project.
To setup the project locally follow the steps below
- Node.js
- Ganache
- Metamask Wallet Extension or a Web3 browser like Brave
To set this up in the local repository:
- Fork and clone the project to your local system
- Copy the commands below to install the dependencies:
npm i -g truffle
npm run client:install
npm run truffle:install
-
Now, start a local Ethereum blockchain network on your system using Ganache. Ganache provides you with 10 testing accounts each with 100 ETH.
-
Obtain Infura API Key and API Secret for IPFS from Infura Dashboard, and create a dedicated gateway for your project. Set the environment variables in
client/.env
file. -
Then, copy the following commands to deploy the smart contracts to the local Ethereum blockchain and start the React app:
npm run truffle:migrate
npm run client:start
-
Set up Metamask to connect to the local blockchain created by Ganache(i.e. http://localhost:7545/)
-
Now, obtain the private keys of some of the accounts from Ganache and import the accounts into Metamask wallet.
-
You're ready to go. Visit http://localhost:3000/ to check out dopeShop