DCFUND is a crowdfunding application built on web3 technologies, enabling transparent and secure transactions on the Ethereum blockchain.
- Decentralized Transactions: All financial interactions are recorded and verified on the Ethereum blockchain.
- Transparency: Campaign funding and disbursement are publicly auditable.
- Web3 Integration: Seamless connection to users' cryptocurrency wallets.
- User-Friendly Interface: Intuitive design for easy campaign creation and donation.
Before you begin, ensure you have the following installed:
- Node.js: Version 18 or higher recommended.
- npm or yarn: Package managers for JavaScript.
- Ethereum Wallet: MetaMask or similar web3 wallet.
This project relies on the following technologies:
- JavaScript
- TypeScript
- Next.js
- React
- Tailwind CSS
- thirdweb
Follow these steps to set up the DCFUND project:
-
Clone the Repository:
git clone https://github.com/Naveen6612/DCFUND.git cd DCFUND -
Install Dependencies:
Using npm:
npm install
or using yarn:
yarn install
-
Set Environment Variables:
Create a
.env.localfile in the project root and add your Thirdweb client ID:NEXT_PUBLIC_TEMPLATE_CLIENT_ID=YOUR_THIRDWEB_CLIENT_IDObtain a client ID from the thirdweb dashboard.
-
Start the Development Server:
Using npm:
npm run dev
or using yarn:
yarn dev
The application should now be running at
http://localhost:3000.
- Connect your Ethereum wallet.
- Navigate to the campaign creation page.
- Fill in the campaign details (title, description, goal, etc.).
- Submit the campaign. A smart contract will be deployed for your campaign.
- Browse existing campaigns.
- Select a campaign to donate to.
- Enter the donation amount.
- Approve the transaction in your Ethereum wallet.
The Thirdweb client is initialized in src/app/client.ts:
import { createThirdwebClient } from "thirdweb";
const clientId = process.env.NEXT_PUBLIC_TEMPLATE_CLIENT_ID;
if (!clientId) {
throw new Error("No client ID provided");
}
export const client = createThirdwebClient({
clientId: clientId,
});The crowdfunding factory contract address is defined in src/app/constants/contracts.ts:
export const CROWDFUNDING_FACTORY =
"0x051a1173bae099fa4fcca465b17ae62d57fc8566";NEXT_PUBLIC_TEMPLATE_CLIENT_ID: Your Thirdweb client ID.
We welcome contributions to the DCFUND project!
- Fork the repository.
- Create a new branch for your feature or bug fix.
- Implement your changes.
- Submit a pull request with a clear description of your changes.
This project is open-source and available under the [License Name] License. Please see the LICENSE file for more details.
- This project leverages the thirdweb SDK for blockchain integration.
- Starter template used from thirdweb-next-starter