Knowledge graph data service for the Geo protocol. Gaia ingests onchain events from the Geo blockchain, transforms and indexes them, and serves the resulting knowledge graph through a GraphQL/REST API.
+-----------------------------------------------------------+
| Hermes (event streaming) |
| |
+--------------+ | +----------------+ +--------------+ |
| Blockchain |--------------|---> hermes- |--->| hermes-relay | |
| (Geo) | | | substream | | (library) | |
+--------------+ | +----------------+ +------+-------+ |
| | |
| +------------+ |
| | | |
| v v |
| +-------------------+ +----------+ |
| | hermes-pipeline | | atlas | |
| | (all events) | | (graphs) | |
| +--------+----------+ +----+-----+ |
| | | |
+-----------+-------------------+---------------------------+
| |
v v
Kafka Kafka
|
+----------------------------------------+
|
v
+--------------------------------------------------------------------+
| Indexers (Kafka --> PostgreSQL / OpenSearch) |
| |
| kg-indexer . search-indexer . actions-indexer . scoring-service |
+------------------------------+-------------------------------------+
|
v
+-------------------+
| Gaia API |
| (Bun + Hono) |
| |
| /graphql |<-- PostGraphile
| /versioned/* |<-- Temporal queries
| /proposals/* |<-- Governance
| /profile/* |<-- User profiles
| /search/* |<-- OpenSearch
| /ipfs/* |<-- IPFS uploads
| /health/* |<-- K8s probes
+-------------------+
| Domain | Crates | Description |
|---|---|---|
| Hermes Pipeline | hermes-pipeline, hermes-relay, hermes-kafka, hermes-substream, hermes-ipfs-cache | Streams blockchain events to Kafka topics |
| Graph | atlas | Computes canonical space topology from trust events |
| Indexers | kg-indexer, search-indexer, actions-indexer, scoring-service | Consume Kafka topics, write to PostgreSQL / OpenSearch |
| API | api | GraphQL + REST read layer over indexed data |
| Governance | proposal-executor | Onchain proposal execution |
| Infrastructure | docker-compose.yml, hermes (k8s), monitoring, search-indexer-deploy | Local dev environment, observability, deployment |
- Rust (see
rust-toolchain.toml) - Bun
- Docker Desktop or OrbStack with ≥ 8 GB memory allocated (OpenSearch needs 2–4 GB alone)
- Docker Compose v2 (for profiles support)
First build note: Rust services compile from source on first
docker compose build, which can take a while depending on your machine.
cp .env.example .env
# Fill in at minimum: SUBSTREAMS_API_TOKEN, SUBSTREAMS_ENDPOINT, ROOT_SPACE_IDSee .env.example for all variables and descriptions.
Gaia runs most infrastructure locally with Docker. Kafka, PostgreSQL, and OpenSearch come from docker-compose.yml.
The remaining dependencies are external services:
| Dependency | Current/default provider | Used by | Required env vars | Notes |
|---|---|---|---|---|
| Substreams | Pinax (geotest.substreams.pinax.network:443) |
hermes-pipeline, atlas, hermes-ipfs-cache, actions-indexer |
SUBSTREAMS_ENDPOINT, SUBSTREAMS_API_TOKEN |
Required for any live blockchain ingestion. |
| IPFS read gateway | Mesh3 by default (gateway.mesh3.network) |
hermes-ipfs-cache |
IPFS_GATEWAY_URL |
Fetches edit and proposal blobs from IPFS. |
| IPFS write gateway | Pinata (uploads.pinata.cloud) |
api /ipfs/* routes |
IPFS_KEY, IPFS_GATEWAY_WRITE |
Only needed if you want API uploads enabled. |
| Bundler / paymaster | Pimlico (api.pimlico.io) |
proposal-executor |
PIMLICO_API_KEY |
Only needed with --profile executor. |
| Chain RPC | Bring your own RPC provider | proposal-executor |
RPC_URL |
Only needed with --profile executor. |
| Error tracking | Sentry | optional telemetry | SENTRY_DSN |
Safe to omit locally. |
| Trace export | Axiom | optional Hermes tracing | AXIOM_TOKEN, AXIOM_DATASET |
Only used when Sentry-backed tracing is enabled. |
If you only want the local indexers and API:
- Set
SUBSTREAMS_ENDPOINT,SUBSTREAMS_API_TOKEN, andROOT_SPACE_ID. - Set
IPFS_GATEWAY_URLif you runhermes-ipfs-cache. - Set
IPFS_KEYandIPFS_GATEWAY_WRITEonly if you need API uploads. - Skip
PIMLICO_API_KEYandRPC_URLunless you runproposal-executor.
If you run a service natively, pass the same env vars from .env.
Docker Compose does not inject them into native cargo run or bun run commands.
# Kafka, PostgreSQL, OpenSearch
docker compose --profile infra up -dOption A — All services in Docker:
# Infrastructure + all application services (first build is slow)
docker compose --profile infra --profile services upOption B — Infrastructure in Docker, run one service natively:
docker compose --profile infra up -d
# Example: run kg-indexer natively
DATABASE_URL=postgresql://postgres:postgres@localhost:5432/gaia \
KAFKA_BROKER=localhost:9092 cargo run -p kg-indexerOption C — Run the API natively:
docker compose --profile infra up -d
cd api && bun install && bun run db:migrate && bun run startThe API is available at http://localhost:3000.
| Profile | Command | What it starts |
|---|---|---|
infra |
docker compose --profile infra up |
Kafka, PostgreSQL, OpenSearch |
tools |
docker compose --profile infra --profile tools up |
+ Kafka UI (:8080), OpenSearch Dashboards (:5601) |
services |
docker compose --profile infra --profile services up |
+ hermes-pipeline, atlas, kg-indexer, search-indexer, hermes-ipfs-cache, vote-indexer, api, scoring-cronjob |
executor |
docker compose --profile infra --profile services --profile executor up |
+ proposal-executor (requires secrets) |
# View logs for a service
docker compose logs -f kg-indexer
# Rebuild a single service
docker compose build kg-indexer
# Build all services in parallel
docker compose --profile services build --parallel
# Reset all data (remove volumes)
docker compose --profile infra down -vdocs/— cross-cutting system documentation<crate>/docs/— crate-specific docs (decisions, plans, architecture)<crate>/README.md— crate entry point
When adding a new crate, update the subsystem table above and add a crate README.
- Hermes Architecture — event streaming system design
- API Architecture — API layers, tech stack, query patterns
- Decision Records & RFCs — central index of all ADRs and RFCs
- Gotchas — known sharp edges and workarounds
- Atlas Canonical Graph Spec
- Canonical Graph Spec
- Versioned Diffing Spec
- RFC 0001: Canonical Graph Inputs
- RFC 0002: Graph Diff Emission
- RFC 0003: Context-Aware Versioned Diffs
Legacy System (pre-Hermes)
The following crates are from the pre-Hermes architecture and are sunset. They are not actively maintained and will be removed in a future cleanup:
indexer/— legacy knowledge graph indexer (replaced by kg-indexer + Hermes pipeline)cache/— legacy IPFS cache (replaced by hermes-ipfs-cache)wire/— legacy protobuf wire formatstream/— legacy substreams connectorindexer_utils/— legacy indexer utilities