Skip to content

kunalatmosoft/Decentralized-CrowdFunding

Repository files navigation

🧧 Decentralized Crowdfunding Platform

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

✨ Features

  • 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

🛠️ Tech Stack

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

📦 Project Structure


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


🚀 Getting Started

1. Clone the Repository

2. Install Dependencies

npm install

3. Compile Contracts

npx hardhat compile

4. Start Deploy

npx hardhat run scripts/deploy.js --network megaeth

5. Run Frontend

npm run dev

Open http://localhost:3000 to view the app.


🧪 Running Tests

npx hardhat test


🔐 Wallet Integration

Ensure you have Metamask installed. Connect to the same network as Hardhat (e.g., localhost:8545) or use a testnet like Goerli.


🌐 Deployment

Frontend (Next.js):

Deploy easily on Vercel or Netlify

Smart Contracts:

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


📄 Smart Contract Overview

Crowdfunding.sol

  • createCampaign(title, description, goal, deadline)
  • donateToCampaign(campaignId)
  • withdrawFunds(campaignId)
  • refundIfFailed(campaignId)
  • Events for tracking campaign creation and donations

🧠 Future Enhancements

  • NFT rewards for top contributors
  • Social sharing of campaigns
  • Creator verification system
  • IPFS integration for media files
  • DAO-based campaign approval

🤝 Contributing

Pull requests are welcome. For major changes, please open an issue first.


📜 License

MIT


💡 Inspiration

This project was built to explore the potential of decentralized crowdfunding, where transparency and trust are ensured by the Ethereum blockchain.


🧪 Made with ❤️ using Hardhat, Next.js, and Solidity

Let me know if you want it customized for your exact contract name, functions, or want to include deployment links / badges.

About

decentralized crowdFunding application (solidity)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published