Skip to content

A tiny, dependency-free, reactive data store and synchronization engine for JavaScript applications. It provides granular subscriptions so UIs only re-render when relevant data changes, keeping apps fast and predictable.

Data can be modeled as simple key-value pairs or as tabular structures with rows and cells. Built-in capabilities include schemas with defaults and type inference, indexes for fast lookups, metrics for aggregations, relationships between tables, an undo/redo checkpoint system, and a SQL-adjacent query engine (TinyQL) for selecting, joining, filtering, and grouping—reactively.

Designed for local-first and offline-first workflows, it offers native CRDT support via MergeableStore to synchronize and deterministically merge data across clients and servers. Persistence is available to browser storage and IndexedDB, as well as databases like SQLite and PostgreSQL, plus integrations with Yjs and Automerge.

Optional React bindings include hooks and lightweight UI components for building fully reactive interfaces, along with an in-app Inspector to view and edit store data live during development. Despite its breadth, the core remains small (around 5.3kB–11.7kB gzipped), fully documented, and rigorously tested.

Features

  • Reactive in-memory data store
  • Key-value and tabular data models
  • Granular listeners and subscriptions
  • TinyQL query engine (select/join/filter/group)
  • Indexes for fast lookups
  • Metrics and aggregations
  • Table relationships
  • Schemas with defaults and type inference
  • Checkpoints with undo/redo
  • Native CRDT MergeableStore
  • Synchronization over WebSockets, BroadcastChannel, and custom transports
  • Persistence to browser storage and IndexedDB
  • Database persistence for SQLite and PostgreSQL (and variants like Bun/Expo SQLite)
  • Integrations with Yjs, Automerge, CR-SQLite, PGlite, ElectricSQL, Turso, PartyKit, Cloudflare Durable Objects
  • Optional React hooks and prebuilt components (ui-react, ui-react-dom)
  • In-app data Inspector devtool
  • Local-first and offline-friendly design
  • Tiny bundle size with zero dependencies
  • 100% test coverage and extensive docs

Related Items

Legend State

This powerful library streamlines state management in your applications, making complex data handling a breeze.

MobX

This state management solution enables seamless integration of dynamic data in your applications, adapting to changes effortlessly.

Redux Toolkit

A comprehensive toolkit designed to streamline and enhance the Redux development process, ensuring that applications are predictable and maintainable.

valtio

This library simplifies proxy-based state management for modern applications, enhancing the development experience with efficient rendering and easy state manipulation.

TanStack DB

Reactive client store with live queries and optimistic mutations for sub-millisecond, consistent UIs and real-time sync.

Jotai

A powerful yet lightweight state management solution that adopts an atomic approach for managing state in React applications.

MobX-State-Tree

A full-featured library that simplifies state management by providing a structured approach to mutable state handling.

TanStack Router

A modern and scalable routing library designed specifically for React, specializing in type safety and efficient data management.