This is an intermediate level guided course where you will learn to build a decentralized marketplace similar to eBay. You will build a smart contract where any one can list their products they like to sell in the marketplace. Consumers can browse the products and purchase products. You will also implement an Escrow service which is used by buyers and sellers to protect their transactions and guarantee payment and delivery. This application will be built using the Solidity programming language using the Truffle framework, Javascript and HTML/CSS. IPFS will be used to store images and large text and MongoDB will be used as an offchain solution to implement the product search functionality. Few key libraries that will be used to build the application include web3js, ipfs-api and ethereumjs-util.
Prerequisites
This is an intermediate Ethereum development course. Students are expected to have completed our free Ethereum primer course and at least our free beginner course.
Course Chapters
-
2.1. Truffle project setup
-
2.2. Declare Contract Variables
-
2.3. Add and Retrieve Contract code
-
2.4. Test in Truffle Console
-
2.5. Display products in frontend
-
2.6. Add product from frontend
-
3.1. Product buy function implementation
-
3.2. Test product buy in Truffle console
-
3.3. Build product details web page
-
3.4. Buy from the web page
-
5.1. What is Escrow and why do we need it?
-
5.2. Escrow smart contract implementation
-
5.3. Integrate escrow contract in to Ecommerce Store
-
5.4. Test Escrow Functionality
-
5.5. Escrow frontend implementation
-
6.1. Why Offchain Solution?
-
6.2. Off Chain Architecture
-
6.3. MongoDB Setup
-
6.4. Mongoose Schema
-
6.5. NodeJS Server
-
6.6. Solidity Events
-
6.7. Listen to Events
-
6.8. Save to MongoDB
-
6.9. Inspect MongoDB
-
6.10. Products API
-
6.11. Render Products
-
7.1. Exercises
-
7.2. Further Reading