Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ponder-surveys/farcaster-survey-bot
An open-source NodeJS bot designed to post engaging surveys directly on Farcaster.
https://github.com/ponder-surveys/farcaster-survey-bot
base farcaster javascript neynar nodejs open-source supabase thirdweb
Last synced: 8 days ago
JSON representation
An open-source NodeJS bot designed to post engaging surveys directly on Farcaster.
- Host: GitHub
- URL: https://github.com/ponder-surveys/farcaster-survey-bot
- Owner: ponder-surveys
- License: mit
- Created: 2023-03-13T04:42:08.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-10-29T17:46:31.000Z (about 1 month ago)
- Last Synced: 2024-10-29T19:01:56.015Z (about 1 month ago)
- Topics: base, farcaster, javascript, neynar, nodejs, open-source, supabase, thirdweb
- Language: TypeScript
- Homepage: https://weponder.io
- Size: 190 MB
- Stars: 16
- Watchers: 4
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-farcaster - ponder-surveys/farcaster-survey-bot
README
# 📋 Ponder Surveys
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](https://weponder.io/)
## Table of Contents
- [How It Works](#how-it-works)
- [Prerequisites](#prerequisites)
- [Quick Start](#quick-start)
- [Contributing](#contributing)
- [License](#license)
- [Acknowledgments](#acknowledgments)## How It Works
1. **Scheduled Surveys**: Using cron jobs, this survey bot is programmed to post queued surveys at specific intervals.
2. **Supabase Backend**: All survey data, including questions, responses, and reactions are stored and managed in Supabase.
3. **Automated Replies**: Casts a reply automatically when the configured Farcaster account is tagged.## Prerequisites
Before you begin, ensure you have met the following requirements:
- **Node.js**: Version 14.x.x or higher. [Download here](https://nodejs.org/)
- **Yarn**: Version 3.3.1 or higher. [Download here](https://yarnpkg.com/)
- **Accounts**: Ensure you have accounts on Farcaster, Neynar, and Supabase.## Quick Start
### 1. Clone the repository
```commandline
git clone https://github.com/ponder-surveys/farcaster-survey-bot
```### 2. Set up your environment variables
Farcaster & Neynar
```commandline
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
```commandline
SUPABASE_URL="Project URL"
SUPABASE_KEY="API key with read & write access to the project"
SUPABASE_JWT_SECRET="Used to generate secure tokens"
```Thirdweb
```commandline
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
```commandline
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
```commandline
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
```commandline
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"
```### 3. Install dependencies
```commandline
yarn install
```### 4. Run the application
```commandline
yarn start
```## Contributing
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.
## License
This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details.
## Acknowledgments
- Thanks to [botcaster](https://github.com/BigWhaleLabs/botcaster) for paving the way on the initial core bot functionality
- Inspired by projects with awesome bots like [Launchcaster](https://www.launchcaster.xyz/) and [Eventcaster](https://www.eventcaster.xyz/)---
> Made with 💜 by [@cojo.eth](https://warpcast.com/cojo.eth) and [@ba](https://warpcast.com/ba)