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.
Client: Next.js, Context API, TailwindCSS, Ethers.js, Web3UiKit
Server: Moralis
Smart Contract: Solidity, Hardhat
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
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
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
Set up the netlify and then run
netlify deploy