TinyBase is a local-first reactive store for JavaScript and TypeScript apps, with schemas, queries, persistence, and CRDT synchronization.
Overview
TinyBase provides an in-memory, reactive data layer for JavaScript and TypeScript applications that need instant UI updates and offline-capable local state. Values and tabular rows live in a Store that notifies listeners when any referenced cell or field changes, which keeps views in sync without manual refresh logic.
Beyond key-value and table modeling, TinyBase adds optional schemas, indexes, metrics, relationships, and a SQL-adjacent query engine called TinyQL for filtering, joining, and grouping. UI bindings exist for React, Solid, and Svelte, including charts and inspector tooling for debugging data during development.
MergeableStore support brings CRDT-style synchronization across clients or servers, with persisters for browser storage, files, SQLite, PostgreSQL, and integrations with ecosystems such as Yjs and Automerge. The project emphasizes small bundle size and broad runtime support for browser and server-side JavaScript.
Typical examples in the documentation walk through todo lists, chat, drawing, charting, and games with synced persistence. TinyBase is intended as embeddable infrastructure inside your own app rather than a hosted product.
Key features
- Reactive key-value and table stores
- TinyQL query and aggregation
- React, Solid, and Svelte bindings
- CRDT merge and sync engine
- Persisters for SQLite and PostgreSQL
- Optional typed schemas
- Indexes, metrics, and relationships
- Inspector and chart components
Use cases
- Local-first collaborative web apps
- Reactive dashboards without manual cache wiring
- Offline-capable browser applications
- Synced in-memory state across clients