passnote 1.1.1
passnote: ^1.1.1 copied to clipboard
End-to-end encrypted, server-less, local-first CRDT sync engine for Dart: typed collections, queries, SQLite storage, device identity, sync protocol.
passnote #
The pure-Dart engine behind Passnote, an end-to-end encrypted, local-first CRDT sync engine: CRDT-backed collections, the SQLite storage engine, device identity, the port interfaces, and the wire protocol. No Flutter dependency.
Flutter apps should depend on
passnote_flutter instead: it adds
the platform key store, a ChangeNotifier view of a collection, and
passnoteBuilder for batteries-included setup, and it re-exports this package.
Depend on passnote directly for a pure-Dart program, or when wiring your own
adapters.
What's inside #
Passnote/Database/Collection<T>: the app handle, an encrypted shared dataset, and typed queryable document sets.Passnote.builder(...): staged configuration;passnoteLowLevelandpackage:passnote/engine.dartare the advanced surface.- Ports:
CrdtTable,Cipher,KeyStore,Transport,MergeStrategy,Identity,Pake. The engine depends only on these interfaces. - Engine:
SqliteCrdtTable(SQLite, SQLCipher at rest, wasm on the web);MapCrdtTablefor tests. - Identity: per-device keypairs, PAKE pairing, group-key wrap and rotation, a forward-secrecy ratchet.
Codec/JsonCodec: typed document (de)serialisation.- In-memory transport:
InMemoryTransportover anInMemoryBusfor tests.
Install #
dependencies:
passnote: ^1.1.1
Usage #
import 'package:passnote/passnote.dart';
// Supply the adapters as builder defaults once, then open.
final passnote = await Passnote.builder(appId: 'myapp', salt: 'myapp:v1').open();
final db = await passnote.openDatabase('home', passphrase: words);
final items = db.collection<Item>('items', itemCodec);
Adapters #
Backends implementing the ports are published separately: passnote_crypto
(cipher, key derivation, PAKE), passnote_lan (mDNS + WebSocket transport),
passnote_flutter (keychain key store, CollectionNotifier, passnoteBuilder).
Documentation #
See the Passnote documentation, in particular Sync.
