How reservoirprotocol/indexer-public works
Project type and purpose
• This is a monorepo (“turbo.json”) that contains multiple packages:
• packages/contracts – Solidity smart-contract code + Hardhat deployments/tests
• packages/indexer – a TypeScript “indexer” backend service (API server, sync jobs, queues)
• packages/sdk – TypeScript client library/SDK to talk to the indexer or directly on-chain
• packages/mint-interface – a small TS helper library for mint UI/flow
• The overall purpose is to deploy on-chain contracts and run an off-chain service that watches blockchains, indexes NFT/marketplace data into databases and search, and exposes a REST/WebSocket API and SDK.
File structure
• Top-level: Dockerfiles, ESLint, Prettier, Turborepo config
• packages/contracts: Hardhat config, contracts/, scripts/, test/
• packages/indexer:
• src/api – REST endpoints
• src/jobs – RabbitMQ and Kafka‐backed workers (sync, backfill, CDC, monitoring, WebSocket listeners)
• src/common, src/utils – shared clients for Postgres, Redis, Elasticsearch, Kafka, RabbitMQ, Tracing, Logger
• src/models & src/migrations – TypeORM or similar entities and SQL migrations for Postgres
• src/elasticsearch – indexing pipelines into ES
• src/pubsub – events published via Kafka
• setup.ts + routes.ts to wire everything up
• packages/sdk & mint-interface: pure TS libraries, no external services
README for additional insights
• The top-level README simply names it “Reservoir Indexer” and points you to each package’s own README.
• packages/indexer/README.md will explain how to run the service (likely Docker Compose), environment variables, and dependencies.