Skip to content

System Overview

DeLive is an Electron desktop application with a clear separation between the Main process (Node.js runtime) and the Renderer process (Chromium browser context).

Architecture Diagram

Recording Data Flow

API Request Flow

Provider Architecture

Key Architectural Decisions

IndexedDB in Renderer

All session data lives in the Renderer's IndexedDB with an in-memory cache in sessionRepository. The Main process cannot access IndexedDB directly. When the API Server needs data, it sends an IPC request to the Renderer, which responds from the cache (< 5ms latency).

Single HTTP Server

Port 23456 hosts the Volcengine WebSocket proxy (/ws/volc), the REST API (/api/v1/*), and the live transcript WebSocket (/ws/live) on a single http.createServer().

MCP as Separate Process

The MCP server is a standalone Node.js script, not embedded in Electron. Claude Desktop launches it as a child process. It communicates with DeLive via the REST API. This design means DeLive and the MCP server can crash independently.

Provider Registry

Six ASR backends are registered in a singleton ProviderRegistry. Each provider implements a common ASRProvider contract but uses different audio formats and transport methods. The CaptureManager selects the right audio pipeline based on provider capabilities.

Module Map

LayerKey Modules
Desktop Shellmain.ts, mainWindow.ts, captionWindow.ts, tray.ts, shortcuts.ts
IPCappIpc.ts, captionIpc.ts, safeStorageIpc.ts, updaterIpc.ts, diagnosticsIpc.ts, apiIpc.ts, localRuntimeIpc.ts
APIapiServer.ts, apiBroadcast.ts
ProxyvolcProxy.ts, shared/volcProxyCore.ts
Renderer AppApp.tsx, components/*, i18n/*
OrchestrationuseASR.ts, captureManager.ts, providerSession.ts, captionBridge.ts
Providersregistry.ts, base.ts, windowedBatch.ts, implementations/*
StatesessionStore.ts, settingsStore.ts, uiStore.ts, topicStore.ts, tagStore.ts, transcriptStore.ts (backward-compat facade)
PersistencesessionRepository.ts, sessionStorage.ts, settingsStorage.ts, backupStorage.ts
Contractsshared/electronApi.ts, electron/preload.ts

Released under the Apache 2.0 License.