{"id":21361117,"url":"https://github.com/kaymen99/web3-ecommerce-dapp","last_synced_at":"2025-07-13T02:32:02.041Z","repository":{"id":143361520,"uuid":"476877533","full_name":"kaymen99/web3-Ecommerce-dapp","owner":"kaymen99","description":"Amazon like e-commerce Dapp with open sales, customized stores, auctions system and product reviews built on the EVM blockchains","archived":false,"fork":false,"pushed_at":"2023-06-05T20:07:08.000Z","size":1083,"stargazers_count":13,"open_issues_count":0,"forks_count":11,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-11-22T06:08:28.524Z","etag":null,"topics":["auctions","blockchain","brownie","dapp","e-commerce-platform","ethersjs","marketplace","reactjs","smart-contracts","solidity","stores"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kaymen99.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-04-01T21:49:40.000Z","updated_at":"2024-10-20T14:34:33.000Z","dependencies_parsed_at":"2023-07-11T02:16:35.479Z","dependency_job_id":null,"html_url":"https://github.com/kaymen99/web3-Ecommerce-dapp","commit_stats":null,"previous_names":["kaymen99/web3-ecommerce-dapp"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kaymen99%2Fweb3-Ecommerce-dapp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kaymen99%2Fweb3-Ecommerce-dapp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kaymen99%2Fweb3-Ecommerce-dapp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kaymen99%2Fweb3-Ecommerce-dapp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kaymen99","download_url":"https://codeload.github.com/kaymen99/web3-Ecommerce-dapp/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225850259,"owners_count":17534067,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["auctions","blockchain","brownie","dapp","e-commerce-platform","ethersjs","marketplace","reactjs","smart-contracts","solidity","stores"],"created_at":"2024-11-22T06:08:39.790Z","updated_at":"2024-11-22T06:08:41.042Z","avatar_url":"https://github.com/kaymen99.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv id=\"top\"\u003e\u003c/div\u003e\n\n\u003c!-- ABOUT THE PROJECT --\u003e\n## Decentralized Marketplace Dapp V2\n\n \n \u003cp align=\"center\"\u003e\n  \u003cimg alt=\"Dark\" src=\"https://user-images.githubusercontent.com/83681204/161353432-f63bd35b-14f6-4f49-8b53-a19599272af8.png\" width=\"100%\"\u003e\n\u003c/p\u003e\n\nThis is my second implementation of a decentralized E-commerce marketplace built on top of EVM-compatible Blockchains such as Ethereum and Polygon. The previous dapp only allowed users to buy and sell single items without quantity. However, this new version is much more advanced and includes a wide range of features. Users can now create their own stores with customized branding and sell products with limited or unlimited quantities. Additionally, buyers have the ability to review the products they purchase. I have also introduced an Auction market, inspired by popular NFT marketplaces like OpenSea, however my implementation is more generalized and accepts a variety of products. It's important to note that all payments within the marketplace remain with cryptocurrency tokens.\n\n\u003cp align=\"center\"\u003e\n  \u003cimg alt=\"Dark\" src=\"https://user-images.githubusercontent.com/83681204/161353476-c84cc1b8-dce9-4d02-afd6-e4b24d325528.png\" width=\"100%\"\u003e\n\u003c/p\u003e\n\n### Built With\n\n* [Solidity](https://docs.soliditylang.org/)\n* [Brownie](https://eth-brownie.readthedocs.io)\n* [React.js](https://reactjs.org/)\n* [ethers.js](https://docs.ethers.io/v5/)\n* [web3modal](https://github.com/Web3Modal/web3modal)\n* [material ui](https://mui.com/getting-started/installation/)\n\n\n\u003cdetails\u003e\n  \u003csummary\u003eTable of Contents\u003c/summary\u003e\n  \u003col\u003e\n    \u003cli\u003e\n      \u003ca href=\"#getting-started\"\u003eGetting Started\u003c/a\u003e\n      \u003cul\u003e\n        \u003cli\u003e\u003ca href=\"#prerequisites\"\u003ePrerequisites\u003c/a\u003e\u003c/li\u003e\n        \u003cli\u003e\u003ca href=\"#installation\"\u003eInstallation\u003c/a\u003e\u003c/li\u003e\n      \u003c/ul\u003e\n    \u003c/li\u003e\n    \u003cli\u003e\n      \u003ca href=\"#how-it-works\"\u003eHow it Works\u003c/a\u003e\n      \u003cul\u003e\n        \u003cli\u003e\u003ca href=\"#main-market\"\u003eMain Market\u003c/a\u003e\u003c/li\u003e\n        \u003cli\u003e\u003ca href=\"#the-store\"\u003eThe Store\u003c/a\u003e\u003c/li\u003e\n        \u003cli\u003e\u003ca href=\"#auction-market\"\u003eAuction Market\u003c/a\u003e\u003c/li\u003e\n      \u003c/ul\u003e\n    \u003c/li\u003e\n    \u003cli\u003e\n      \u003ca href=\"#how-to-use\"\u003eHow to Use\u003c/a\u003e\n      \u003cul\u003e\n        \u003cli\u003e\u003ca href=\"#scripts\"\u003eScripts\u003c/a\u003e\u003c/li\u003e\n        \u003cli\u003e\u003ca href=\"#testing\"\u003eTesting\u003c/a\u003e\u003c/li\u003e\n        \u003cli\u003e\u003ca href=\"#front-end\"\u003eFront End\u003c/a\u003e\u003c/li\u003e\n      \u003c/ul\u003e\n    \u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#contact\"\u003eContact\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#license\"\u003eLicense\u003c/a\u003e\u003c/li\u003e\n  \u003c/ol\u003e\n\u003c/details\u003e\n\n\n\u003c!-- GETTING STARTED --\u003e\n## Getting Started\n\n### Prerequisites\n\nPlease install or have installed the following:\n* [nodejs and npm](https://nodejs.org/en/download/) \n* [python](https://www.python.org/downloads/)\n* [MetaMask](https://chrome.google.com/webstore/detail/metamask/nkbihfbeogaeaoehlefnkodbefgpgknn) Chrome extension installed in your browser\n\n### Installation\n\n1. Installing Brownie: Brownie is a python framework for smart contracts development,testing and deployments. It's quit like [HardHat](https://hardhat.org) but it uses python for writing test and deployements scripts instead of javascript.\n   Here is a simple way to install brownie.\n   ```\n    pip install --user pipx\n    pipx ensurepath\n    # restart your terminal\n    pipx install eth-brownie\n   ```\n   Or if you can't get pipx to work, via pip (it's recommended to use pipx)\n    ```\n    pip install eth-brownie\n    ```\n   Install [ganache-cli](https://www.npmjs.com/package/ganache-cli): \n   ```sh\n    npm install -g ganache-cli\n    ```\n   \n3. Clone the repo:\n   ```sh\n   git clone https://github.com/kaymen99/MarketPlace-Dapp-V2.git\n   cd MarketPlace-Dapp-V2\n   ```\n3. Install Ganache:\n   Ganache is a local blockchain that run on your machine, it's used during development stages because it allows quick smart contract testing and avoids all real Testnets problems. \n   You can install ganache from this link : https://trufflesuite.com/ganache/\n   \n   Next, you need to setup the ganache network with brownie :\n   ```sh\n   brownie networks add Ethereum ganache-local host=http://127.0.0.1:7545 chainid=5777\n   ```\n4. Set your environment variables\n   To be able to deploy to real testnets you need to add your PRIVATE_KEY (You can find your PRIVATE_KEY from your ethereum wallet like metamask) and the infura project Id (just create an infura account it's free) to the .env file:\n   ```\n   PRIVATE_KEY=\u003cPRIVATE_KEY\u003e\n   WEB3_INFURA_PROJECT_ID=\u003c\u003c YOUR INFURA PROJECT ID \u003e\u003e\n   ```\n   You can choose to use ethereum testnets like rinkeby, Kovan or any other evm compatible testnet.\n   You'll also need some eth in the testnet. You can get it into your wallet by using a public faucet. \n\n5. As infura recently removed its free IPFS gateway i used `web3.storage` api for storing data into IPFS, this api is as simple as infura it requires the creation of a free account and a new api token which you can do [here](https://web3.storage), when you finish add your api token into the `src/utils/ipfsStorage.js` file:\n   ```js\n    const web3storage_key = \"YOUR-WEB3.STORAGE-API-TOKEN\";\n   ```\n   \n\u003cp align=\"right\"\u003e(\u003ca href=\"#top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\n\u003c!-- Working EXAMPLES --\u003e\n## How it Works\n\n### Main Market\n\nThis is the core of the old version [marketplace V1](https://github.com/Aymen1001/MarketPlace-dapp) and it's made for single items purchase , User can add a product by providing the product name, description, price in $ and image.\n\n![Capture d’écran 2022-03-03 à 22 36 53](https://user-images.githubusercontent.com/83681204/156660595-9432f950-941d-465f-ad69-bb0edaad32b7.png)\n\nThe platform ensures a good interaction between the seller and the buyer by deviding the purchase process (product state) into 4 steps:\n  \u003cul\u003e\n    \u003cli\u003e\u003cb\u003eIn Sale:\u003c/b\u003e The first step when a seller list it's product on the market \u003c/li\u003e\n    \u003cli\u003e\u003cb\u003ePending:\u003c/b\u003e When a product is bought the amount paid is locked in the smart contract and buyer waits for seller to sent the product \u003c/li\u003e\n    \u003cli\u003e\u003cb\u003eSent:\u003c/b\u003e The seller sends the product and waits for the buyer confirmation\u003c/li\u003e\n    \u003cli\u003e\u003cb\u003eSold:\u003c/b\u003e The buyer confirms the recieval and the funds are transfered to the seller \u003c/li\u003e \n  \u003c/ul\u003e\n \nAll this steps can be performed on the product page: \n\n\n\u003ctable\u003e\n  \u003ctr\u003e\n     \u003ctd style=\"text-align:center;\"\u003eSeller Point of view \u003c/td\u003e\n     \u003ctd style=\"text-align:center;\"\u003eBuyer Point of view \u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd valign=\"top\"\u003e\u003cimg src=\"https://user-images.githubusercontent.com/83681204/156660145-aacb1ff4-2ba3-44d5-8bb9-87c927571b6b.png\"\u003e\u003c/td\u003e\n    \u003ctd valign=\"top\"\u003e\u003cimg src=\"https://user-images.githubusercontent.com/83681204/156660202-5bbb40db-ccf6-4a9f-88eb-3b407eca0211.png\"\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n \u003c/table\u003e\n\n\n### The Store\n\nThe dapp enables sellers to create their own order based stores, They can add limited and unlimited quantity products. \n\nStore Page:\n\n\u003cimg src=\"https://user-images.githubusercontent.com/83681204/161355217-4bebbe79-9a28-454d-8249-6db70213ce22.png\"\u003e\n\n\u003cbr/\u003e\n\nSeller Dashboard:\n\n\u003cimg src=\"https://user-images.githubusercontent.com/83681204/161355756-faf21a74-6a5e-4cb3-af3e-01400bd273ff.png\"\u003e\n\n\nEach seller willing to create a new store must provide a name and the store logo:\n\n\u003cp align=\"center\"\u003e\n  \u003cimg alt=\"Dark\" src=\"https://user-images.githubusercontent.com/83681204/161355090-cced48d8-d6f0-444e-a3c1-af8f62c9d698.png\" width=\"100%\"\u003e\n\u003c/p\u003e\n\nOn the product page you can find all details regarding the product(seller, quantity, price,...) and the reviews posted by previous buyers,\nWhen an order is created it goes through 3 main states: \n\u003cul\u003e\n  \u003cli\u003e\u003cb\u003ePENDING:\u003c/b\u003e just created and waiting for seller acceptance\u003c/li\u003e\n  \u003cli\u003e\u003cb\u003eSENT:\u003c/b\u003e product sent and waiting for buyer recieval confirmation\u003c/li\u003e\n  \u003cli\u003e\u003cb\u003eCOMPLETED:\u003c/b\u003e The order is complete so seller recieve payment and buyer can leave a review \u003c/li\u003e    \n\u003c/ul\u003e\n\n![store-product-page](https://user-images.githubusercontent.com/83681204/161357125-2a1cb716-be24-4382-8708-23d930afc983.png)\n\n### Auction Market\n\nUser can start an auction for any type of products by providing name, description, starting price, auction duration (in hours), item image.\nBidders can offer an initial bid and outbid if necessary without having to withdraw their fund on each bid, the highest bidder will be determined after the end of the auction clock\n\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003ctd valign=\"top\"\u003e\u003cimg src=\"https://user-images.githubusercontent.com/83681204/161357638-e10c63c8-3f10-44ad-a8a3-34d492a6d2c0.png\"\u003e\u003c/td\u003e\n    \u003ctd valign=\"top\"\u003e\u003cimg src=\"https://user-images.githubusercontent.com/83681204/161357676-ebe2be3c-9922-4d1d-9d18-6e4291536d0f.png\"\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n \u003c/table\u003e\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\n\u003c!-- USAGE EXAMPLES --\u003e\n## How to Use\n\n    \n### Scripts\n\n   In the MarketPlace-Dapp-V2 folder you'll find a directory scripts, it contain all the python code for deploying your contracts and also some useful functions\n\n   The reset.py file is used to remove all previous contracts deployments from build directory:\n   ```sh\n   brownie run scripts/reset.py\n   ```\n   The deploy.py file allow the deployment to the testnet/local-network:\n   ```sh\n   brownie run scripts/deploy.py --network=ganache-local\n   ```\n   The update_front_end.py is used to transfer all the smart contracts data (abi,...) and addresses to the front end in the artifacts directory:\n   ```sh\n   brownie run scripts/update_front_end.py\n   ```\n   \n   After running this 3 cammands, the MarketPlace contract is now deployed and is integrated with the front end\n   \n \u003cp align=\"right\"\u003e(\u003ca href=\"#top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n  \n ### Testing\n\n   In the MarketPlace-Dapp-V2  folder you'll find a directory tests, it contain all the python code used for testing the smart contract functionalities\n   \n   You can run all the tests by :\n   ```sh\n   brownie test\n   ```\n   Or you can test each function individualy:\n   ```sh\n   brownie test -k \u003cfunction name\u003e\n   ```\n   \n\u003cp align=\"right\"\u003e(\u003ca href=\"#top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n   \n### Front-end\n   \n   The user interface of this application is build using React JS, it can be started by running: \n   ```sh\n   cd front-end\n   yarn\n   yarn start\n   ```\n   It uses the following libraries:\n      \u003cul\u003e\n        \u003cli\u003e\u003cb\u003eEthers.js:\u003c/b\u003e used as interface between the UI and the deployed smart contract\u003c/li\u003e\n        \u003cli\u003e\u003cb\u003eWeb3modal:\u003c/b\u003e for conecting to Metamask\u003c/li\u003e\n        \u003cli\u003e\u003cb\u003eipfs-http-client:\u003c/b\u003e for connecting  and uploading files to IPFS \u003c/li\u003e\n        \u003cli\u003e\u003cb\u003e@reduxjs/toolkit \u0026 redux-persist:\u003c/b\u003e for managing the app states (account, balance, blockchain) \u003c/li\u003e\n        \u003cli\u003e\u003cb\u003eMaterial UI:\u003c/b\u003e used for react components and styles \u003c/li\u003e    \n      \u003c/ul\u003e\n\n   \n\u003cp align=\"right\"\u003e(\u003ca href=\"#top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\n\u003c!-- Contact --\u003e\n## Contact\n\nIf you have any question or problem running this project just contact me: aymenMir1001@gmail.com\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\n\u003c!-- LICENSE --\u003e\n## License\n\nDistributed under the MIT License. See `LICENSE.txt` for more information.\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkaymen99%2Fweb3-ecommerce-dapp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkaymen99%2Fweb3-ecommerce-dapp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkaymen99%2Fweb3-ecommerce-dapp/lists"}