# streamlabs/desktop architecture

> Architecture diagram of the GitHub repository streamlabs/desktop, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-02). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/streamlabs/desktop
- Repository: https://github.com/streamlabs/desktop

## Overview

Streamlabs Desktop is an Electron-based live-streaming application powered by OBS. A user configures the studio and streaming destinations, then starts a broadcast or recording; the app also supports scene/source editing, stream widgets, clip highlighting and export, platform apps, and stream-avatar automations. The README documents a main/worker/child-window architecture with service calls crossing IPC and OBS access restricted to the worker. Some product modules named in the source index are absent from the supplied tree, so those links are omitted or marked unverified rather than treated as inspected.

Main entry points: [`app/app.ts`](https://github.com/streamlabs/desktop/blob/master/app/app.ts) (Main UI), [`app/services-manager.ts`](https://github.com/streamlabs/desktop/blob/master/app/services-manager.ts) (Service registry), [`app/components-react/root/StudioEditor.tsx`](https://github.com/streamlabs/desktop/blob/master/app/components-react/root/StudioEditor.tsx) (Studio editor), [`app/app-services.ts`](https://github.com/streamlabs/desktop/blob/master/app/app-services.ts) (Service catalog)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Runtime and services"]
  node_desktop["Electron app<br/>[main.js]"]
  node_ui["Main UI<br/>[app.ts]"]
  node_registry["Service registry"]
  node_services["Service catalog<br/>[app-services.ts]"]
  node_obs["OBS engine<br/>[index.js]"]
end

subgraph group_studio["Studio production"]
  node_studio["Studio editor<br/>[StudioEditor.tsx]"]
  node_sources["Sources and scenes<br/>[SourceSelector.tsx]"]
  node_widgets["Stream widgets<br/>[useWidget.tsx]"]
end

subgraph group_broadcast["Broadcast and platforms"]
  node_go_live["Go-live setup<br/>[GoLiveWindow.tsx]"]
  node_scheduler["Stream scheduler"]
  node_platforms["Streaming platforms<br/>[index.ts]"]
end

subgraph group_creator["Creator tools"]
  node_highlighter["Clip highlighting<br/>[Highlighter.tsx]"]
  node_clip_export["Clip export<br/>[StorageUpload.tsx]"]
end

subgraph group_extensions["Extensions and automation"]
  node_platform_apps["Platform apps"]
  node_automations["Avatar automations"]
  node_automation_rules["Automation conditions<br/>[conditions.ts]"]
end

node_user(("Streamer"))

node_user -->|"launches"| node_desktop
node_desktop -.->|"opens UI"| node_ui
node_ui -->|"accesses services"| node_registry
node_registry -->|"registers"| node_services
node_registry -->|"serves windows"| node_ui
node_ui -.->|"presents studio"| node_studio
node_studio -.->|"edits sources"| node_sources
node_studio -.->|"controls OBS"| node_obs
node_user -.->|"configures broadcast"| node_go_live
node_go_live -.->|"selects destinations"| node_platforms
node_scheduler -->|"schedules streams"| node_platforms
node_widgets -->|"uses widget service"| node_services
node_user -.->|"reviews clips"| node_highlighter
node_highlighter -.->|"exports clips"| node_clip_export
node_platform_apps -.->|"uses app services"| node_services
node_automations -->|"evaluates conditions"| node_automation_rules

click node_desktop "https://github.com/streamlabs/desktop/blob/master/main.js"
click node_ui "https://github.com/streamlabs/desktop/blob/master/app/app.ts"
click node_registry "https://github.com/streamlabs/desktop/blob/master/app/services-manager.ts"
click node_services "https://github.com/streamlabs/desktop/blob/master/app/app-services.ts"
click node_obs "https://github.com/streamlabs/desktop/blob/master/obs-api/index.js"
click node_studio "https://github.com/streamlabs/desktop/blob/master/app/components-react/root/StudioEditor.tsx"
click node_sources "https://github.com/streamlabs/desktop/blob/master/app/components-react/editor/elements/SourceSelector.tsx"
click node_go_live "https://github.com/streamlabs/desktop/blob/master/app/components-react/windows/go-live/GoLiveWindow.tsx"
click node_scheduler "https://github.com/streamlabs/desktop/blob/master/app/components-react/pages/stream-scheduler/useStreamScheduler.tsx"
click node_platforms "https://github.com/streamlabs/desktop/blob/master/app/services/platforms/index.ts"
click node_widgets "https://github.com/streamlabs/desktop/blob/master/app/components-react/widgets/common/useWidget.tsx"
click node_highlighter "https://github.com/streamlabs/desktop/blob/master/app/components-react/pages/Highlighter.tsx"
click node_clip_export "https://github.com/streamlabs/desktop/blob/master/app/components-react/highlighter/Export/StorageUpload.tsx"
click node_platform_apps "https://github.com/streamlabs/desktop/blob/master/app/services/platform-apps/container-manager.ts"
click node_automations "https://github.com/streamlabs/desktop/blob/master/app/services/stream-avatar/automations-engine-service.ts"
click node_automation_rules "https://github.com/streamlabs/desktop/blob/master/app/services/stream-avatar/engine/conditions.ts"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_desktop,node_ui,node_registry,node_services,node_obs toneBlue
class node_studio,node_sources,node_widgets toneAmber
class node_go_live,node_scheduler,node_platforms toneMint
class node_highlighter,node_clip_export toneRose
class node_platform_apps,node_automations,node_automation_rules,node_user toneIndigo
```

## Components

### Runtime and services

- [Electron app](https://github.com/streamlabs/desktop/blob/master/main.js): `main.js`
- [Main UI](https://github.com/streamlabs/desktop/blob/master/app/app.ts): `app/app.ts`
- [Service registry](https://github.com/streamlabs/desktop/blob/master/app/services-manager.ts): `app/services-manager.ts`
- [Service catalog](https://github.com/streamlabs/desktop/blob/master/app/app-services.ts): `app/app-services.ts`
- [OBS engine](https://github.com/streamlabs/desktop/blob/master/obs-api/index.js): `obs-api/index.js`

### Studio production

- [Studio editor](https://github.com/streamlabs/desktop/blob/master/app/components-react/root/StudioEditor.tsx): `app/components-react/root/StudioEditor.tsx`
- [Sources and scenes](https://github.com/streamlabs/desktop/blob/master/app/components-react/editor/elements/SourceSelector.tsx): `app/components-react/editor/elements/SourceSelector.tsx`
- [Stream widgets](https://github.com/streamlabs/desktop/blob/master/app/components-react/widgets/common/useWidget.tsx): `app/components-react/widgets/common/useWidget.tsx`

### Broadcast and platforms

- [Go-live setup](https://github.com/streamlabs/desktop/blob/master/app/components-react/windows/go-live/GoLiveWindow.tsx): `app/components-react/windows/go-live/GoLiveWindow.tsx`
- [Stream scheduler](https://github.com/streamlabs/desktop/blob/master/app/components-react/pages/stream-scheduler/useStreamScheduler.tsx): `app/components-react/pages/stream-scheduler/useStreamScheduler.tsx`
- [Streaming platforms](https://github.com/streamlabs/desktop/blob/master/app/services/platforms/index.ts): `app/services/platforms/index.ts`

### Creator tools

- [Clip highlighting](https://github.com/streamlabs/desktop/blob/master/app/components-react/pages/Highlighter.tsx): `app/components-react/pages/Highlighter.tsx`
- [Clip export](https://github.com/streamlabs/desktop/blob/master/app/components-react/highlighter/Export/StorageUpload.tsx): `app/components-react/highlighter/Export/StorageUpload.tsx`

### Extensions and automation

- [Platform apps](https://github.com/streamlabs/desktop/blob/master/app/services/platform-apps/container-manager.ts): `app/services/platform-apps/container-manager.ts`
- [Avatar automations](https://github.com/streamlabs/desktop/blob/master/app/services/stream-avatar/automations-engine-service.ts): `app/services/stream-avatar/automations-engine-service.ts`
- [Automation conditions](https://github.com/streamlabs/desktop/blob/master/app/services/stream-avatar/engine/conditions.ts): `app/services/stream-avatar/engine/conditions.ts`

### Other components

- **Streamer**

## Connections

- Streamer → Electron app: launches
- Electron app → Main UI: opens UI
- Main UI → Service registry: accesses services
- Service registry → Service catalog: registers (evidence: `app/services-manager.ts`)
- Service registry → Main UI: serves windows
- Main UI → Studio editor: presents studio
- Studio editor → Sources and scenes: edits sources
- Studio editor → OBS engine: controls OBS
- Streamer → Go-live setup: configures broadcast
- Go-live setup → Streaming platforms: selects destinations
- Stream scheduler → Streaming platforms: schedules streams (evidence: `app/components-react/pages/stream-scheduler/useStreamScheduler.tsx`)
- Stream widgets → Service catalog: uses widget service (evidence: `app/components-react/widgets/common/useWidget.tsx`)
- Streamer → Clip highlighting: reviews clips
- Clip highlighting → Clip export: exports clips
- Platform apps → Service catalog: uses app services
- Avatar automations → Automation conditions: evaluates conditions (evidence: `app/services/stream-avatar/automations-engine-service.ts`)
