A full-stack blockchain-based Crowdfunding application built with:
- Hardhat (Ethereum development framework)
- Nomic Foundation tools
- Next.js (Frontend and full-stack rendering)
- Ethers.js for blockchain interaction
- IPFS / Pinata for decentralized file storage (optional)
- Metamask for wallet integration
- Create & manage decentralized crowdfunding campaigns
- Set funding goals and deadlines
- Allow users to contribute ETH to campaigns
- Track contributors and total raised funds
- Withdraw funds if the goal is reached
- Refund contributors if the campaign fails
- Real-time UI updates with Next.js
- Wallet connection via Metamask
| Layer | Tech Used |
|---|---|
| Smart Contracts | Solidity + Hardhat |
| Frontend | Next.js + Tailwind |
| Blockchain | Ethereum (Local or Testnet) |
| Wallet | Metamask + Ethers.js |
| Deployment | Vercel (Frontend) / Nomic Labs (Contracts) |
| Optional | IPFS (via Pinata) for storing metadata |
crowdfunding-app/
├── contracts/ # Smart contracts (Solidity)
│ └── Crowdfunding.sol
├── scripts/ # Deployment & interaction scripts
├── test/ # Hardhat test cases
├── pages/ # Next.js frontend pages
├── components/ # Reusable React components
├── public/ # Static assets
├── styles/ # Tailwind CSS
├── hardhat.config.js # Hardhat configuration
├── package.json
└── README.md
npm install
npx hardhat compile
npx hardhat run scripts/deploy.js --network megaeth
npm run dev
Open http://localhost:3000 to view the app.
npx hardhat test
Ensure you have Metamask installed. Connect to the same network as Hardhat (e.g., localhost:8545) or use a testnet like Goerli.
Deploy easily on Vercel or Netlify
Use Nomic Foundation or Alchemy to deploy to testnets:
npx hardhat run scripts/deploy.js --network megaeth
Make sure to add your .env with your private key and Alchemy/Infura API key:
PRIVATE_KEY=your_wallet_private_key ALCHEMY_API_KEY=your_api_key
Crowdfunding.sol
createCampaign(title, description, goal, deadline)donateToCampaign(campaignId)withdrawFunds(campaignId)refundIfFailed(campaignId)- Events for tracking campaign creation and donations
- NFT rewards for top contributors
- Social sharing of campaigns
- Creator verification system
- IPFS integration for media files
- DAO-based campaign approval
Pull requests are welcome. For major changes, please open an issue first.
This project was built to explore the potential of decentralized crowdfunding, where transparency and trust are ensured by the Ethereum blockchain.
Let me know if you want it customized for your exact contract name, functions, or want to include deployment links / badges.