KrishiCoin is a peer-to-peer (P2P) and decentralized finance (DeFi) platform built on the Base Blockchain (Ethereum L2). It empowers farmers and rural communities by offering a decentralized marketplace, crowdfunding opportunities, and secure financial solutions, all while addressing key issues in the agriculture sector.
Demo Video | Devfolio Submission Link | Project Link
- Eliminate middlemen by directly connecting farmers to companies.
- Maximize farmers' profits and reduce buyers' costs.
- Farmers can raise funds for social and essential causes through secure and transparent crowdfunding.
- Direct financial assistance to farmers in need.
- Powered by Base Blockchain for scalability and security.
- Uses Solidity smart contracts to ensure trust, transparency, and decentralized operations.
- Built using Ether.js for smooth smart contract interaction.
- Integrated Coinbase Smart Wallet for easy onboarding and OnchainKit for enhanced user experience.
- Peer-to-peer decentralized marketplace for direct transactions.
- Crowdfunding platform to provide access to financial support.
- Community Writes section for knowledge-sharing and engagement among farmers.
- Blockchain: Built on Base Blockchain (Ethereum L2) for scalability.
- Smart Contracts: Peer-to-peer marketplace and crowdfunding handled via Solidity smart contracts deployed on the Base Sepolia Testnet.
- React Frontend: Intuitive UI for managing orders, purchases, crop listings, and donations.
- Coinbase Integration: Utilizes Coinbase Wallet, Smart Wallet, and Onramp for easy fund management and seamless transactions.
- Thirdweb: Used for testing and deploying smart contracts on Base Sepolia Testnet.
- Blockchain: Base Blockchain (Ethereum L2)
- Smart Contracts: Solidity
- Frontend: React.js
- Backend: Node.js, Express.js
- Database: MongoDB
- Web3 Interaction: Ether.js
- Wallet Integration: Coinbase Smart Wallet
- Deployment Tools: Thirdweb, Vercel
- Design & UI: Daisy UI, Tailwind CSS
- Other Tools: Vite, Onchainkit, Coinbase APIs, etc
-
Clone the repository:
git clone https://github.com/aman-tiwari001/KrishiCoin.git
-
Navigate to the client directory and install dependencies:
cd client npm install
-
Create a .env file in the client directory and add the following environment variables:
VITE_COINBASE_PROJECT_ID="your-coinbase-project-id" VITE_ONCHAINKIT_API_KEY="your-onchainkit-api-key" VITE_APP_SERVER_URL="http://localhost:4000"
-
Navigate to the server directory and install dependencies:
cd ../server npm install
-
Create a .env file in the server directory and add the following environment variables:
MONGODB_URI="mongodb://127.0.0.1:27017/krishicoin" JWT_SECRET="krishicoin123"
-
Start the server:
npm run dev
-
Start the client:
cd ../client npm run dev
🎉 Congratulations! You have successfully set up the project locally.