Skip to content

baibhav1314/amazon-clone-blockchain

Repository files navigation

Amazon Clone Blockchain

A decentralised e-commerce website that let users buy NFT's in exchange for Amazon Coin Token, a erc20 token which can be brought by paying ethers. It also provides a transaction history page that shows user their purchases.

Tech Stack

Client: Next.js, Context API, TailwindCSS, Ethers.js, Web3UiKit

Server: Moralis

Smart Contract: Solidity, Hardhat

Screenshots

Home Page

amazon1

amazon2

Transaction History

amazon3

Run Locally

Clone the project

  git clone https://github.com/baibhav1314/amazon-clone-blockchain.git

Go to the project directory

  cd amazon-clone-blockchain

Install dependencies

  npm install

Go to the smart-contract directory

  cd smart-contract

Install dependencies

  npm install

Start the server

  cd ..
  npm run start

Environment Variables

To run this project, you will need to add the following environment variables to your .env file

NEXT_PUBLIC_MORALIS_SERVER = Your Moralis ServerUrl

NEXT_PUBLIC_MORALIS_APPID = Your Moralis NEXT_PUBLIC_MORALIS_APPID

Then add a .env file inside the smart-contract folder

cd smart-contract

SPEEDY_NODE_URL = Your speedy node url from Moralis Speedy Nodes

WALLET_PRIVATE_KEY= Your private key

Deploying Smart Contract

To deploy the smart contract run

  cd smart-contract
  npx hardhat run --network <your-network> scripts/deploy.js

Note the deployed contract address and update it in the amazon-clone-blockchain/lib folder along with the contract abi

Deploying Project

Set up the netlify and then run

netlify deploy

Releases

No releases published

Packages

No packages published