Skip to content

Local-first apps that scale to the cloud with nothing to run

coven

Bring your own storage

DropboxOneDriveiCloud (CloudKit)S3-compatible

Learn more →

How it works

The life of a store

Local first ​

The phone inserts a row. It commits on-device; nothing waits on a network.

rust
handle.write(|sql| {
    sql.execute("INSERT …", params)?;
    Ok::<_, CovenError>(())
}).await?;
PHONECLOUDLAPTOPnote · “milk run”(no cloud configured)(nothing yet)

Serverless sync ​

The cloud becomes the sync medium. Devices publish encrypted, signed slots in one shared order and read each other's; it only ever holds ciphertext.

rust
handle.start_sync().await?;
PHONECLOUDLAPTOPnote · “milk run”publish · sealedseq/1 · signedreadnote · “milk run”

Everyone writes ​

Apart, both devices edit the same row. The next sync applies both: merge is cell by cell.

sql
UPDATE notes SET body = 'oat, 2%' …
PHONECLOUDLAPTOPtitle → “Milk run”body → “oat, 2%”seq/2 · phone: titleseq/3 · laptop: bodymerge on readMilk runoat milk, 2%Milk runoat milk, 2%

Files, too ​

A photo commits in the row's transaction. The laptop takes the row now and streams the photo on first view.

rust
handle.write(move |sql| {
    let file = sql.put_user_file("photos", photo, Place::Cloud)?;
    sql.execute("INSERT INTO photos (id, file) VALUES (?1, ?2)", (id, file))?;
    Ok::<_, CovenError>(())
}).await?;
PHONECLOUDLAPTOPphotos rowIMG_204.jpgone transactionslot · the rowfile · its own keyphotos rowIMG_204.jpgstreams on first view

Beyond the disk ​

Each device caches what it reads, within a budget, and fetches only the chunks a read needs. A pin keeps a file whole for offline.

rust
handle.pin(&[recording]).await?;
PHONECLOUDLAPTOPrecording · 48 MBpinon readpinned · whole filecache · chunks readkept whatever the budgetevicted when over budget

Pick who sees ​

Rows can belong to a circle. Moving a note into Gifts takes it off every device outside the circle; the rest of the store still syncs to everyone.

sql
UPDATE notes SET audience = :gifts …
ANA'S PHONECLOUDCAROL'S LAPTOPgift ideas · storepart · store keygift ideasmoved into Giftsgift ideas · Giftspart · Gifts keyremoved: not in GiftsAna and Ben read it

Released under the Apache-2.0 License.