A leader emerges.
Leader election gives the cluster a place to coordinate. When leadership changes, a new term begins.
A TypeScript consensus toolkit
Independent by nature.
Together, by agreement.
Open source. Built with Bun. Made to be explored.
Select a node. Move the leadership.
Illustrative interaction · The real cluster is in the Observatory.
01 / THE IDEA
Raft makes the journey from an individual proposal to shared state something you can build, inspect, and understand.
Leader election gives the cluster a place to coordinate. When leadership changes, a new term begins.
The leader proposes an entry. Members replicate it in their logs, working toward a quorum.
Committed entries are applied to state machines. The shared history becomes something useful.
02 / THE OBSERVATORY
Every election. Every instruction.
A live view into a
distributed world.
Watch elections, transfer leadership, and explore what happens when nodes stop or networks split.
Send a node report or SHA-256 probe. Follow commitment, destination execution, and the actual response.
Inspect per-node RPCs, response latency, and replication lag, streamed to the interface with SSE.
03 / THE ECOSYSTEM
A consensus engine at the center.
A family of packages around
it.
Pick your point of entry.
@usex/raft
Elections, replication, snapshots, and state machines.
CORE 02@usex/raft-nestjs
Modules, decorators, lifecycle, and dependency injection.
NESTJS 03@usex/raft-kv-server
A key-value service with a Raft-backed write path.
SERVER 04@usex/kv-server-sdk
Generate a typed client from the server’s OpenAPI contract.
SDK 05@usex/raft-playground
The live Observatory, a CLI, and 14 executable scenarios.
EXPLORE 06@usex/raft-nestjs-playground
Experiments with caching, locks, task queues, and more.
LEARN04 / YOUR TURN
Start with a question.
Open the playground.
See where
the nodes take you.
bun install --frozen-lockfile
bun run build
bun run --cwd packages/raft/playground dashboard
Bun 1.4.3+ and Redis on localhost:6379. Then open the Observatory at localhost:3210.