This project is a blockchain-based crowdfunding platform with a unique twist. Unlike traditional crowdfunding where companies propose projects and seek funding from users, here, regular users make proposals to companies. If a company agrees to execute the proposal and sets a funding goal, the crowdfunding process automatically starts.
Creating a proposal costs 10 mock USDT tokens, and users can earn 0.1 mock USDT tokens by removing outdated proposals.
Visit app on https://proposal-based-crowdfunding.vercel.app/
This project uses Moralis Streams for real-time blockchain data processing. To recreate the setup, you need to create a stream on Moralis that links to the api/addToMongoDb endpoint.
-
Sign up for Moralis: If you don’t have an account, sign up at Moralis.
-
Create a New Stream:
- Go to the Moralis Streams section.
- Create a new stream and configure it to monitor the blockchain events relevant to your project.
- Set the webhook URL to point to your API endpoint: https://yourdomain.com/api/addToMongoDb.
- Configure Webhook: Ensure that your API endpoint is set up to handle incoming requests from Moralis and process the blockchain data accordingly.
Create a .env file in the root of your project and add the following lines:
MONGODB_URI=your-mongodb-uri
NEXT_PUBLIC_PROJECT_ID=your-wallet-connect-project-id
NEXT_PUBLIC_SEPOLIA_RPC_URL=your-sepolia-rpc-url
MONGODB_URI: Replace your-mongodb-uri with the actual URI of your MongoDB instance. This URI is used to connect your application to your MongoDB database.
NEXT_PUBLIC_PROJECT_ID: Replace your-wallet-connect-project-id with the actual project ID from your WalletConnect . This ID is used to integrate WalletConnect in your application, allowing users to connect their wallets securely. Get your project Id
NEXT_PUBLIC_SEPOLIA_RPC_URL: Replace your-sepolia-rpc-url with the actual RPC URL for the Sepolia network. This URL is used to connect to the
You can access the smart contract repository via the following link: Smart-Contracts-Proposal-Based-CrowdFunding.