# nextcloud/talk-desktop architecture

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

- Interactive diagram: https://gitdiagram.com/nextcloud/talk-desktop
- Repository: https://github.com/nextcloud/talk-desktop
- Video tour (about a minute): https://gitdiagram.com/nextcloud/talk-desktop/video

## Overview

Nextcloud Talk Desktop is an Electron client for accessing a Nextcloud Talk server. On launch, the main process loads configuration and migrations, then chooses a welcome, authentication, or Talk window according to saved credentials; authenticated users continue into the Talk frontend. From there, users can manage desktop settings and status, handle calls, view shared files, and receive notifications. Electron’s main process also brokers desktop-specific windows, permissions, downloads, and certificate decisions. The README documents CLI configuration and background startup; the sampled excerpts do not establish all renderer-to-main IPC wiring.

Main entry points: [`src/main.js`](https://github.com/nextcloud/talk-desktop/blob/main/src/main.js) (Main process), [`src/talk/renderer/talk.main.ts`](https://github.com/nextcloud/talk-desktop/blob/main/src/talk/renderer/talk.main.ts) (Talk frontend), [`src/authentication/authentication.window.js`](https://github.com/nextcloud/talk-desktop/blob/main/src/authentication/authentication.window.js) (Authentication window), [`src/talk/talk.window.js`](https://github.com/nextcloud/talk-desktop/blob/main/src/talk/talk.window.js) (Talk window)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Electron runtime"]
  node_main["Main process<br/>[main.js]"]
  node_config["App configuration<br/>[AppConfig.ts]"]
  node_appdata["Session data<br/>[AppData.js]"]
  node_welcome["Welcome window<br/>[welcome.window.ts]"]
  node_authentication["Authentication window"]
  node_login["Login handling<br/>[login.service.js]"]
end

subgraph group_talk["Talk experience"]
  node_talkwindow["Talk window<br/>[talk.window.js]"]
  node_talkui["Talk frontend<br/>[talk.main.ts]"]
  node_settings["Desktop settings<br/>[index.ts]"]
  node_status["User status"]
  node_notifications["Notifications"]
end

subgraph group_features["Desktop features"]
  node_callbox["Callbox<br/>[callbox.service.ts]"]
  node_sharing["Screen sharing"]
  node_viewer["File viewer<br/>[ViewerApp.vue]"]
  node_help["Help and diagnosis"]
end

subgraph group_platform["Shared platform"]
  node_browserstorage[("Persistent browser storage")]
  node_reactivebrowserstorage["Reactive storage binding"]
  node_protocol["App protocol<br/>[appProtocol.ts]"]
  node_certificates["Certificate trust"]
  node_menu["Application menu<br/>[app.menu.js]"]
  node_tray["System tray<br/>[app.tray.js]"]
end

node_user(("User"))
node_electron["Electron OS APIs"]
node_nextcloud["Nextcloud server"]

node_user -->|"launches"| node_main
node_main -->|"loads and migrates"| node_config
node_main -->|"loads session"| node_appdata
node_main -->|"uses desktop APIs"| node_electron
node_main -->|"registers protocol"| node_protocol
node_main -->|"sets up menu"| node_menu
node_main -->|"opens"| node_welcome
node_main -->|"opens when unauthenticated"| node_authentication
node_main -->|"opens when authenticated"| node_talkwindow
node_authentication -->|"uses login parsing"| node_login
node_talkwindow -->|"loads frontend"| node_talkui
node_talkui -->|"offers settings"| node_settings
node_talkui -->|"manages status"| node_status
node_talkui -->|"handles notifications"| node_notifications
node_talkui -->|"checks call state"| node_callbox
node_callbox -->|"queries call APIs"| node_nextcloud
node_status -->|"reads and updates status"| node_nextcloud
node_talkui -->|"offers screen sharing"| node_sharing
node_sharing -->|"requests media sources"| node_electron
node_talkui -->|"opens shared files"| node_viewer
node_talkui -->|"provides diagnosis"| node_help
node_help -->|"reads configuration"| node_config
node_reactivebrowserstorage -->|"reads and writes"| node_browserstorage
node_main -->|"handles certificate checks"| node_certificates
node_certificates -->|"prompts trust"| node_electron
node_main -->|"configures tray"| node_tray
node_tray -->|"controls window visibility"| node_electron

click node_main "https://github.com/nextcloud/talk-desktop/blob/main/src/main.js"
click node_config "https://github.com/nextcloud/talk-desktop/blob/main/src/app/AppConfig.ts"
click node_appdata "https://github.com/nextcloud/talk-desktop/blob/main/src/app/AppData.js"
click node_welcome "https://github.com/nextcloud/talk-desktop/blob/main/src/welcome/welcome.window.ts"
click node_authentication "https://github.com/nextcloud/talk-desktop/blob/main/src/authentication/authentication.window.js"
click node_login "https://github.com/nextcloud/talk-desktop/blob/main/src/authentication/login.service.js"
click node_talkwindow "https://github.com/nextcloud/talk-desktop/blob/main/src/talk/talk.window.js"
click node_talkui "https://github.com/nextcloud/talk-desktop/blob/main/src/talk/renderer/talk.main.ts"
click node_settings "https://github.com/nextcloud/talk-desktop/blob/main/src/talk/renderer/Settings/index.ts"
click node_status "https://github.com/nextcloud/talk-desktop/blob/main/src/talk/renderer/UserStatus/userStatus.service.ts"
click node_notifications "https://github.com/nextcloud/talk-desktop/blob/main/src/talk/renderer/notifications/notifications.service.js"
click node_callbox "https://github.com/nextcloud/talk-desktop/blob/main/src/callbox/renderer/callbox.service.ts"
click node_sharing "https://github.com/nextcloud/talk-desktop/blob/main/src/talk/renderer/screensharing/screensharing.module.ts"
click node_viewer "https://github.com/nextcloud/talk-desktop/blob/main/src/talk/renderer/Viewer/ViewerApp.vue"
click node_help "https://github.com/nextcloud/talk-desktop/blob/main/src/help/renderer/diagnosis.service.ts"
click node_browserstorage "https://github.com/nextcloud/talk-desktop/blob/main/src/shared/browserStorage.service.ts"
click node_reactivebrowserstorage "https://github.com/nextcloud/talk-desktop/blob/main/src/shared/useBrowserStorage.ts"
click node_protocol "https://github.com/nextcloud/talk-desktop/blob/main/src/app/appProtocol.ts"
click node_certificates "https://github.com/nextcloud/talk-desktop/blob/main/src/app/certificate.service.ts"
click node_menu "https://github.com/nextcloud/talk-desktop/blob/main/src/app/app.menu.js"
click node_tray "https://github.com/nextcloud/talk-desktop/blob/main/src/app/app.tray.js"

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_main,node_config,node_appdata,node_welcome,node_authentication,node_login,node_user toneBlue
class node_talkwindow,node_talkui,node_settings,node_status,node_notifications toneAmber
class node_callbox,node_sharing,node_viewer,node_help,node_electron,node_nextcloud toneMint
class node_browserstorage,node_reactivebrowserstorage,node_protocol,node_certificates,node_menu,node_tray toneRose
```

## Components

### Electron runtime

- [Main process](https://github.com/nextcloud/talk-desktop/blob/main/src/main.js): `src/main.js`
- [App configuration](https://github.com/nextcloud/talk-desktop/blob/main/src/app/AppConfig.ts): `src/app/AppConfig.ts`
- [Session data](https://github.com/nextcloud/talk-desktop/blob/main/src/app/AppData.js): `src/app/AppData.js`
- [Welcome window](https://github.com/nextcloud/talk-desktop/blob/main/src/welcome/welcome.window.ts): `src/welcome/welcome.window.ts`
- [Authentication window](https://github.com/nextcloud/talk-desktop/blob/main/src/authentication/authentication.window.js): `src/authentication/authentication.window.js`
- [Login handling](https://github.com/nextcloud/talk-desktop/blob/main/src/authentication/login.service.js): `src/authentication/login.service.js`

### Talk experience

- [Talk window](https://github.com/nextcloud/talk-desktop/blob/main/src/talk/talk.window.js): `src/talk/talk.window.js`
- [Talk frontend](https://github.com/nextcloud/talk-desktop/blob/main/src/talk/renderer/talk.main.ts): `src/talk/renderer/talk.main.ts`
- [Desktop settings](https://github.com/nextcloud/talk-desktop/blob/main/src/talk/renderer/Settings/index.ts): `src/talk/renderer/Settings/index.ts`
- [User status](https://github.com/nextcloud/talk-desktop/blob/main/src/talk/renderer/UserStatus/userStatus.service.ts): `src/talk/renderer/UserStatus/userStatus.service.ts`
- [Notifications](https://github.com/nextcloud/talk-desktop/blob/main/src/talk/renderer/notifications/notifications.service.js): `src/talk/renderer/notifications/notifications.service.js`

### Desktop features

- [Callbox](https://github.com/nextcloud/talk-desktop/blob/main/src/callbox/renderer/callbox.service.ts): `src/callbox/renderer/callbox.service.ts`
- [Screen sharing](https://github.com/nextcloud/talk-desktop/blob/main/src/talk/renderer/screensharing/screensharing.module.ts): `src/talk/renderer/screensharing/screensharing.module.ts`
- [File viewer](https://github.com/nextcloud/talk-desktop/blob/main/src/talk/renderer/Viewer/ViewerApp.vue): `src/talk/renderer/Viewer/ViewerApp.vue`
- [Help and diagnosis](https://github.com/nextcloud/talk-desktop/blob/main/src/help/renderer/diagnosis.service.ts): `src/help/renderer/diagnosis.service.ts`

### Shared platform

- [Persistent browser storage](https://github.com/nextcloud/talk-desktop/blob/main/src/shared/browserStorage.service.ts): `src/shared/browserStorage.service.ts`
- [Reactive storage binding](https://github.com/nextcloud/talk-desktop/blob/main/src/shared/useBrowserStorage.ts): `src/shared/useBrowserStorage.ts`
- [App protocol](https://github.com/nextcloud/talk-desktop/blob/main/src/app/appProtocol.ts): `src/app/appProtocol.ts`
- [Certificate trust](https://github.com/nextcloud/talk-desktop/blob/main/src/app/certificate.service.ts): `src/app/certificate.service.ts`
- [Application menu](https://github.com/nextcloud/talk-desktop/blob/main/src/app/app.menu.js): `src/app/app.menu.js`
- [System tray](https://github.com/nextcloud/talk-desktop/blob/main/src/app/app.tray.js): `src/app/app.tray.js`

### Other components

- **User**
- **Electron OS APIs**
- **Nextcloud server**

## Connections

- User → Main process: launches
- Main process → App configuration: loads and migrates
- Main process → Session data: loads session
- Main process → Electron OS APIs: uses desktop APIs
- Main process → App protocol: registers protocol
- Main process → Application menu: sets up menu
- Main process → Welcome window: opens
- Main process → Authentication window: opens when unauthenticated
- Main process → Talk window: opens when authenticated
- Authentication window → Login handling: uses login parsing
- Talk window → Talk frontend: loads frontend
- Talk frontend → Desktop settings: offers settings
- Talk frontend → User status: manages status
- Talk frontend → Notifications: handles notifications
- Talk frontend → Callbox: checks call state
- Callbox → Nextcloud server: queries call APIs
- User status → Nextcloud server: reads and updates status
- Talk frontend → Screen sharing: offers screen sharing
- Screen sharing → Electron OS APIs: requests media sources
- Talk frontend → File viewer: opens shared files
- Talk frontend → Help and diagnosis: provides diagnosis
- Help and diagnosis → App configuration: reads configuration
- Reactive storage binding → Persistent browser storage: reads and writes
- Main process → Certificate trust: handles certificate checks
- Certificate trust → Electron OS APIs: prompts trust
- Main process → System tray: configures tray
- System tray → Electron OS APIs: controls window visibility
