Skip to content

Data Model

The canonical data format is documented in the Data Formats reference. This page covers the internal storage model and how data flows through the system.

LayerTechnologyWhat’s stored
Primary storeIndexedDB (Dexie)Chat metadata, message content, thumbnails, search index
Media storeOPFSFull-size images, documents, audio, video
Configchrome.storage.localSettings, operational state
  • chats — one record per conversation (metadata + message tree)
  • searchIndex — Lunr.js serialized index
  • thumbnails — compressed image thumbnails (for Gallery view)
  • operationalState — bulk sync state machine (survives service worker restarts)

Conversations are soft-deleted (a deletedAt flag is set). They’re filtered out at query time via compound indexes. The Janitor service runs every 30 minutes to permanently remove soft-deleted records and their associated OPFS media.

Conversations store a flat map of messages keyed by ID, with each message holding a parentId reference. This represents the branching structure of conversations where multiple response paths exist. The Viewer reconstructs the tree from this flat map for display.