How finos/symphonyelectron works
SymphonyElectron is a cross-platform Electron desktop wrapper for the Symphony Communication Platform. The principal workflow starts when a desktop user launches the app: the Electron main process initializes configuration and desktop facilities, then creates a window that loads the configured Symphony web client. The wrapper adds native window, menu, notification, presence, screen-capture, and update capabilities around that client; the hosted Symphony client is an external system, not code in this repository.
Components
Application lifecycle and windows
• Desktop user — *external; null repository path.* Launches and interacts with the installed desktop application.
• Electron main-process bootstrap — src/app/main.ts. Starts the app and coordinates initialization of configuration, windows, protocol handling, updates, and other desktop features.
• Window orchestration — src/app/window-handler.ts. Creates and manages the main and auxiliary Electron windows, loads the configured web client, and sends page-load information to its contents.
• Window and native UI utilities — src/app/window-utils.ts. Implements reusable window construction, locale updates, reachability checks, and supporting native-window behavior; the window handler calls its window-loading helpers.
• Window actions — src/app/window-actions.ts. Implements desktop window actions used alongside window orchestration.
• Renderer UI and bridge — src/renderer/app-bridge.ts. Renderer-side bridge entry point; the renderer tree also contains grouped UI for notifications, downloads, screen capture, authentication, and app status.
• Symphony web client — *external; null repository path.* The hosted client loaded into the desktop window; its server-side behavior is outside this repository.
Configuration, policy, and shared state
• Configuration and platform settings — src/app/config-handler.ts. Loads and exposes user, global, and cloud configuration used to control wrapper behavior.
• URL whitelist policy — src/common/whitelist-handler.ts. Parses hostnames and checks navigation URLs against configured whitelist entries.
• Window and presence state — src/app/stores/window-store.ts. Implements window-related state; the store index also constructs presence and menu stores.
• IPC and desktop API contracts — src/common/api-interface.ts. Defines command names, window types, and shared payload types for desktop capabilities.
• Localization — src/common/i18n.ts. Loads locale resources and formats translated strings.
Desktop capabilities
• Main-process API and event handling — src/app/main-api-handler.ts. Handles desktop API operations and connects them to capability-specific handlers; it imports the event handler and multiple feature modules.
• Main-process event routing — src/app/main-event-handler.ts. Implements main-process event handling used by desktop features.
• Presence management — src/app/presence-status-handler.ts. Implements presence operations using shared stores and window facilities.
• Screen capture and annotation — src/app/screen-snippet-handler.ts. Implements screen-snippet operations and uses window, store, and analytics modules.
• Notifications — src/app/notifications/call-notification.ts. Implements call-notification behavior across main-process windows and renderer notification UI.
• Renderer notification handling — src/renderer/notification-handler.ts. Implements renderer-side notification handling; the index lists the main-process call-notification module as a reference.
• Auto-update — src/app/auto-update-handler.ts. Selects platform updater implementations, checks update metadata, and handles update workflow and analytics.
Supporting product behavior
• Analytics — src/app/bi/analytics-handler.ts. Implements analytics handling using the shared event and payload definitions.
• Windows installer — installer/win/WixSharpInstaller/Symphony.cs. Implements the Windows installer; the installer source references its welcome, progress, exit, close, and maintenance dialogs.
Relationships
• Desktop user -> Electron main-process bootstrap: launches the desktop app; evidence: none (inferred from the documented desktop-client product).
• Electron main-process bootstrap -> Configuration and platform settings: initializes configuration as part of app startup; evidence: src/app/main.ts (SOURCE INDEX).
• Electron main-process bootstrap -> Window orchestration: starts window handling as part of app startup; evidence: src/app/main.ts (SOURCE INDEX).
• Window orchestration -> Symphony web client: loads the configured URL in Electron web contents; evidence: src/app/window-handler.ts (excerpt).
• Window orchestration -> Window and native UI utilities: loads web contents and injects window styling through helpers; evidence: src/app/window-handler.ts (excerpt).
• Window orchestration -> Window actions: uses window-action functionality; evidence: src/app/window-handler.ts (SOURCE INDEX).
• Main-process API and event handling -> Configuration and platform settings: imports configuration for desktop API behavior; evidence: src/app/main-api-handler.ts (SOURCE INDEX).
• Main-process API and event handling -> Presence management: imports presence handling; evidence: src/app/main-api-handler.ts (SOURCE INDEX).
• Main-process API and event handling -> Screen capture and annotation: imports screen-snippet handling; evidence: src/app/main-api-handler.ts (SOURCE INDEX).
• Main-process API and event handling -> Main-process event routing: imports the event handler; evidence: src/app/main-api-handler.ts (SOURCE INDEX).
• Presence management -> Window and presence state: accesses the shared store; evidence: src/app/presence-status-handler.ts (SOURCE INDEX).
• Screen capture and annotation -> Window and presence state: imports the window store; evidence: src/app/screen-snippet-handler.ts (SOURCE INDEX).
• Screen capture and annotation -> Analytics: imports analytics functionality; evidence: src/app/screen-snippet-handler.ts (SOURCE INDEX).
• Auto-update -> Configuration and platform settings: reads configuration while preparing update behavior; evidence: src/app/auto-update-handler.ts (SOURCE INDEX).
• Configuration and platform settings -> Analytics: sends install-completion analytics; evidence: src/app/config-handler.ts (excerpt).
• Call-notification UI -> Renderer notification handling: the renderer handler references the main-process call-notification module; evidence: src/renderer/notification-handler.ts (SOURCE INDEX).
Coverage limits
The sampled source does not establish all startup ordering, the complete IPC dispatch path between renderer and main process, or the Symphony server’s behavior. The renderer bridge and several substantial feature modules are present in the tree but were not excerpted, so their detailed wiring is not asserted. The README documents supported desktop platforms, but this map focuses on the sampled application workflow.
Main entry points: main-api-handler.ts Main-process API · window-handler.ts Window orchestration · config-handler.ts Configuration settings · main.ts Electron main bootstrap
Components 16
Application lifecycle
- Desktop user
- Electron main bootstrap
src/app/main.ts - Window orchestration
src/app/window-handler.ts - Symphony web client
- Window utilities
src/app/window-utils.ts - Window actions
src/app/window-actions.ts
Configuration and shared state
- Configuration settings
src/app/config-handler.ts - Window and presence state
src/app/stores/window-store.ts
Desktop capabilities
- Main-process API
src/app/main-api-handler.ts - Presence management
src/app/presence-status-handler.ts - Screen capture
src/app/screen-snippet-handler.ts - Main-process event routing
src/app/main-event-handler.ts - Auto-update
src/app/auto-update-handler.ts - Call notifications
src/app/notifications/call-notification.ts - Analytics
src/app/bi/analytics-handler.ts
Renderer notifications
- Renderer notification handling
src/renderer/notification-handler.ts
Connections 16
- Desktop user → Electron main bootstrap: launches · Inferred; not shown in the code that was read.
- Electron main bootstrap → Configuration settings: initializes
src/app/main.ts - Electron main bootstrap → Window orchestration: starts
src/app/main.ts - Window orchestration → Symphony web client: loads
src/app/window-handler.ts - Window orchestration → Window utilities: uses
src/app/window-handler.ts - Window orchestration → Window actions: uses
src/app/window-handler.ts - Main-process API → Configuration settings: imports
src/app/main-api-handler.ts - Main-process API → Presence management: imports
src/app/main-api-handler.ts - Main-process API → Screen capture: imports
src/app/main-api-handler.ts - Main-process API → Main-process event routing: imports
src/app/main-api-handler.ts - Presence management → Window and presence state: accesses
src/app/presence-status-handler.ts - Screen capture → Window and presence state: imports
src/app/screen-snippet-handler.ts - Screen capture → Analytics: imports
src/app/screen-snippet-handler.ts - Auto-update → Configuration settings: reads
src/app/auto-update-handler.ts - Configuration settings → Analytics: sends · Sends install-completion analytics.
src/app/config-handler.ts - Call notifications → Renderer notification handling: references
src/renderer/notification-handler.ts