- Open the database
- Create the space “team chat”
- Add B and C as writer
A local-first database for people and agents.
For when a central database is the wrong place.
Everyone works on their own copy, under their own keys. The relay in the middle can't read a thing.
NoCentralDB does not exist yet. This page shows what it is designed to do; the design is open in the RFCs.
On a member
- tasksWrite the READMEopen · priority 1
- tasksWrite the READMEstatus → in_progress
- peopleAda ••••••personal field
- messagesDraft is up for reviewagent · planner
On the relay
- 312 B
9f3ac01e77b2d54a0c6e1f8b3d92a7e4c5b0f61d28a3 - 188 B
9f3ac01e77b2d54a0c6e1f8b3d92a7e4c5b0f61d28a3 - 264 B
9f3ac01e77b2d54a0c6e1f8b3d92a7e4c5b0f61d28a3 - 240 B
9f3ac01e77b2d54a0c6e1f8b3d92a7e4c5b0f61d28a3
Your data lives where the work happens.
On every device and with every agent you trust, under your own keys. The cloud carries it. It never owns it.
Why the data sits with the people and agents
- Shred a person, not a backup huntA person's data can be shredded by destroying their key. It does not reach devices that never come back online.Read the case
- A relay breach leaks no contentThe relay is designed to hold no keys. A copy of its database is ciphertext and metadata.Read the case
- An outside agent in one spaceIt gets the keys of one space, signs every write, and the relay sends it no new changes once you remove it.Read the case
- A thousand agent queries a minuteAgents query their own copy: no round trip, no rate limit, no cost per read. Writes still go through the relay.Read the case
- The relay goes down, work goes onIn island mode every member keeps reading and writing. On rejoin, every copy converges.Read the case
What you keep without a server in the middle
- Writing together through a tunnelCollision-free edits on shared text: both keep typing offline, and no text is lost when they meet again.Read the case
- Subscribe instead of pollA query on a declared index calls your app when a change may alter its page.Read the case
- Streaming as a data typeAn agent's answer arrives chunk by chunk, over the same encrypted change stream.Read the case
Two members, one space, and a relay that carries only bytes.
Here the real SDK will run in three frames, with the relay in your browser. Until it exists, this is a simulation of what you will see.
Network gone? Your writes are stored locally and sync when the relay is back.
Five calls, once the SDK ships.
No keys in your code: the SDK is designed to create, store and rotate them.
npm install @nocentraldb/sdkRust: cargo add nocentraldb
Describe the model once. ncdb model build turns it into model.lock.json.
import { nc } from "@nocentraldb/sdk";
export const model = nc.model({
messages: nc.collection(
{
text: nc.string(),
author: nc.link("people"),
sentAt: nc.int(),
},
{ indexes: { bySentAt: nc.index(["sentAt"]) } },
),
});On first open, A creates this member's key, then a space. It needs no relay to start.
const db = await nc.open({ model, lock, relay: "wss://relay.example.com" });
const chat = await db.spaces.create();One write is one signed, encrypted change. It resolves before the relay has it.
await chat.write((tx) => {
tx.create(model.messages, { text: "Can you look at the relay draft?", sentAt: Date.now() });
});C reads its own copy. The listener runs at once and after every change that may alter the page.
const latest = model.messages.indexes.bySentAt.take(50);
const stop = db.subscribe(latest, (page) => render(page.items));When a central database is exactly right.
If your app needs queries on the server, analytics across all users' data, or one global truth at write time, such as unique names, use a central database. And know these limits before you build on NoCentralDB:
- The relay sees metadata.
- Which key is in which space, when and how much each key writes, and who reads from where. It can withhold changes.
- Removing a member keeps their copy.
- The space key rotates, so they get no new changes. What they already received stays on their device.
- Shredding has edges.
- It does not reach devices that never come back online, a modified client, exports, screenshots or unmarked free text.
- v1 is not post-quantum.
- Ciphertext recorded today could be read by a future quantum computer.