/crowdsourcing-blockchain

A crowdsourcing application built using ethereum blockchain and next.js

Primary LanguageJavaScriptMIT LicenseMIT

CrowdSourceIt

CrowdSourceIt! is a crowdsourcing web application built using ethereum blockchain. The smart contract for this application is written entirely in solidity (version: ^0.7.5). I have used Next.js for the web application and Mocha for testing.

📌 Features

  • Decentralized application
  • Eliminates fraud campaigns
  • See all spending requests
  • Approve spending requests
  • Only campaign creator can finalize the request

⚙️ Technologies Used

🌟 Showcase

Home Page New Campaign
Campaign Details Contributing
Spending Requests New Request

🛠️ Project Setup and Usage

I have used Metamask to interact with some test accounts and make transactions on Rinkeby Test Network. I have used Infura to get access to Ethereum Network.

Initial Setup

  • Install Metamask browser extension. You can visit here to install and setup Metamask in your browser - Metamask Download Link
  • Signup and make an account in Metamask (Make sure that you are not using account which is linked to Main Network, as the project uses the security phrase) and save the generated security phrase(MNEMONIC). You can create more than one account with same login credentials.
  • Get some Test Ethers for Rinkeby Test Network from a Faucet.
  • Clone the repository and install the NPM packages
cd [project_location]

npm install
  • Signup on Infura and make a new project in Ethereum. Get the API KEY from Project Settings by selecting Rinkeby ENDPOINT under Keys Section.

Compile the Contract

  • Run following commands in root directory of project
cd ethereum

node compile.js

Make config.json File

  • In the root directory of project, make a new JSON file named config.json and edit it as:
{
  "mnemonic": "MNEMONIC",
  "infuraAPI": "API_KEY",
}
  • Replace MNEMONIC by the security phrase of the Metamask account and API_KEY by API Key received from Infura.

Deploy the contract and edit config.json

  • Run the following commands in the root directory of the project
cd ethereum

node deploy.js
  • Copy the CONTRACT ADDRESS from terminal window and save it to config.json in the next step.
  • Edit config.json file to add contract address to it as:
{
  "mnemonic": "MNEMONIC",
  "infuraAPI": "API_KEY",
  "ADDRESS": "CONTRACT_ADDRESS"
}

Run the tests

npm run test

Build and run the web application

  • Run the below command
npm run dev

📃 License

This project is built under MIT License. Check LICENSE for more details


Built using Ethereum Solidity Next.js Material UI