Skip to content

Commit 93c5474

Browse files
committed
docs: update README with neutral technical framing and TF-Tech NV ownership
1 parent cf92b46 commit 93c5474

1 file changed

Lines changed: 48 additions & 24 deletions

File tree

README.md

Lines changed: 48 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,66 @@
11
# TFChain GraphQL
22

3-
TFChain GraphQL provides a GraphQL indexing and query interface for TFChain, the ThreeFold blockchain. It uses [Subsquid](https://docs.subsquid.io) to index on-chain events and expose them through a GraphQL API.
3+
A high-performance indexing layer with a queryable GraphQL API over TFChain on-chain data. It enables efficient data access for dashboards, applications, and analytics tools without directly querying the blockchain.
44

5-
## Concept
5+
## What this is
66

7-
The substrate events are processed in a multi-step pipeline:
7+
This project provides a Subsquid-based indexer that consumes raw blockchain events from TFChain, transforms them into a structured schema, and exposes them through a GraphQL endpoint. It replaces direct chain queries with a fast, developer-friendly API suitable for front-end applications and data analytics.
88

9-
Tfchain => Squid Indexer => Indexer GraphQL gateway => Squid Processor => Database => Query Node GraphQL endpoint
9+
## What this repository contains
1010

11-
![Bird eye overview](https://gblobscdn.gitbook.com/assets%2F-MdI-MAyz-csivC8mmdb%2Fsync%2Fe587479ff22ad79886861487b2734b6556302d10.png?alt=media)
11+
- **Indexer** — Docker Compose setup for the Squid indexer that ingests on-chain events
12+
- **Processor** — Event processing pipeline that maps raw chain data to database models
13+
- **GraphQL schema**`schema.graphql` defining the queryable data model
14+
- **Database migrations** — Migration files for the processor database
15+
- **Type definitions** — Chain-specific type files for decoding events
16+
- **Mapping functions** — Logic for transforming events into indexed entities
17+
- **Scripts** — Utility scripts for generating initial state and development workflows
18+
19+
## Role in the stack
20+
21+
The indexer sits between the blockchain and consumer applications. It decouples data access from the chain, allowing complex queries, aggregations, and historical lookups that would be inefficient or impossible via direct RPC calls. Dashboards, explorers, and third-party integrations rely on this layer for real-time and historical data.
22+
23+
The data pipeline is:
24+
25+
```
26+
TFChain => Squid Indexer => Indexer GraphQL gateway => Squid Processor => Database => Query Node GraphQL endpoint
27+
```
28+
29+
## Relation to ThreeFold
30+
31+
This technology is used within the ThreeFold ecosystem and was first deployed on the ThreeFold Grid. The component itself is designed as reusable infrastructure technology and should be understood by its technical function first, independent of any specific deployment.
32+
33+
## Ownership
34+
35+
This repository is owned and maintained by TF-Tech NV, a Belgian company responsible for the development and maintenance of this technology.
1236

1337
## Prerequisites
1438

15-
* Node v16x
16-
* Docker
17-
* Docker-compose
39+
- Node v16.x
40+
- Docker
41+
- Docker Compose
1842

1943
## Running
2044

21-
see [docs](./docs/readme.md)
45+
See [docs](./docs/readme.md) for detailed running instructions.
2246

2347
## Project layout
2448

25-
- `indexer` - docker-compose setup for the indexer
26-
- `db` - Processor db migration files
27-
- `scripts` - Scripts for generating initial state and development scripts
28-
- `src` - Source
29-
- `mappings` - Mapper functions for the indexer data
30-
- `model` - Generated models from the `schema.graphql` file
31-
- `types` - Type files that require manual edit if the schema changes / or chain types change
32-
- `processor.ts` - Processor entrypoint
33-
- `typegen` - Where the declaration files are generated from (used for development)
34-
- `tfchainVersions.jsonl` - Generated tfchain runtime versions and their data
35-
- `typegen.json` - Typegen config
36-
- `typesBundle.json` - Typegen bundle config
37-
- `schema.graphql` - The graphql schema file, changes to this file will results in changes to the models (`src/models`)
49+
- `indexer` — Docker Compose setup for the indexer
50+
- `db` Processor database migration files
51+
- `scripts` Scripts for generating initial state and development scripts
52+
- `src` Source code
53+
- `mappings` Mapper functions for indexer data
54+
- `model` Generated models from the `schema.graphql` file
55+
- `types` Type files that require manual edits when the schema or chain types change
56+
- `processor.ts` Processor entrypoint
57+
- `typegen` — Declaration file generation (used for development)
58+
- `tfchainVersions.jsonl` Generated TFChain runtime versions and their data
59+
- `typegen.json` Typegen config
60+
- `typesBundle.json` Typegen bundle config
61+
- `schema.graphql` The GraphQL schema file; changes to this file result in changes to the models in `src/models`
3862

3963
## License
4064

41-
This project is licensed under the Apache License 2.0 - see the [LICENSE](LICENSE) file for details.
42-
Copyright (c) TFTech NV.
65+
This project is licensed under the Apache License 2.0 see the [LICENSE](LICENSE) file for details.
66+
Copyright (c) TFTech NV.

0 commit comments

Comments
 (0)