Farcaster Indexer
Index all profiles and casts on the Farcaster protocol. Powers the Farcaster Search API.
How it works
Profiles:
- On start, upsert all past
Register
events from the ID Registry to a Supabase table - Watch the ID Registry for new events and adds them to the table
- Iterate through Farcaster APIs every 2 hours to populate all profile data
Casts:
- Iterate through Farcaster APIs every 30 minutes and upserts all casts to a Supabase table
How to use
- Create a new project on Supabase (it's free)
- Navigate to the SQL editor
- Paste this code to create your tables
- Rename
.env.example
to.env
and configure your variables - Run
yarn install
to install dependencies - Run
yarn start
to start the server
I suggest also creating a duplicate of both tables and appending '_dev' to the names. Just run yarn dev
instead of yarn start
to use the dev tables.