CryptoCart is a Decentralized eCommerce platform built on the blockchain, leveraging Next.js for the frontend and Solidity for smart contract development. This project enables users to browse, purchase, and sell products using cryptocurrency, providing a secure and transparent shopping experience.
Check out the CryptoCart Demo here.
- Decentralized platform for buying and selling goods.
- Secure transactions using cryptocurrency.
- User-friendly interface with a responsive design.
- Product listing with detailed descriptions and pricing.
- Integration with blockchain for transparent and tamper-proof transactions.
- Admin can track orders, create new products & Withdraw funds from Smart Contract.
- Frontend: Next.js, Tailwind CSS, Typescript
- Backend: Hardhat, Solidity (Smart Contracts)
- Blockchain: Sepolia Testnet (Ethereum)
- Tools: Hardhat, Ethers.js
Follow these instructions to set up the project locally.
Make sure you have the following installed:
- Node.js
- npm or yarn
- MetaMask or any Ethereum wallet
-
Clone the repository:
git clone https://github.com/ap211unitech/cryptocart.git cd cryptocart
-
Install the dependencies:
cd client && yarn install
cd hardhat && yarn install
-
Compile the smart contracts:
cd hardhat && yarn hardhat compile
-
Deploy the smart contract:
npx hardhat vars set ETHERSCAN_API_KEY
npx hardhat vars set ALCHEMY_KEY
npx hardhat vars set SEPOLIA_ACCOUNT_PRIVATE_KEY
cd hardhat && yarn hardhat run ./scripts/deploy.js --network sepolia
-
Start the build server:
cd client yarn build yarn start
-
Open your browser and navigate to
http://localhost:3000
.
- Connect your Ethereum wallet using MetaMask.
- Browse through the product listings.
- Purchase any product
- Proceed to checkout and confirm the transaction using your cryptocurrency.
- Wait for the transaction to be confirmed on the blockchain.
The smart contracts for CryptoCart are written in Solidity and handle the core logic of the platform, including product listing, purchasing, and transaction management. The contracts are deployed on the Sepolia Testnet Ethereum network.
Contributions are welcome! Please fork the repository and submit a pull request.
- Fork the repository
- Create a new branch (
git checkout -b feature-branch
) - Commit your changes (
git commit -m 'Add some feature'
) - Push to the branch (
git push origin feature-branch
) - Open a pull request