A browser-side library that simplifies IndexedDB with a fluent API. It targets PWAs, Electron, and Capacitor apps that need local structured storage.
Overview
Dexie.js wraps the browser’s IndexedDB standard so applications can define schemas, query data, and run bulk operations with less ceremony than raw APIs. It is positioned as the portable client database across modern browser engines.
The library mitigates inconsistencies in IndexedDB implementations and exposes table, collection, and where-clause APIs for reads and writes. Bulk helpers are tuned to avoid waiting on every success callback, which the authors describe as important for throughput.
Optional Dexie Cloud adds sync, authentication, access control, and blob storage while you keep writing frontend code against Dexie.js. That offering supports hosted operation or deployment on infrastructure you control, distinct from using the core library alone.
Install via npm or load UMD or ES module builds. Tutorials cover React, Svelte, Vue, Angular, and plain JavaScript. Legacy dexie-observable and dexie-syncable packages are deprecated in favor of dexie-cloud-addon for new sync work.
Key features
- IndexedDB schema and versioning
- Bulk insert and update helpers
- Cross-browser compatibility workarounds
- Optional cloud sync addon
- React and TypeScript examples
- liveQuery reactive reads
- NPM and script-tag installs
- Works with Electron and Capacitor
Use cases
- Offline-first progressive web apps
- Client-side structured storage
- Local-first apps with optional sync
- Desktop apps using Electron storage
- Mobile hybrid apps via Capacitor