---
title: Overview
description: Choose the right Thru indexing package and build Postgres-backed
  backend indexers with @thru/indexer, @thru/replay, and @thru/sdk.
source_url:
  html: https://thru.org/docs/indexing/overview/
  md: https://thru.org/docs/indexing/overview.md
---

# Overview

Use this section when you need historical or stateful chain data in a Postgres-backed shape instead of one-off RPC reads. Whether you are building a backend indexer, a read model, an ETL pipeline, or a historical replay service, this is the starting point.

## Use This When

- you need a backend to keep a SQL view of on-chain events or account state
- you want to query indexed chain data from backend code
- you need filtering, joins, and pagination over chain data that would be awkward to do directly from RPC
- you are building an analytics pipeline, read model, or historical replay service

## Choosing A Package

| Package | Use it when | What it gives you |
| - | - | - |
| [`@thru/sdk`](https://thru.org/docs/sdks/web-packages/sdk.md) | You need direct chain reads, writes, simple streaming, or ad-hoc RPC queries without persistence. | Typed RPC client for accounts, transactions, blocks, events, and chain state. No storage or checkpointing. |
| [`@thru/replay`](https://thru.org/docs/sdks/web-packages/replay.md) | You need an ordered backfill-plus-live feed for analytics, ETL, or event processing without managed database writes. | Historical replay with live handoff, reconnect handling, and typed async iterators. You bring your own storage. |
| [`@thru/indexer`](https://thru.org/docs/sdks/web-packages/indexer.md) | You need a persistent backend indexer with Postgres storage and resumable checkpoints. | Stream definitions, Drizzle table generation, checkpoint management, and a runtime built on top of `@thru/replay`. |

If you are building a backend indexer, start with `@thru/indexer`. If you only need an ordered feed and want full control over where and how data lands, use `@thru/replay` directly. If you only need current chain state without indexing history, `@thru/sdk` is sufficient.

## Core Packages

| Package | Role |
| - | - |
| [`@thru/indexer`](https://thru.org/docs/sdks/web-packages/indexer.md) | Defines streams, manages checkpoints, and writes rows to Postgres-backed Drizzle tables. |
| [`@thru/replay`](https://thru.org/docs/sdks/web-packages/replay.md) | Supplies the historical-plus-live replay layer and the `ChainClient` used by the indexer runtime. |

## The Shape Of A Thru Indexer

Most projects follow this pattern:

1. define one or more event or account streams
2. export the resulting stream tables in the Drizzle schema
3. construct `new Indexer(...)` with a DB client, `ChainClient` factory, and stream arrays
4. query the Drizzle tables directly from your backend

## Start Here

- [Build an Indexer](https://thru.org/docs/indexing/build-an-indexer.md): Build a working token indexer and learn the production concerns for a real backend service.
- [Streams](https://thru.org/docs/indexing/streams.md): Learn how event streams and account streams differ, and how to write each safely.
- [Running the Indexer](https://thru.org/docs/indexing/running-the-indexer.md): See the runtime architecture, tech-stack assumptions, and the indexer boot flow.
- [Querying Indexed Data](https://thru.org/docs/indexing/querying-indexed-data.md): Query stream tables directly with Drizzle.

## Next Steps

1. Read [Build an Indexer](https://thru.org/docs/indexing/build-an-indexer.md) for the first successful end-to-end setup and production guidance.
2. Move to [Streams](https://thru.org/docs/indexing/streams.md) when you need to add or customize event or account parsing.
3. Use [Running the Indexer](https://thru.org/docs/indexing/running-the-indexer.md) when you are wiring runtime config, checkpoints, migrations, or deployment shape.
4. Use [Querying Indexed Data](https://thru.org/docs/indexing/querying-indexed-data.md) once data is landing in Postgres.

## Related

- [Web SDKs Overview](https://thru.org/docs/sdks/web.md) for the full list of web packages.
- [`@thru/indexer` reference](https://thru.org/docs/sdks/web-packages/indexer.md) for the complete indexer surface.
- [`@thru/replay` reference](https://thru.org/docs/sdks/web-packages/replay.md) for replay primitives and client details.
