This is the official TypeScript implementation of the Topology Protocol. The Topology Protocol is a local-first decentralized protocol for real-time applications. It introduces a new concept for Conflict-free Replicated Objects (CRO), that are built on top of libp2p and composed of CRDTs.
The specifications of the Topology Protocol are shared across different client implementations and can be found in the specs repository. Currently the specifications are starting to be written based on this implementation.
This repository is a monorepo that contains the following packages:
Package | Description |
---|---|
crdt | CRDT implementations intended to use as builtins |
network | Network middleware to abstract libp2p |
node | Topology Node library and CLI |
object | CRO objects structure implementation |
All the examples are located in the examples
directory. Currently, there is only one example, which is a simple canvas where you can paint pixels. You can also look into the counter-splash (demo for EthCC 2024) repository for a more complex example.
This workspae has all packages and examples linked together, so you can run the following commands to start the development:
# pnpm
pnpm install
The postinstall script will build all the packages. In case you have errors, please manually build every package inside the folder packages
.