explaingit

dexie/dexie.js

14,288TypeScriptAudience · developerComplexity · 2/5Setup · easy

TLDR

A JavaScript library that wraps the browser's built-in IndexedDB storage in a clean, readable API, letting apps store and query data locally so they work offline, used in 100,000+ sites.

Mindmap

mindmap
  root((repo))
    What it does
      IndexedDB wrapper
      Offline storage
      Browser-side data
    Features
      Clean query API
      Bulk operations
      Hooks and middleware
    Ecosystem
      Dexie Cloud sync
      React hooks
      Svelte Vue Angular
    Use cases
      Offline apps
      Cross-device sync
      Electron apps
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Build a web app that works offline by storing user data in the browser using Dexie's simple query API.

USE CASE 2

Add real-time cross-device sync to your web app by pairing Dexie with the Dexie Cloud add-on.

USE CASE 3

Speed up bulk writes to browser storage by using Dexie's optimized batch insert operations.

USE CASE 4

Make a React component automatically re-render when local database data changes using dexie-react-hooks.

Tech stack

TypeScriptJavaScriptIndexedDB

Getting it running

Difficulty · easy Time to first run · 30min

In plain English

Dexie.js is a JavaScript library that makes it much easier to store data inside a web browser. Browsers have a built-in storage system called IndexedDB, but it is notoriously awkward to use directly. Dexie wraps it in a cleaner, friendlier interface so developers can read and write data with short, readable code instead of layers of low-level event callbacks. The library is used across roughly 100,000 websites, desktop apps built with Electron, and mobile apps built with Capacitor. It works in every major browser and patches over known bugs in IndexedDB implementations, which means apps behave more consistently for end users. Because the data lives in the browser itself, apps built with Dexie can continue working even when the user is offline. The core API lets you define a database with named tables, then query those tables using methods like filtering by a field, sorting, limiting results, and doing bulk inserts or deletes in a single operation. Those bulk operations are fast because they take advantage of a lesser-known IndexedDB feature that skips waiting for a confirmation event on every write. For teams that need data to sync across a user's devices or be shared with other users, the project offers a separate add-on called Dexie Cloud. That add-on adds real-time sync, built-in user authentication, and per-record access control without requiring the developer to build or run a backend server. The developer keeps writing the same Dexie code on the frontend, and Dexie Cloud handles synchronization either through a hosted service or a self-hosted setup. There are also hooks and middleware systems for extending Dexie's behavior, and a companion package called dexie-react-hooks that lets React components automatically re-render when the database changes. The project has tutorials for React, Svelte, Vue, Angular, and plain JavaScript. Two older add-ons, dexie-observable and dexie-syncable, are no longer maintained and should be avoided in new projects.

Copy-paste prompts

Prompt 1
Set up Dexie.js in my React app to store a list of to-do items locally in the browser, with automatic re-rendering when data changes using dexie-react-hooks.
Prompt 2
Write a Dexie.js database schema for a notes app with offline support, tables for notes and tags with filtering and sorting examples.
Prompt 3
Show me how to do bulk inserts into a Dexie database efficiently and explain why it is faster than individual writes.
Prompt 4
How do I add Dexie Cloud sync to an existing Dexie.js app so data syncs across a user's devices without building a backend?
Open on GitHub → Explain another repo

← dexie on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.