There are three pieces: the indexer, the API, Meilisearch, and Soketi.
The indexer is composed of a blockchain node running the normal binary,
represented in the diagram above as node
, and an exporter process that runs
alongside it. The exporter listens for state events and writes them to a
PostgreSQL database. Each state write is formatted as a JSON object representing
a state change and its metadata, such as the contract and block height.
Read the exporter docs for more information on how the exporter works and what its responsibilities are.
As the exporter is exporting, it also transforms data, updates the cache, and triggers webhooks based on state changes. More information on each of these can be found in their respective docs:
Read the formulas docs for more information on how to write formulas that can be used to query the database.
The API is a simple Koa server that makes it easy to write endpoints that query the database. More information can be found in the API docs.
This indexer is also capable of exporting data to a
Meilisearch instance, which can be used to power
a search engine. If meilisearch
is not defined in the config, this will be
disabled. It is optional.
This indexer is also capable of exporting data to a Soketi instance, which can be used to power WebSockets. This is only used by webhooks, and is optional. Check out the webhooks docs for more information.