Skip to content

Comparison ​

doxor sits between raw IndexedDB and a full client-side database. This page compares it with the libraries people usually consider, and says when one of them is the better choice.

Size (min+gzip)Types fromSchema changesQueriesLive queries / sync
doxor.js~4.9 kBOne declarationAutomatic + numbered migrationsIndex ranges, filterNo
idb~1.4 kBA DBSchema interfaceManual upgrade callbackRaw IndexedDBNo
idb-keyval~0.8 kBGenerics per callNone (key-value only)NoneNo
Dexie.js~31 kBTable<T> declarationsManual version bumpsRich query APIYes (liveQuery, Dexie Cloud)
localForage~9 kBGenerics per callNone (key-value only)NoneNo

Sizes are approximate, minified and gzipped. doxor is about 4.4 kB with brotli.

When not to use doxor ​

  • You only need to store a few values by key. Use idb-keyval.
  • You need live queries, complex queries or sync between devices. Use Dexie.js, RxDB or TanStack DB.
  • You want full control over raw IndexedDB with thin promises. Use idb.
  • You have large relational data or need SQL. Consider SQLite (WASM) on OPFS.

doxor vs idb ​

idb wraps the raw IndexedDB API in promises and stays close to it: you write the upgrade callback and manage version numbers yourself, and you describe the schema's types in a separate DBSchema interface. doxor derives the types from the same declaration that creates the schema, upgrades the database when the declaration changes, and adds a query builder and multi-tab handling, at about 3.5 times idb's size.

doxor vs Dexie.js ​

Dexie is a full client-side database: a rich query API, live queries, hooks and an optional sync service. doxor does less and is several times smaller. Its types come from one declaration instead of separate Table<T> declarations, and it needs no version bumps for new collections and indexes. If you need live queries or sync, Dexie is the better choice today.

doxor vs localForage and idb-keyval ​

Both are key-value stores: they have no indexes or queries. If that is all you need, they are simpler. doxor also supports key-value collections (a collection without .key()), next to indexed ones in the same database.

Ready to try it? Get started or open the playground.

Released under the MIT License.