TinyBase
activeby James Pearce (tinyplex) · since 2022 · also known as TinyBase.js
Tiny reactive in-memory store for tables and values, with persisters and CRDT sync.
Overview
TinyBase is a small TypeScript data store that holds tabular data and key-values in memory, with fine-grained listeners that make React and other UIs update precisely when cells change. Optional modules add indexes, metrics, relationships, a query language (TinyQL) with joins and grouping, undo checkpoints, and persisters to IndexedDB, OPFS, SQLite, PGlite, Postgres, Cloudflare Durable Objects and more. MergeableStore and synchronizers give CRDT-based sync between clients and servers. It suits apps where the working dataset fits in memory and you want reactivity and local-first sync without a heavy framework.
Strengths & trade-offs
Strengths
- +Fine-grained cell-level listeners for precise UI updates
- +Very small, tree-shakeable modules with no dependencies
- +Many persisters, from IndexedDB to SQLite, Postgres and Durable Objects
- +Built-in CRDT MergeableStore for local-first sync
Trade-offs
- −Whole working set must fit in memory
- −Not a durable primary database by itself; relies on persisters
- −Single-maintainer project
Great for
- +Reactive client state with persistence
- +Local-first apps syncing via WebSockets or Durable Objects
- +Offline-capable dashboards and small tools
Think twice for
- −Large datasets
- −Server-side system of record
Capabilities
Native or official first-party support · 6 of 25 tracked
Scale & consistency
- Comfortable data size
- Small · ≤ 100 GB
- Horizontal scaling
- None
- Multi-region
- Active active
- Transactions
- Limited ACID
- Consistency
- Eventual
- Schema
- Flexible
- Architecture
- In memory, Embedded
- Query languages
- TinyQL
In-memory working set; MergeableStore lets many clients write and converge.
Deployment
Ecosystem
Alternatives to TinyBase
Reactive local-first NoSQL database for JavaScript with pluggable storage and replication.
tinybase vs rxdb →The most popular IndexedDB wrapper, with live queries and an optional Dexie Cloud sync service.
tinybase vs dexie →Local-first TypeScript platform: SQLite on each device, end-to-end encrypted sync through relays.
tinybase vs evolu →Local-first database with built-in sync, permissions and edit history, being rebuilt as a relational Jazz 2.
tinybase vs jazz →In-memory JavaScript document store with indexes and pluggable persistence; no longer maintained.
tinybase vs lokijs →Client-side sync framework for instant web UIs; now free, open source and in maintenance mode.
tinybase vs replicache →TinyBase FAQ
What is TinyBase?
TinyBase is a key-value database by James Pearce (tinyplex), first released in 2022. TinyBase is a small TypeScript data store that holds tabular data and key-values in memory, with fine-grained listeners that make React and other UIs update precisely when cells change. Optional modules add indexes, metrics, relationships, a query language (TinyQL) with joins and grouping, undo checkpoints, and persisters to IndexedDB, OPFS, SQLite, PGlite, Postgres, Cloudflare Durable Objects and more. MergeableStore and synchronizers give CRDT-based sync between clients and servers. It suits apps where the working dataset fits in memory and you want reactivity and local-first sync without a heavy framework.
Is TinyBase open source?
Yes. TinyBase is open source. License: MIT License.
Does TinyBase support ACID transactions?
Partly. TinyBase offers limited ACID guarantees (for example, single-record or single-partition transactions), with eventual consistency.
Does TinyBase scale horizontally?
TinyBase does not scale horizontally; it runs on a single node, so you scale it up rather than out. It is comfortable at small scale (≤ 100 GB). It supports active-active multi-region writes.
How can I run TinyBase?
You can self-host it, embed it in your application and run it at the edge.
What is TinyBase best for?
TinyBase is a strong fit for reactive client state with persistence; local-first apps syncing via WebSockets or Durable Objects; and offline-capable dashboards and small tools. Think twice for large datasets.
What are the best alternatives to TinyBase?
Common alternatives to TinyBase include RxDB, Dexie.js, Evolu, Jazz and LokiJS. The right choice depends on your workload, scale and hosting; WhichDB's smart match ranks them against your requirements.
How popular is TinyBase?
TinyBase ranks #179 of 844 databases on the WhichDB Score (18.4/100), and #24 among key-value databases. The score combines public adoption signals such as package downloads, GitHub activity, job posts and developer discussion.