coven/
lib.rs

1//! coven — end-to-end encrypted, multi-writer, bring-your-own-storage SQLite
2//! sync, with an encrypted blob store and a cryptographic membership model.
3//!
4//! The host app owns its SQLite schema and domain. coven owns the sync layer:
5//! changesets captured via the SQLite session extension, HLC-stamped
6//! and signed per author, encrypted and pushed/pulled through a pluggable
7//! `CloudHome`, conflict-resolved by row-level last-writer-wins on `_updated_at`.
8//! An append-only Ed25519-signed membership chain wraps the per-library
9//! symmetric key to each member.
10//!
11//! Integration contract for the host:
12//! - Every synced table has an `id` text primary key at column 0 and an
13//!   `_updated_at TEXT NOT NULL` column (the HLC/LWW timestamp).
14//! - The host applies [`db::MIGRATION_SQL`] to create coven's bookkeeping tables
15//!   and implements [`db::SyncBookkeeping`] + [`db::RawDbHandle`].
16//! - The host supplies the synced-table list, a [`blob::BlobPlan`], and an
17//!   optional [`blob::BlobUploadObserver`].
18
19pub mod blob;
20pub mod changeset;
21pub mod clock;
22pub mod config;
23pub mod db;
24pub mod encryption;
25pub mod id_provider;
26pub mod join_code;
27pub mod keys;
28pub mod library_dir;
29pub mod oauth;
30pub mod storage;
31pub mod sync;