# duongbirken2510/omnichat architecture

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

- Interactive diagram: https://gitdiagram.com/duongbirken2510/omnichat
- Repository: https://github.com/duongbirken2510/omnichat

## Overview

OmniChat is an Electron/Vue desktop workspace for managing multiple isolated accounts across seven messaging and commerce platforms. The primary workflow is to select an account in the unified workspace, use its embedded platform session to handle conversations, and receive unread alerts; quick replies support reusable text and images. Settings cover accounts, language, notifications, and portable data, with update and migration notices. The renderer entry and App/component relationships are evidenced by excerpts and the source index; platform embedding and several native integrations are documented in the README, but their detailed wiring was not sampled.

Main entry points: [`src/renderer/src/App.vue`](https://github.com/duongbirken2510/omnichat/blob/main/src/renderer/src/App.vue) (Unified workspace), [`src/renderer/src/components/SettingsModal.vue`](https://github.com/duongbirken2510/omnichat/blob/main/src/renderer/src/components/SettingsModal.vue) (Settings modal), [`src/renderer/src`](https://github.com/duongbirken2510/omnichat/tree/main/src/renderer/src) (Platform sessions), [`src/renderer/src/components/AutoUpdateBanner.vue`](https://github.com/duongbirken2510/omnichat/blob/main/src/renderer/src/components/AutoUpdateBanner.vue) (Update banner)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workspace["Messaging workspace"]
  node_renderer["Vue renderer<br/>[main.ts]"]
  node_workspace_ui["Unified workspace<br/>[App.vue]"]
  node_sidebar["Account sidebar<br/>[AccountSidebar.vue]"]
  node_platform_sessions["Platform sessions"]
  node_platform_services{{"Messaging platforms"}}
  node_quick_replies["Quick replies<br/>[App.vue]"]
end

subgraph group_accounts["Accounts and sessions"]
  node_account_model["Account model<br/>[index.ts]"]
end

subgraph group_settings["Settings and persistence"]
  node_account_store[("Account and preferences DB<br/>[db.ts]")]
  node_settings_ui["Settings modal<br/>[SettingsModal.vue]"]
  node_language["Bilingual interface<br/>[index.ts]"]
  node_portable_data["Portable data<br/>[SettingsModal.vue]"]
end

subgraph group_desktop["Desktop capabilities"]
  node_main_process["Electron main<br/>[index.ts]"]
  node_preload_api["Preload bridge<br/>[index.ts]"]
  node_webview_preload["Webview integration<br/>[webview.ts]"]
  node_notifications["Unread notifications"]
  node_migration_banner["Migration banner"]
  node_update_banner["Update banner"]
end

node_operator(("Operator"))
node_update_service{{"Version endpoint"}}

node_operator -->|"opens"| node_renderer
node_renderer -->|"mounts"| node_workspace_ui
node_workspace_ui -->|"renders"| node_sidebar
node_workspace_ui -->|"loads and persists"| node_account_store
node_workspace_ui -.->|"manages"| node_platform_sessions
node_platform_sessions -.->|"embeds sessions"| node_platform_services
node_operator -.->|"handles chats"| node_platform_sessions
node_workspace_ui -->|"manages"| node_quick_replies
node_workspace_ui -->|"watches unread counts"| node_notifications
node_workspace_ui -->|"renders"| node_settings_ui
node_settings_ui -->|"selects locale"| node_language
node_language -->|"reads and writes"| node_account_store
node_settings_ui -->|"configures"| node_portable_data
node_workspace_ui -->|"renders"| node_migration_banner
node_workspace_ui -->|"renders"| node_update_banner
node_operator -->|"checks updates"| node_update_banner
node_update_banner -->|"fetches version"| node_update_service
node_workspace_ui -->|"uses accounts"| node_account_model

click node_renderer "https://github.com/duongbirken2510/omnichat/blob/main/src/renderer/src/main.ts"
click node_workspace_ui "https://github.com/duongbirken2510/omnichat/blob/main/src/renderer/src/App.vue"
click node_sidebar "https://github.com/duongbirken2510/omnichat/blob/main/src/renderer/src/components/AccountSidebar.vue"
click node_platform_sessions "https://github.com/duongbirken2510/omnichat/tree/main/src/renderer/src"
click node_quick_replies "https://github.com/duongbirken2510/omnichat/blob/main/src/renderer/src/App.vue"
click node_account_model "https://github.com/duongbirken2510/omnichat/blob/main/src/renderer/src/types/index.ts"
click node_account_store "https://github.com/duongbirken2510/omnichat/blob/main/src/renderer/src/database/db.ts"
click node_settings_ui "https://github.com/duongbirken2510/omnichat/blob/main/src/renderer/src/components/SettingsModal.vue"
click node_language "https://github.com/duongbirken2510/omnichat/blob/main/src/renderer/src/i18n/index.ts"
click node_portable_data "https://github.com/duongbirken2510/omnichat/blob/main/src/renderer/src/components/SettingsModal.vue"
click node_main_process "https://github.com/duongbirken2510/omnichat/blob/main/src/main/index.ts"
click node_preload_api "https://github.com/duongbirken2510/omnichat/blob/main/src/preload/index.ts"
click node_webview_preload "https://github.com/duongbirken2510/omnichat/blob/main/src/preload/webview.ts"
click node_notifications "https://github.com/duongbirken2510/omnichat/blob/main/src/renderer/src/composables/useNotifications.ts"
click node_migration_banner "https://github.com/duongbirken2510/omnichat/blob/main/src/renderer/src/components/MigrationBanner.vue"
click node_update_banner "https://github.com/duongbirken2510/omnichat/blob/main/src/renderer/src/components/AutoUpdateBanner.vue"

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_renderer,node_workspace_ui,node_sidebar,node_platform_sessions,node_platform_services,node_quick_replies toneBlue
class node_account_model toneAmber
class node_account_store,node_settings_ui,node_language,node_portable_data toneMint
class node_main_process,node_preload_api,node_webview_preload,node_notifications,node_migration_banner,node_update_banner toneRose
class node_operator,node_update_service toneIndigo
```

## Components

### Messaging workspace

- [Vue renderer](https://github.com/duongbirken2510/omnichat/blob/main/src/renderer/src/main.ts): `src/renderer/src/main.ts`
- [Unified workspace](https://github.com/duongbirken2510/omnichat/blob/main/src/renderer/src/App.vue): `src/renderer/src/App.vue`
- [Account sidebar](https://github.com/duongbirken2510/omnichat/blob/main/src/renderer/src/components/AccountSidebar.vue): `src/renderer/src/components/AccountSidebar.vue`
- [Platform sessions](https://github.com/duongbirken2510/omnichat/tree/main/src/renderer/src): `src/renderer/src`
- **Messaging platforms**
- [Quick replies](https://github.com/duongbirken2510/omnichat/blob/main/src/renderer/src/App.vue): `src/renderer/src/App.vue`

### Accounts and sessions

- [Account model](https://github.com/duongbirken2510/omnichat/blob/main/src/renderer/src/types/index.ts): `src/renderer/src/types/index.ts`

### Settings and persistence

- [Account and preferences DB](https://github.com/duongbirken2510/omnichat/blob/main/src/renderer/src/database/db.ts): `src/renderer/src/database/db.ts`
- [Settings modal](https://github.com/duongbirken2510/omnichat/blob/main/src/renderer/src/components/SettingsModal.vue): `src/renderer/src/components/SettingsModal.vue`
- [Bilingual interface](https://github.com/duongbirken2510/omnichat/blob/main/src/renderer/src/i18n/index.ts): `src/renderer/src/i18n/index.ts`
- [Portable data](https://github.com/duongbirken2510/omnichat/blob/main/src/renderer/src/components/SettingsModal.vue): `src/renderer/src/components/SettingsModal.vue`

### Desktop capabilities

- [Electron main](https://github.com/duongbirken2510/omnichat/blob/main/src/main/index.ts): `src/main/index.ts`
- [Preload bridge](https://github.com/duongbirken2510/omnichat/blob/main/src/preload/index.ts): `src/preload/index.ts`
- [Webview integration](https://github.com/duongbirken2510/omnichat/blob/main/src/preload/webview.ts): `src/preload/webview.ts`
- [Unread notifications](https://github.com/duongbirken2510/omnichat/blob/main/src/renderer/src/composables/useNotifications.ts): `src/renderer/src/composables/useNotifications.ts`
- [Migration banner](https://github.com/duongbirken2510/omnichat/blob/main/src/renderer/src/components/MigrationBanner.vue): `src/renderer/src/components/MigrationBanner.vue`
- [Update banner](https://github.com/duongbirken2510/omnichat/blob/main/src/renderer/src/components/AutoUpdateBanner.vue): `src/renderer/src/components/AutoUpdateBanner.vue`

### Other components

- **Operator**
- **Version endpoint**

## Connections

- Operator → Vue renderer: opens (evidence: `README.md`)
- Vue renderer → Unified workspace: mounts (evidence: `src/renderer/src/main.ts`)
- Unified workspace → Account sidebar: renders (evidence: `src/renderer/src/App.vue`)
- Unified workspace → Account and preferences DB: loads and persists (evidence: `src/renderer/src/App.vue`)
- Unified workspace → Platform sessions: manages (evidence: `README.md`)
- Platform sessions → Messaging platforms: embeds sessions (evidence: `README.md`)
- Operator → Platform sessions: handles chats (evidence: `README.md`)
- Unified workspace → Quick replies: manages (evidence: `src/renderer/src/App.vue`)
- Unified workspace → Unread notifications: watches unread counts (evidence: `src/renderer/src/App.vue`)
- Unified workspace → Settings modal: renders (evidence: `src/renderer/src/App.vue`)
- Settings modal → Bilingual interface: selects locale (evidence: `src/renderer/src/components/SettingsModal.vue`)
- Bilingual interface → Account and preferences DB: reads and writes (evidence: `src/renderer/src/i18n/index.ts`)
- Settings modal → Portable data: configures (evidence: `README.md`)
- Unified workspace → Migration banner: renders (evidence: `src/renderer/src/App.vue`)
- Unified workspace → Update banner: renders (evidence: `src/renderer/src/App.vue`)
- Operator → Update banner: checks updates (evidence: `src/renderer/src/components/AutoUpdateBanner.vue`)
- Update banner → Version endpoint: fetches version (evidence: `src/renderer/src/components/AutoUpdateBanner.vue`)
- Unified workspace → Account model: uses accounts (evidence: `src/renderer/src/App.vue`)
