std-toolkit
v0.0.9
Published
Single-table design toolkit — database-agnostic sync over single-table item collections, with schema evolution, portable database adapters, and TanStack DB integration
Readme
std-toolkit
Single-table design toolkit — database-agnostic sync over single-table item collections, with schema evolution, portable database adapters, and TanStack DB integration.
Install
npm install std-toolkitPeer dependencies (install what you use):
npm install effect # required by all subpaths
npm install @tanstack/react-db react # required by syncSubpaths
| Subpath | Description |
| --------------------------------------------------------------------------- | ----------------------------------------------------------------------------- |
| std-toolkit/core | Entity codecs and shared decoded application primitives |
| std-toolkit/eschema | Versioned, self-migrating schemas built on Effect Schema |
| std-toolkit/snapshot | Semantic contract decoding, inspection, comparison, and rendering |
| std-toolkit/studio-rpc | Runtime-discovered, read-only StdTable access for Studio |
| std-toolkit/db | Portable Table and Entity definitions and operations |
| std-toolkit/db/dynamodb | DynamoDB binding, setup, expression builder, and native operations |
| std-toolkit/db/sqlite | SQLite binding and setup with separate environment driver entrypoints |
| std-toolkit/db/idb | IndexedDB binding and explicit Store setup |
| std-toolkit/db/memory | Dependency-free, ephemeral Memory adapter for any JavaScript runtime |
| std-toolkit/sync | TanStack DB sync with local replicas, paced writes, and best-effort Peer Sync |
Requirements
Node ≥ 24
Contract snapshots
Default-export a schema or table snapshot from std-toolkit.snapshot.ts, then
approve and verify the committed std-toolkit.snapshot.json baseline:
std-toolkit snapshot approve # write the baseline
std-toolkit snapshot # check against itsnapshot reports only what changed and exits with status 1 when the declared
storage contract differs from its approved baseline, making it suitable for
GitHub Actions.
