Skip to content

Data & Persistence

Session Data Model

The core data type is TranscriptSession:

FieldTypeDescription
idstringUnique identifier
schemaVersionnumberCurrently 3
titlestringDisplay title
date / timestringYYYY-MM-DD / HH:mm
createdAt / updatedAtnumberUnix milliseconds
transcriptstringPlain text transcript
translatedTranscriptTranscriptTranslationDataOptional translated text
durationnumberDuration in ms
tokensTranscriptTokenData[]Timestamped tokens
speakersTranscriptSpeaker[]Speaker labels
segmentsTranscriptSegment[]Timestamped segments
postProcessTranscriptPostProcessAI briefing output
askHistoryTranscriptAskTurn[]Q&A conversation turns
mindMapTranscriptMindMapMind map data
topicIdstringAssociated topic
tagIdsstring[]Associated tags
providerIdstringASR provider used
statusTranscriptSessionStatusrecording, interrupted, completed

Storage Architecture

┌─────────────────────────────────────────┐
│  sessionStore (Zustand)                  │
│  Runtime state + sessions array          │
│  ↕ read/write                            │
├──────────────────────────────────────────┤
│  sessionRepository (in-memory cache)     │
│  cachedSessions: TranscriptSession[]     │
│  ↕ async persist                         │
├──────────────────────────────────────────┤
│  sessionStorage (IndexedDB)              │
│  DB: 'delive-app', store: 'sessions'     │
│  Index: 'updatedAt' (sorted retrieval)   │
└──────────────────────────────────────────┘

IndexedDB Schema

Database delive-app at version 3 with four object stores:

StoreKey PathIndexesContents
sessionsidupdatedAtTranscript sessions
metakeyMigration flags
settingsidSettings mirror
tagsidTags mirror

localStorage Keys

KeyContents
desktoplive_settingsApp settings (authoritative source)
desktoplive_tagsTags
desktoplive_topicsTopics
languageInterface language
themeLight/dark mode preference

Settings and tags are mirrored to IndexedDB for redundancy. On startup, if localStorage is empty but IndexedDB has data, the values are restored from IDB.

INFO

Topics are stored only in localStorage and are not included in backup/export.

Session Lifecycle

Creation

sessionStore.startNewSession() creates a draft via sessionRepository.createDraft() with status recording, empty transcript, and metadata (timestamp, provider, source info).

Autosave

Every transcript event triggers scheduleCurrentSessionAutosave() with a 1200ms debounce. The autosave only persists when the snapshot has meaningful content (transcript, tokens, translated text, or post-process data).

Completion

sessionStore.endCurrentSession() calls sessionRepository.completeSession() which sets status: 'completed'. If the session has no content, the draft is deleted instead.

Recovery

On loadSessions(), any session with status: 'recording' is marked as interrupted and wasInterrupted: true. The first interrupted session with content becomes the recoverySession. Users can restore (load back into recording state) or dismiss it.

Settings

AppSettings includes:

FieldTypeDescription
currentVendorstringSelected ASR provider
providerConfigsRecord<string, ProviderConfigData>Per-provider credentials
captionStyleCaptionStyleCaption overlay appearance
colorThemestringAccent palette (cyan, violet, etc.)
aiPostProcessAiPostProcessConfigAI endpoint configuration
openApiOpenApiConfigAPI enable/token settings
autoCheckUpdatebooleanAuto-update preference

Backup & Import

backupStorage.ts handles data portability:

  • Export: exportAllData() → JSON file with sessions, tags, and settings (version 2.0, schema version 2)
  • Import overwrite: replaces all data (preserves existing API key if set)
  • Import merge: adds only new sessions and tags by ID
  • Normalization: validates and repairs data structure on import

Released under the Apache 2.0 License.