P
Persist

Changelog

Follow along as we ship new adapters, SDK features, and platform improvements.

v0.1.0

Initial release with local-first storage, four adapters, and P2P sync

Persist v0.1.0

This is the initial release of Persist, a local-first storage SDK with pluggable backends and automatic sync.

Core features

  • Four store classes: records (key-value documents), events (append-only logs), blobs (binary objects), and kv (simple key-value). Each class exposes a consistent CRUD API across all adapters.
  • Unified createStore API: a single function initializes a store with the specified adapter. Adapter-specific configuration is passed inline.
  • Typed SDK: full TypeScript type definitions with generic type parameters for record values. The Python SDK includes type stubs for IDE support.

Adapters

  • SQLite: embedded local storage with WAL mode, batch writes, and zero configuration. Default adapter for local-first workflows.
  • Postgres: remote storage with connection pooling, schema migrations, and full sync support. Suited for server-side workloads.
  • S3: blob storage for AWS S3, Cloudflare R2, and S3-compatible services. Supports multipart uploads and presigned URLs.
  • P2P: device-to-device replication over libp2p with mDNS discovery, DHT peer finding, and NAT traversal.

Sync engine

  • Queue-based sync with local persistence. Pending operations survive process restarts.
  • Three conflict resolution strategies: last-write-wins, custom merge functions, and manual resolution.
  • Sync planner with batch optimization, deduplication, and payload compression.

Encryption

  • Envelope encryption with AES-256-GCM for data at rest.
  • Ed25519 signing for sync payloads.
  • Key generation, rotation, and export utilities. Rotation is atomic and non-blocking.

CLI

  • persist store create/list/info for store management.
  • persist records/events/kv for data operations.
  • persist sync status/push/queue for sync monitoring.
  • persist export/import for data portability.
  • Shell completions for bash, zsh, and fish.

Known limitations

  • Blob replication over P2P is not yet supported. Use the S3 adapter for large binary objects.
  • The Postgres adapter does not support blob storage. Combine with S3 for mixed workloads.
  • Sync server authentication is token-based only. OAuth and OIDC support are planned for v0.2.
  • The Python SDK does not yet support P2P sync. Use the TypeScript SDK for P2P workflows.