Persist is a local-first storage SDK with pluggable backends, automatic sync, and P2P encryption. One API for records, events, blobs, and key-value data.
import { createStore } from "@cuitty/persist";
const store = createStore("notes", { adapter: "sqlite",
sync: { remote: "postgres",
strategy: "last-write-wins" },
encrypt: true,
});
await store.records.put("note-1", { title: "Hello from Persist",
body: "Syncs everywhere.",
}); npm install @cuitty/persistOne SDK. Pluggable backends. Automatic sync. No vendor lock-in.
SQLite, Postgres, S3, P2P — swap backends without changing your code.
Learn more →Conflict-free replication with configurable strategies: LWW, merge, or manual.
Learn more →Records, events, blobs, and key-value — one unified API for all data shapes.
Learn more →Portable archives. Export everything. Import anywhere. Your data is always yours.
Learn more →Each adapter supports a different subset of storage classes. Mix and match to fit your architecture.
| Adapter | Records | Events | Blobs | KV |
|---|---|---|---|---|
| SQLite | ||||
| Postgres | — | |||
| S3 | — | — | — | |
| P2P (libp2p) |
Persist sits between your application code and your storage backends, handling sync, encryption, and conflict resolution automatically.
App Code
│
▼
┌─────────────┐
│ Persist SDK │
└──────┬──────┘
│
┌────┴────┐
▼ ▼
Adapter Sync Engine
Registry │
│ ┌───┴───┐
▼ ▼ ▼
SQLite Postgres P2P
S3 │
Crypto
Envelope
Get up and running in under 5 minutes. One install, one API, every backend.