Blockchain-based eCommerce warranty system using NFTs
The objective is to replace the physical warranty and have block chain based warranty using NFT which will ensure
authenticity and security.
β Converting ownership authenticity and product warranty cards into decaying NFTs.π
β For instance, allow brands and retailers to introduce an NFT for each of their products, which allows customers to receive the physical product along with a digital version of it.π
β Customers can then use the digital NFT to verify the authenticity of their product, prove their ownership of their product, and transfer ownership of them upon resale.π―
β The brand/retailer should also be able to tie the digital NFT to its warranty program, allowing owners to trackrepairs and replacements to the original item.π€©
β Decay the NFT once the warranty is over.π₯Έ
β WE used the Polygon blockchain to deploy our solution and demo the final product as a web prototypeπ
git clone https://github.com/mollybeach/ecommerce_chain.git
cd nft-warranty-system
npm run install-all
npm start
- Hardhat
- Moralis
- Solidity
- Ethereum
Skill Test The goal of this test is to confirm you can integrate the smart contracts into backend. You have to add a new API into "server/index.js" named [Your Name]ApiTest. And you have to fetch some info on any pre-deployed or public smart contracts through your API. No need for any front-end to show the result. Just the result on the console is enough to show your work. Once you complete the test, you can send a short video to show your work.
- Add a new API into "server/index.js" named [Your Name]ApiTest.
- Fetch some info on any pre-deployed or public smart contracts through your API.
- No need for any front-end to show the result.
- Just the result on the console is enough to show your work.
βK to generate a command help me with the skill test
I'll help you create an API endpoint to fetch information from a smart contract. Here's how we can implement the skill test requirement: First, we'll need to add the ethers.js library to interact with smart contracts. Add it to the server directory: Bash ethers Here's an example implementation to add to server/index.js:
help me with the skill test
I'll help you create an API endpoint to fetch information from a smart contract. Here's how we can implement the skill test requirement: First, we'll need to add the ethers.js library to interact with smart contracts. Add it to the server directory: Bash ethers Here's an example implementation to add to server/index.js: index.js . This implementation:
- Creates a new GET endpoint /api/YourNameApiTest Connects to the Polygon Mumbai testnet Queries a USDC token contract for basic information (name, symbol, total supply) Logs the results to console and returns them as JSON To test it: Start your server Make a GET request to http://localhost:YOUR_PORT/api/YourNameApiTest Check your server console for the logged data You can modify this example to: Use a different network (Ethereum mainnet, other testnets) Query different smart contracts Call different contract methods Add more complex interactions Remember to: Replace "YourName" in the endpoint with your actual name Record a short video showing: The code implementation Making the API request The console output showing the contract data This demonstrates your ability to integrate smart contracts with a backend API, which is the main goal of the skill test.
repo_ecommerce/
βββ .git/
βββ client/
β βββ public/
β β βββ favicon.ico
β β βββ index.html
β β βββ logo192.png
β β βββ logo512.png
β β βββ manifest.json
β β βββ robots.txt
β βββ src/
β β βββ Assets/
β β β βββ Home/
β β β β βββ 1.png
β β β β βββ 2.png
β β β β βββ 3.png
β β β β βββ 4.png
β β β β βββ 5.png
β β β β βββ bag1.png
β β β β βββ bag2.png
β β β β βββ bagpacks.png
β β β β βββ hoddie2.png
β β β β βββ hoodie1.png
β β β β βββ hoodie2.png
β β β β βββ hoodies.png
β β β β βββ index.js
β β β β βββ shoe1.png
β β β β βββ shoe2.png
β β β β βββ sneakers.png
β β β β βββ tshirt1.png
β β β β βββ tshirt2.png
β β β β βββ tshirts.png
β β β β βββ waves.svg
β β β βββ cart.svg
β β β βββ changePass.svg
β β β βββ create.svg
β β β βββ edit.svg
β β β βββ error.png
β β β βββ footer_img.png
β β β βββ logout.svg
β β β βββ nishant.png
β β β βββ not_found.png
β β β βββ profile.svg
β β β βββ purchased.svg
β β β βββ saurabh.png
β β β βββ spider.png
β β β βββ trial1.png
β β β βββ trial2.png
β β β βββ trial3.png
β β β βββ trial4.png
β β β βββ trial5.png
β β βββ Components/
β β β βββ Cart/
β β β β βββ Cart.jsx
β β β β βββ Cart.module.css
β β β βββ CategoryPage/
β β β β βββ CategoryPage.jsx
β β β β βββ CategoryPage.module.css
β β β βββ Explore/
β β β β βββ Explore.jsx
β β β β βββ Explore.module.css
β β β βββ Footer/
β β β β βββ Footer.jsx
β β β β βββ Footer.module.css
β β β βββ Home/
β β β β βββ Home.jsx
β β β β βββ Home.module.css
β β β βββ Login/
β β β β βββ Login.jsx
β β β β βββ Login.module.css
β β β β βββ LoginHero.jsx
β β β β βββ LoginHero.module.css
β β β βββ Navbar/
β β β β βββ Dropdown.jsx
β β β β βββ Dropdown.module.css
β β β β βββ MenuItems.js
β β β β βββ Navbar.jsx
β β β β βββ Navbar.module.css
β β β βββ NotFound/
β β β β βββ NotFound.jsx
β β β β βββ NotFound.module.css
β β β βββ Product/
β β β β βββ Product.jsx
β β β β βββ Product.module.css
β β β βββ Retailer/
β β β β βββ ChangePass/
β β β β β βββ ChangePass.jsx
β β β β β βββ ChangePass.module.css
β β β β βββ CreateProduct/
β β β β β βββ CreateProduct.jsx
β β β β β βββ CreateProduct.module.css
β β β β βββ EditProfile/
β β β β β βββ EditProfile.jsx
β β β β β βββ EditProfile.module.css
β β β β βββ LogoutModal/
β β β β β βββ LogoutModal.jsx
β β β β β βββ LogoutModal.module.css
β β β β βββ MyItems/
β β β β β βββ MyItems.jsx
β β β β β βββ MyItems.module.css
β β β β βββ Profile/
β β β β β βββ Profile.jsx
β β β β β βββ Profile.module.css
β β β β βββ index.js
β β β β βββ Retailer.jsx
β β β β βββ Retailer.module.css
β β β βββ Signup/
β β β β βββ Signup.jsx
β β β β βββ Signup.module.css
β β β β βββ SignupHero.jsx
β β β β βββ SignupHero.module.css
β β β βββ UI/
β β β β βββ Card/
β β β β β βββ Card.jsx
β β β β β βββ Card.module.css
β β β β βββ CartIcon/
β β β β β βββ CartIcon.jsx
β β β β β βββ CartIcon.module.css
β β β β βββ CustomButton/
β β β β β βββ CustomButton.jsx
β β β β β βββ CustomButton.module.css
β β β β βββ InputField/
β β β β β βββ InputField.jsx
β β β β β βββ InputField.module.css
β β β β βββ LandingHero/
β β β β β βββ LandingHero.jsx
β β β β β βββ LandingHero.module.css
β β β β βββ Loading/
β β β β β βββ Loading.jsx
β β β β β βββ Loading.module.css
β β β β βββ Logo/
β β β β β βββ Logo.jsx
β β β β β βββ Logo.module.css
β β β β βββ Modal/
β β β β β βββ Modal.jsx
β β β β β βββ Modal.module.css
β β β β βββ ProductCard/
β β β β β βββ ProductCard.jsx
β β β β β βββ ProductCard.module.css
β β β β βββ SingleProductCard/
β β β β β βββ SingleProductCard.jsx
β β β β β βββ SingleProductCard.module.css
β β β β βββ SplineModel/
β β β β β βββ SplineModel.jsx
β β β β β βββ SplineModel.module.css
β β β β βββ index.js
β β β βββ User/
β β β β βββ ChangePass/
β β β β β βββ ChangePass.jsx
β β β β β βββ ChangePass.module.css
β β β β βββ EditProfile/
β β β β β βββ EditProfile.jsx
β β β β β βββ EditProfile.module.css
β β β β βββ LogoutModal/
β β β β β βββ LogoutModal.jsx
β β β β β βββ LogoutModal.module.css
β β β β βββ Profile/
β β β β β βββ Profile.jsx
β β β β β βββ Profile.module.css
β β β β βββ PurchasedItems/
β β β β β βββ PurchasedItems.jsx
β β β β β βββ PurchasedItems.module.css
β β β β βββ index.js
β β β β βββ User.jsx
β β β β βββ User.module.css
β β β βββ VerifyNft/
β β β β βββ VerifyHero.jsx
β β β β βββ VerifyHero.module.css
β β β β βββ VerifyNft.jsx
β β β β βββ VerifyNft.module.css
β β β βββ index.js
β β βββ Constants/
β β β βββ abi.json
β β β βββ social.contact.js
β β βββ Contexts/
β β β βββ ProductContext/
β β β β βββ productContext.js
β β β β βββ productReducer.js
β β β β βββ ProductState.js
β β β βββ SellerAuthContext/
β β β β βββ sellerAuthContext.js
β β β β βββ sellerAuthReducer.js
β β β β βββ SellerState.js
β β β βββ UserAuthContext/
β β β β βββ userAuthContext.js
β β β β βββ userAuthReducer.js
β β β β βββ UserState.js
β β β βββ index.js
β β β βββ types.js
β β βββ Fonts/
β β β βββ Starcraft-Italic.otf
β β β βββ Starcraft-Normal.ttf
β β β βββ Starcraft.otf
β β βββ PrivateRoutes/
β β β βββ index.js
β β β βββ SellerPrivateRoute.js
β β β βββ UserPrivateRoute.js
β β βββ utils/
β β β βββ setAuthToken.js
β β βββ App.css
β β βββ App.jsx
β β βββ index.js
β βββ .env
β βββ .gitignore
β βββ package.json
β βββ README.md
βββ readme_assets/
β βββ create_account.png
β βββ customer_profile.png
β βββ ethereum.png
β βββ featured_products.png
β βββ flipkart_grid.png
β βββ hardhat.png
β βββ log_in.png
β βββ logo.png
β βββ mockup_main.png
β βββ moralis.svg
β βββ popup.png
β βββ product_page.png
β βββ retailer_profile.png
β βββ solidity.png
β βββ verify_warranty.png
βββ server/
β βββ config/
β β βββ db.js
β βββ controllers/
β β βββ AuthControllers/
β β β βββ sellerAuth.js
β β β βββ userAuth.js
β β βββ product.js
β β βββ seller.js
β β βββ user.js
β βββ helpers/
β β βββ auth.js
β βββ middleware/
β β βββ errorMiddleware.js
β β βββ sellerAuth.js
β β βββ userAuth.js
β βββ models/
β β βββ Product.js
β β βββ Seller.js
β β βββ User.js
β βββ routes/
β β βββ authRoutes/
β β β βββ sellerAuth.js
β β β βββ userAuth.js
β β βββ product.js
β β βββ seller.js
β β βββ user.js
β βββ utils/
β β βββ helpers.js
β βββ .env
β βββ index.js
β βββ package.json
βββ .all-contributorsrc
βββ .gitignore
βββ LICENSE
βββ package.json
βββ README.md