Bit.Bcrdt
11.0.0-pre-22
dotnet add package Bit.Bcrdt --version 11.0.0-pre-22
NuGet\Install-Package Bit.Bcrdt -Version 11.0.0-pre-22
<PackageReference Include="Bit.Bcrdt" Version="11.0.0-pre-22" />
<PackageVersion Include="Bit.Bcrdt" Version="11.0.0-pre-22" />
<PackageReference Include="Bit.Bcrdt" />
paket add Bit.Bcrdt --version 11.0.0-pre-22
#r "nuget: Bit.Bcrdt, 11.0.0-pre-22"
#:package Bit.Bcrdt@11.0.0-pre-22
#addin nuget:?package=Bit.Bcrdt&version=11.0.0-pre-22&prerelease
#tool nuget:?package=Bit.Bcrdt&version=11.0.0-pre-22&prerelease
Bit.Bcrdt
Real-time collaborative editing for .NET and Blazor, written natively in C#: a CRDT engine, a synchronization protocol, presence, offline-first persistence, selective undo and Blazor components. There is no JavaScript CRDT library underneath and no port of one - the engine, the wire format and the merge algorithm are all C#, and none of it needs JavaScript interop, so it runs the same in Blazor WebAssembly, Server and Hybrid, in a worker or in a console app.
Quick start
dotnet add package Bit.Bcrdt
using Bit.Bcrdt;
builder.Services.AddBitBcrdtServices(collaboration => collaboration
.UseTransport(new BcrdtWebSocketTransportFactory("https://example.com/ws/bcrdt/{documentId}"))
.UseStore(new BcrdtFileSystemDocumentStore("./documents")));
BcrdtCollaborativeDocument document = await collaboration.OpenAsync("design-review");
using (var transaction = document.BeginTransaction())
{
document.Map.Set("title", "Q3 planning");
document.Array("attendees").Push("Ada", "Grace");
document.Text("notes").Insert(0, "Agenda:\n");
}
Two people running that against the same document identifier both end up with the same document, whether they were
online at the time or not. For the SignalR transport add Bit.Bcrdt.SignalR; for the relay a server maps, add
Bit.Bcrdt.Server; to keep documents in a bit BlazeDb database, Bit.Bcrdt.BlazeDb; and to follow the browser's
network and page lifecycle in WebAssembly, Bit.Bcrdt.Butil.
Blazor
@using Bit.Bcrdt
<BcrdtCollaborationScope DocumentId="notes-42" User="_me" Context="document">
<BcrdtPresenceView Presence="document.Presence" />
<BcrdtSyncStatus />
<BcrdtTextArea Text="@document.Text("body")" Presence="document.Presence" />
</BcrdtCollaborationScope>
@code {
private readonly BcrdtCollaboratorInfo _me = new("u-1", "Ada", BcrdtPresenceService.SuggestColor("u-1"));
}
That is a working collaborative editor with live presence, automatic reconnection and offline support.
BcrdtCollaborationScopeopens a document for its content, cascades it, and closes it again.BcrdtTextAreaedits aBcrdtText: what the user types becomes the minimal CRDT edit, remote edits arrive without moving the caret or overwriting keystrokes still in flight, and the caret is published through presence.BcrdtPresenceViewlists the people on a document.BcrdtSyncStatussays where the document's connection stands - synced, reconnecting, offline or local only, when it last synced, read-only or not - in a polite live region, optionally with a button that takes it offline and back.BcrdtComponentBasemarshals change notifications onto the renderer and coalesces them onto a frame budget, and disposes its subscriptions with the component - the base for your own collaborative components.
No stylesheet to reference and no script to add: the one small module BcrdtTextArea needs is imported on demand.
Works in Blazor WebAssembly, Server, Web App (including prerendering) and Hybrid.
A WebAssembly app can skip the registration and lazy load Bit.Bcrdt.wasm instead, configuring the collaboration
service through IServiceProvider.GetBcrdtCollaborationService(...); see
lazy loading.
Features
- A YATA-family sequence CRDT with run-length-encoded blocks:
BcrdtText(with rich-text marks),BcrdtArray,BcrdtMap,BcrdtSetandBcrdtCounter, nestable inside each other - and an XML tree for ProseMirror-style structured editors:BcrdtXmlFragment,BcrdtXmlElementandBcrdtXmlText. BcrdtOrderedCollection, for task boards and lists people reorder together: items move by fractional order key (BcrdtOrderKey), so concurrent moves never duplicate an item and never lose an edit made to it.- Incremental binary updates that merge without a document, and a symmetric, loss-, duplication- and reorder-tolerant sync protocol with jittered reconnection - offline work flows both ways on reconnect, deletions included.
- Presence: who is here, colours, and carets and selections anchored to content rather than to indices.
- Append-only, checksummed persistence with compaction; in-memory and file-system stores.
- Selective undo that reverses your own edits and leaves everyone else's alone.
- Snapshots that restore any point in a document's history.
BcrdtTextSynchronizerandBcrdtTextInputBinding, which turn an input's whole new value into the minimal edit.- In-memory and WebSocket client transports, and live sync between the tabs of one browser - offline too - over a
BroadcastChannel(UseCrossTabSync()); every seam - transport, store, client identity - is an interface. - Metrics and distributed tracing through
System.Diagnostics-BcrdtDiagnostics.MeterNameandBcrdtDiagnostics.ActivitySourceName- that never record a document, client or user identifier. - .NET 10 and 11; trim- and AOT-safe for the collaborative value model; lazy loadable on WebAssembly.
For AI agents
The demo site hosts an MCP server at https://bcrdt.bitplatform.dev/mcp
that answers from the shipped library: its API, its guide, the demo's working pages,
and a merge inspector that runs the real engine.
Documentation
The full guide - choosing a data type, documents and transactions, input bindings, presence, offline and reconnection, persistence, undo, hosting models, transports and relays, extending the library and the architecture - is in the Bcrdt README. See it running at bcrdt.bitplatform.dev.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. net11.0 is compatible. |
-
net10.0
- Microsoft.AspNetCore.Components.Web (>= 10.0.0 && < 11.0.0)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.0 && < 11.0.0)
-
net11.0
- Microsoft.AspNetCore.Components.Web (>= 11.0.0 && < 12.0.0)
NuGet packages (10)
Showing the top 5 NuGet packages that depend on Bit.Bcrdt:
| Package | Downloads |
|---|---|
|
Bit.Bcrdt.Server
The ASP.NET Core relays for bit Bcrdt: the SignalR hub the Bit.Bcrdt.SignalR transport talks to, and the WebSocket endpoint the built-in WebSocket transport talks to. Both only relay - neither decodes a message nor holds a replica. Also the Blazor Server circuit handler that withdraws a closed tab's presence. |
|
|
Bit.Bcrdt.Testing
Test support for bit Bcrdt: a deterministic, seeded network simulator with loss, duplication, reordering, partitions and offline peers; random operation generators; a convergence harness; and an update corrupter for fuzzing the wire format. Framework-neutral, so it works with MSTest, xUnit or NUnit. |
|
|
Bit.Bcrdt.SignalR
The SignalR client transport for bit Bcrdt. It carries no ASP.NET Core server dependency, so it runs in Blazor WebAssembly, Server and Hybrid alike; map the matching hub from Bit.Bcrdt.Server on the server. |
|
|
Bit.Bcrdt.Butil
Browser lifecycle integration for bit Bcrdt in Blazor WebAssembly, through bit Butil: documents waiting out a reconnection backoff reconnect the moment the browser is back online or the page is shown again, every open document is flushed to its store when the page is hidden, presence is withdrawn while the page is unloaded or in the back/forward cache, and persistent storage can be requested so the browser does not evict documents kept for offline use. |
|
|
Bit.BlazeDb.Bcrdt
Keeps Bit.Bcrdt collaborative documents in a Bit.BlazeDb database: an IBcrdtDocumentStore whose appends are journaled by BlazeDb's write-ahead log and whose compactions are single transactions, so offline edits survive restarts alongside the application's other data, encrypted and backed up with it. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 11.0.0-pre-22 | 0 | 11/18/2026 |
| 11.0.0-pre-21 | 143 | 11/17/2026 |
| 11.0.0-pre-20 | 537 | 11/15/2026 |
| 11.0.0-pre-19 | 389 | 11/13/2026 |
| 11.0.0-pre-18 | 448 | 11/11/2026 |
| 11.0.0-pre-17 | 752 | 11/4/2026 |
| 11.0.0-pre-16 | 379 | 11/2/2026 |
| 11.0.0-pre-15 | 160 | 10/27/2026 |
| 11.0.0-pre-14 | 92 | 10/26/2026 |
| 11.0.0-pre-13 | 97 | 10/26/2026 |
| 11.0.0-pre-12 | 91 | 10/26/2026 |
| 11.0.0-pre-11 | 103 | 10/25/2026 |
| 11.0.0-pre-10 | 124 | 10/20/2026 |
| 10.7.0 | 181 | 10/25/2026 |
| 10.7.0-pre-04 | 142 | 10/25/2026 |
| 10.7.0-pre-03 | 140 | 10/22/2026 |
| 10.7.0-pre-02 | 141 | 10/22/2026 |