idb-state-persistence

Community

Persist app state locally with IndexedDB.

Authormatthewharwood
Version1.0.0
Installs0

System Documentation

What problem does it solve?

Web applications must retain state across navigation, reloads, and sessions. Relying on volatile memory or simple localStorage often leads to lost progress and inconsistent UI after refreshes.

Core Features & Use Cases

  • StateStore: a generic KV store for single-document state (e.g., user settings, current session).
  • Specialized Stores: domain-specific stores with indexes (StoryStore, PracticeProgressStore) for advanced querying.
  • State Managers: wrappers that combine StateStore/Specialized Stores with an event system to drive reactive UI updates.
  • Data Modeling: use JSDoc typedefs to define data shapes before writing IDB code.
  • Integration: IDB is treated as the primary source of truth, guaranteeing local-first persistence across sessions.

Quick Start

Initialize the local-first persistence by wiring up StateStores and a StateManager, then persist an initial state object (e.g., user progress) to the IndexedDB store.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: idb-state-persistence
Download link: https://github.com/matthewharwood/fantasy-phonics/archive/main.zip#idb-state-persistence

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.