dexie-cache-sync

Sync Convex data to a Dexie IndexedDB cache with orphan detection.

7|Updated Dec 4, 2025
One-click install
npx skills add https://github.com/planetaryescape/blah.chat --skill dexie-cache-sync
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dexie-cache-sync
Source: https://github.com/planetaryescape/blah.chat/tree/main/.claude/skills/dexie-cache-sync
Command: npx skills add https://github.com/planetaryescape/blah.chat --skill dexie-cache-sync

SYSTEM DOCUMENTATION & REQUIREMENTS

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.

Frequently Asked Questions about dexie-cache-sync

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I sync Convex data to IndexedDB for offline-first React apps?

You can sync Convex data to IndexedDB by mapping it to a Dexie cache with orphan detection and cascade deletes. This local-first sync layer reduces latency, enables offline capabilities, and provides real-time UI updates through Dexie liveQuery.

How does optimistic updating work with a Dexie cache layer?

Optimistic updates are kept in React state only, while the Dexie cache holds authoritative data. This separation enables fast UI responses without risking cache inconsistency during Convex data synchronization.

Can I use Dexie and IndexedDB caching in server-side rendered React apps?

Yes, the Dexie caching layer includes an SSR guard that prevents IndexedDB usage on the server. This ensures safe server-side rendering in browser environments while maintaining offline-first capabilities for client-side Convex data synchronization.

What is the best way to handle cascade deletes in an offline-first Convex cache?

The Dexie caching layer handles cascade deletes by automatically removing related data like attachments, toolCalls, and sources when a parent message is deleted. This ensures safe multi-table reconciliation during local-first Convex data synchronization.

Why does my IndexedDB cache contain orphaned records after syncing Convex data?

Orphaned records occur when related data loses its parent reference during synchronization. The Dexie caching layer includes orphan detection to identify and clean up these records during multi-table reconciliation with Convex data.

Do I need a specific Dexie schema to sync Convex data with orphan detection?

Yes, you need to initialize a Dexie schema consistent with the required tables, including conversations, messages, notes, tasks, projects, attachments, toolCalls, sources, pendingMutations, and userPreferences to wire up Convex data syncing properly.