online surveys that reward participants for answering questions, built on Celo
A Next.js-based Web3 application that bring surveys to participants (active Celo wallet addresses), and uses a smart contract to distribute rewards.
Participants perform an on-chain booking of a survey to secure their reward and do the survey at their own time.
Once a Participant
completes a survey (e.g. submits a form), an off-chain signature is created to help them claim from the smart contract.
ClosedSurveyV6.sol
is a secure Solidity smart contract that manages value by ensuring only the right person gets a reward.
- Survey Booking
- Automated Rewarding
- Secure Smart Contract Transactions
- Frontend: Next.js
- Authentication: Firebase Anonymous Authentication
- Database: Firestore Database (NoSQL)
- Blockchain: Celo Network (Mainnet)
- Smart Contracts: Solidity (OpenZeppelin Ownable, IERC20Metadata, Pausable, ECDSA, MessageHashUtils)
- Node.js (Latest LTS version)
- npm or yarn
- Clone and install:
git clone https://github.com/andrewkimjoseph/canvassing-participant
cd canvassing-participant
npm install # or yarn install
- Configure environment:
Create
.env
file with the following:
NEXT_PUBLIC_AMPLITUDE_API_KEY=""
NEXT_PUBLIC_FIREBASE_MEASUREMENT_ID=""
NEXT_PUBLIC_FIREBASE_APP_ID=""
NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID=""
NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET=""
NEXT_PUBLIC_FIREBASE_PROJECT_ID=""
NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN=""
NEXT_PUBLIC_FIREBASE_API_KEY=""
NEXT_PUBLIC_RPC_API_KEY=""
SENTRY_AUTH_TOKEN=""
NEXT_PUBLIC_REOWN_PROJECT_ID=""
Or copy the .env.example
file
cp .env.example .env
- Launch development server (front-end):
cd front-end
npm run dev # or yarn dev