What problem does it solve?
Dexie IndexedDB caching layer enables local-first Convex data synchronization in browser apps, reducing latency and enabling offline capabilities.
Core Features & Use Cases
- Sync Convex data to Dexie cache with orphan detection and SSR safety for offline-capable UI.
- Cascade deletes: ensure related data (attachments, toolCalls, sources) are removed when a parent message is deleted.
- Optimistic updates are kept in React state only, while the cache holds authoritative data, enabling fast UI without risking cache inconsistency.
- SSR guard: prevent IndexedDB usage on the server, ensuring safe rendering.
Quick Start
Install the required libraries, initialize the Dexie schema consistent with the 10 tables (conversations, messages, notes, tasks, projects, attachments, toolCalls, sources, pendingMutations, userPreferences), and wire up the Convex data syncing to Dexie in your app components.