An open-source NodeJS bot designed to post engaging surveys directly on Farcaster. Built on top of Farcaster Frames, Neynar, Supabase, and Thirdweb (Base mainnet) to produce automated casts, calculate results, and record both quantitative and qualitative responses.
This survey bot is a part of the Ponder ecosystem. Learn more
- Scheduled Surveys: Using cron jobs, this survey bot is programmed to post queued surveys at specific intervals.
- Supabase Backend: All survey data, including questions, responses, and reactions are stored and managed in Supabase.
- Automated Replies: Casts a reply automatically when the configured Farcaster account is tagged.
Before you begin, ensure you have met the following requirements:
- Node.js: Version 14.x.x or higher. Download here
- Yarn: Version 3.3.1 or higher. Download here
- Accounts: Ensure you have accounts on Farcaster, Neynar, and Supabase.
git clone https://github.com/ponder-surveys/farcaster-survey-bot
Farcaster & Neynar
FARCASTER_FID="Farcaster account id"
POLL_FID="Secondary Farcaster account id"
COMMUNITY_USER_ID="Backend user id for community surveys"
NEYNAR_API_KEY="API key with read & write permissions to Farcaster hubs"
NEYNAR_SIGNER_UUID="Farcaster signer uuid generated by Neynar"
NEYNAR_POLL_SIGNER_UUID="Secondary Farcaster signer uuid generated by Neynar"
Supabase
SUPABASE_URL="Project URL"
SUPABASE_KEY="API key with read & write access to the project"
SUPABASE_JWT_SECRET="Used to generate secure tokens"
Thirdweb
NFT_COLLECTION_ADDRESS="NFT collection used to check for holder status"
THIRDWEB_SECRET_KEY="Secret API key used to interact with Thirdweb SDK"
Survey questions
NEXT_GENERAL_QUESTION_CRON="Task scheduler (UTC) in cron syntax for general questions"
NEXT_COMMUNITY_QUESTION_CRON="Task scheduler (UTC) in cron syntax for community questions"
NEXT_EXPEDITED_QUESTION_CRON="Task scheduler (UTC) in cron syntax for expedited questions"
NEXT_QUESTION_REPLY="Customizable reply to question cast"
NEXT_QUESTION_INFO="Customizable info for question cast"
Survey results
NEXT_POLL_RESULTS_CRON="Task scheduler (UTC) in cron syntax to poll results"
NEXT_POLL_RESULTS_INTERVAL_HOURS="Interval in hours to poll results"
General
CALL_TO_ACTION="A message or action for users to take in the reply casts"
RESULTS_CALL_TO_ACTION="A message or action for users to take in the results reply casts"
yarn install
yarn start
Your contributions are always welcome! Feel free to fork this project and submit pull requests. If you have any suggestions, ideas, or feedback, don't hesitate to reach out via direct cast on Farcaster.
This project is licensed under the MIT License - see the LICENSE.md file for details.
- Thanks to botcaster for paving the way on the initial core bot functionality
- Inspired by projects with awesome bots like Launchcaster and Eventcaster