Home

Awesome

Lazy Indexer

This is a Farcaster indexer which only syncs network data for specified target user IDs. It borrows indexing logic from the Greg's indexer, and streaming logic from shuttle.

Principles

API Endpoints

POST /root-backfill/:fid

GET /root-backfill/:fid

{
  "status": "50 minutes remaining",
  "completedCount": 5,
  "waitingCount": 10,
  "childCount": 15,
  "done": false
}

POST /backfill/:fid

How it works

How to run

Clone this repo

git clone https://github.com/stephancill/lazy-indexer.git

Install dependencies

yarn install

Create a .env file with your hub, database, and redis connection details

cp .env.example .env

Run the latest database migrations

yarn migrate

Run the indexer

# Starts a server and backfill workers
yarn backfill

# Opens a Hub stream and indexes events in the targets set
yarn stream