Dapp Funds X is a full-stack Web3 crowdfunding application where users can create charity campaigns and receive on-chain donations.
The project combines:
- Next.js + TypeScript frontend
- Solidity smart contract (Hardhat)
- Wallet connection (RainbowKit + Wagmi)
- SIWE authentication with NextAuth
- Redux state management
This app is built around a smart contract-first donation model:
- Campaigns are created on-chain and stored in the
DappFundcontract. - Donations are made directly on-chain.
- A platform tax is automatically split to the contract owner per donation.
- Campaign visibility is controlled by status (
deleted,banned, funding progress).
The frontend reads and writes campaign data through ethers.js contract calls and presents those actions through a wallet-connected UX.
- Create a campaign with title, owner details, media, and goal amount
- Update campaign details (owner only)
- Delete campaign (owner only)
- Ban/unban campaigns (platform owner only)
- Donate to active campaigns
- Track campaign supporters and donation history
- Configurable platform tax (
changeTax)
- Wallet connection (MetaMask, Trust Wallet, Coinbase Wallet, Rainbow)
- SIWE-based authentication using NextAuth
- Landing page for discoverable active campaigns
- Campaign detail page with donation and supporter history
- Create and edit campaign pages
- User-specific campaigns page
- Transaction feedback via toast notifications
- Next.js 13
- React 18
- TypeScript
- Tailwind CSS
- Hardhat + ethers v6
- Solidity 0.8.17
- RainbowKit + Wagmi + Viem
- NextAuth + SIWE
- Redux Toolkit
- Node.js 18+
- Yarn 1.x
- MetaMask (or any supported EVM wallet)
- Clone and install dependencies.
git clone <your-repo-url>
cd Web3-HackOn
yarn install- Create your environment file (
.env) in project root.
NEXT_PUBLIC_RPC_URL=http://127.0.0.1:8545
NEXT_PUBLIC_ALCHEMY_ID=your_alchemy_api_key
NEXT_PUBLIC_PROJECT_ID=your_walletconnect_project_id
NEXTAUTH_URL=http://localhost:3000
NEXTAUTH_SECRET=replace_with_a_strong_random_secret- Start a local blockchain node.
yarn blockchain- Deploy the contract (new terminal).
yarn deployThis updates contracts/contractAddress.json with the deployed address.
- (Optional) Seed sample campaigns and donations.
yarn seed- Run the Next.js app.
yarn devOpen http://localhost:3000.
yarn dev # Run app in development
yarn build # Production build
yarn start # Run production server
yarn lint # Lint code
yarn blockchain # Start hardhat local node
yarn deploy # Deploy DappFund contract
yarn seed # Seed demo data
npx hardhat test # Run smart contract testsRender should host the Next.js frontend as a Web Service.
Important: a Render-hosted app cannot use your local Hardhat node (127.0.0.1:8545). For production, deploy your contract to a public network (for example Bitfinity testnet as configured in hardhat.config.js) and point your RPC env var to that network.
- Configure deployer account in
hardhat.config.jsfor your target network. - Deploy:
npx hardhat run scripts/deploy.js --network bitfinity- Commit the updated
contracts/contractAddress.jsonso Render uses the correct contract address.
- Push your repository to GitHub.
- In Render dashboard, click New + -> Web Service.
- Select your repository and configure:
- Runtime: Node
- Build Command:
yarn install && yarn build - Start Command:
yarn start
Set these values in Render (Environment tab):
NEXT_PUBLIC_RPC_URL= Public RPC URL of deployed chainNEXT_PUBLIC_ALCHEMY_ID= Alchemy API key (if used)NEXT_PUBLIC_PROJECT_ID= WalletConnect Project IDNEXTAUTH_URL= Your Render app URL (for examplehttps://your-app.onrender.com)NEXTAUTH_SECRET= Long random secret string
- Trigger deployment from Render.
- After deployment, open the app URL and test wallet connection + campaign flows.
Run contract tests:
npx hardhat test- Keep private keys and secrets out of source control.
- If you redeploy the contract, remember to update
contracts/contractAddress.json. - Ensure wallet network matches the chain used by
NEXT_PUBLIC_RPC_URL.
This project is available for use. Please check with the repository owner for specific licensing information.