Nuska

Git-like version control for any key/value datasource.

@codecanon/nuska is a headless TypeScript library that brings git-like version control to any key/value datasource. Think commits, branches, diffs, 3-way merges, and pull requests — but over your own data (IndexedDB, PostgreSQL, MongoDB, etc.) instead of files.

Highlights

  • Atomic commits — group key/value mutations into commits with message, author, and timestamp
  • Branching — create, checkout, and delete branches; each branch has its own HEAD
  • Diffs — compare any two commits to see exactly what changed
  • 3-way merge — merge branches with automatic conflict detection and resolution
  • Pull requests — open, merge, or close PRs with full status tracking
  • Paginated history — efficient cursor-based log that never loads all commits at once
  • Pluggable adapters — implement two small interfaces to version any store: SQL, NoSQL, cloud, or in-memory
  • React bindingsuseNuskaEngine, NuskaProvider, and useNuska for reactive state

Entry points

ImportContents
@codecanon/nuskaNuskaEngine, core types, MemoryDataSourceAdapter, MemoryVersionStore
@codecanon/nuska/adaptersAll adapters including IndexedDBDataSourceAdapter, IndexedDBVersionStore
@codecanon/nuska/reactuseNuskaEngine, NuskaProvider, useNuska

Quick navigation

On this page