# realsigridjin/omo-ui-macosapp architecture

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

- Interactive diagram: https://gitdiagram.com/realsigridjin/omo-ui-macosapp
- Repository: https://github.com/realsigridjin/omo-ui-macosapp

## Overview

OmO UI is an Electron macOS client for the omo coding agent, with a SwiftUI iPhone companion that controls the Mac over USB. The desktop workflow runs from the user’s workspace and composer through app state and the Electron bridge to omo app-server; streamed events and reconstructed session history feed the conversation, activity, and agent views. The README also documents side chats, skills, approvals, account usage, onboarding, settings, and automatic omo updates. Some peripheral wiring is not shown in the excerpts, so those links are omitted rather than inferred.

Main entry points: [`src/App.tsx`](https://github.com/realsigridjin/omo-ui-macosapp/blob/main/src/App.tsx) (App shell), [`electron/ipc.ts`](https://github.com/realsigridjin/omo-ui-macosapp/blob/main/electron/ipc.ts) (IPC handlers), [`src/state/actions.ts`](https://github.com/realsigridjin/omo-ui-macosapp/blob/main/src/state/actions.ts) (App state and actions), [`electron/omo/supervisor.ts`](https://github.com/realsigridjin/omo-ui-macosapp/blob/main/electron/omo/supervisor.ts) (Omo supervisor)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_desktop["Desktop experience"]
  node_app["App shell<br/>[App.tsx]"]
  node_composer["Composer and skills<br/>[Composer.tsx]"]
  node_conversation["Conversation view"]
  node_activity["Agents and activity<br/>[AgentsPanel.tsx]"]
  node_sidechat["Side chat<br/>[SidePanel.tsx]"]
  node_settings["Settings and accounts<br/>[SettingsPage.tsx]"]
  node_onboarding["Onboarding<br/>[Onboarding.tsx]"]
end

subgraph group_state["Session state and views"]
  node_store["App state and actions<br/>[actions.ts]"]
  node_livewire["Live event parsing<br/>[live-wire.ts]"]
  node_selectors["State selectors<br/>[selectors.ts]"]
  node_markdown["Markdown rendering<br/>[highlight.ts]"]
end

subgraph group_runtime["Electron runtime"]
  node_electron["Main process<br/>[main.ts]"]
  node_ipc["IPC handlers<br/>[ipc.ts]"]
  node_supervisor["Omo supervisor<br/>[supervisor.ts]"]
  node_client["App-server client"]
  node_protocol["IPC and wire contracts<br/>[protocol.ts]"]
  node_updater["Omo updater<br/>[updater.ts]"]
end

subgraph group_mobile["iPhone companion"]
  node_iphonebridge["USB bridge<br/>[bridge.ts]"]
  node_iosapp["iPhone app<br/>[RemoteModel.swift]"]
  node_iosclient["iPhone RPC client<br/>[RPCClient.swift]"]
end

subgraph group_history["History and preferences"]
  node_history["Session history<br/>[session-jsonl.ts]"]
  node_preferences[("Preferences<br/>[prefs.ts]")]
  node_accounts["Account usage<br/>[usage.ts]"]
end

node_user(("User"))
node_omo{{"omo app-server"}}
node_phone(("iPhone user"))

node_user -->|"uses"| node_app
node_app -->|"renders"| node_composer
node_app -->|"renders"| node_conversation
node_app -->|"renders"| node_sidechat
node_app -->|"renders"| node_activity
node_app -->|"opens"| node_settings
node_app -->|"renders"| node_onboarding
node_app -->|"creates"| node_store
node_composer -.->|"dispatches"| node_store
node_store -->|"parses events"| node_livewire
node_store -->|"selects state"| node_selectors
node_conversation -.->|"renders text"| node_markdown
node_electron -->|"registers handlers"| node_ipc
node_electron -->|"starts"| node_supervisor
node_electron -->|"starts"| node_iphonebridge
node_supervisor -->|"launches"| node_client
node_client -->|"sends RPC"| node_omo
node_ipc -->|"routes requests"| node_supervisor
node_ipc -->|"loads history"| node_history
node_ipc -->|"reads settings"| node_preferences
node_ipc -->|"loads usage"| node_accounts
node_supervisor -->|"checks updates"| node_updater
node_iphonebridge -->|"relays requests"| node_supervisor
node_phone -->|"controls sessions"| node_iosapp
node_iosapp -->|"uses RPC"| node_iosclient
node_iosclient -.->|"USB connection"| node_iphonebridge
node_omo -.->|"writes sessions"| node_history
node_history -.->|"restores conversations"| node_store
node_settings -.->|"shows usage"| node_accounts
node_onboarding -.->|"installs if missing"| node_omo

click node_app "https://github.com/realsigridjin/omo-ui-macosapp/blob/main/src/App.tsx"
click node_composer "https://github.com/realsigridjin/omo-ui-macosapp/blob/main/src/ui/composer/Composer.tsx"
click node_conversation "https://github.com/realsigridjin/omo-ui-macosapp/blob/main/src/ui/conversation/ConversationPane.tsx"
click node_activity "https://github.com/realsigridjin/omo-ui-macosapp/blob/main/src/ui/agents/AgentsPanel.tsx"
click node_sidechat "https://github.com/realsigridjin/omo-ui-macosapp/blob/main/src/ui/btw/SidePanel.tsx"
click node_settings "https://github.com/realsigridjin/omo-ui-macosapp/blob/main/src/ui/settings/SettingsPage.tsx"
click node_onboarding "https://github.com/realsigridjin/omo-ui-macosapp/blob/main/src/ui/onboarding/Onboarding.tsx"
click node_store "https://github.com/realsigridjin/omo-ui-macosapp/blob/main/src/state/actions.ts"
click node_livewire "https://github.com/realsigridjin/omo-ui-macosapp/blob/main/src/state/live-wire.ts"
click node_selectors "https://github.com/realsigridjin/omo-ui-macosapp/blob/main/src/state/selectors.ts"
click node_markdown "https://github.com/realsigridjin/omo-ui-macosapp/blob/main/src/dsh/primitives/markdown/highlight.ts"
click node_electron "https://github.com/realsigridjin/omo-ui-macosapp/blob/main/electron/main.ts"
click node_ipc "https://github.com/realsigridjin/omo-ui-macosapp/blob/main/electron/ipc.ts"
click node_supervisor "https://github.com/realsigridjin/omo-ui-macosapp/blob/main/electron/omo/supervisor.ts"
click node_client "https://github.com/realsigridjin/omo-ui-macosapp/blob/main/electron/omo/app-server-client.ts"
click node_protocol "https://github.com/realsigridjin/omo-ui-macosapp/blob/main/shared/protocol.ts"
click node_history "https://github.com/realsigridjin/omo-ui-macosapp/blob/main/electron/history/session-jsonl.ts"
click node_preferences "https://github.com/realsigridjin/omo-ui-macosapp/blob/main/electron/prefs.ts"
click node_accounts "https://github.com/realsigridjin/omo-ui-macosapp/blob/main/electron/accounts/usage.ts"
click node_updater "https://github.com/realsigridjin/omo-ui-macosapp/blob/main/electron/omo/updater.ts"
click node_iphonebridge "https://github.com/realsigridjin/omo-ui-macosapp/blob/main/electron/iphone/bridge.ts"
click node_iosapp "https://github.com/realsigridjin/omo-ui-macosapp/blob/main/ios/OmoRemote/RemoteModel.swift"
click node_iosclient "https://github.com/realsigridjin/omo-ui-macosapp/blob/main/ios/OmoKit/Sources/OmoKit/RPCClient.swift"

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_app,node_composer,node_conversation,node_activity,node_sidechat,node_settings,node_onboarding,node_user,node_phone toneBlue
class node_store,node_livewire,node_selectors,node_markdown toneAmber
class node_electron,node_ipc,node_supervisor,node_client,node_protocol,node_updater,node_omo toneMint
class node_iphonebridge,node_iosapp,node_iosclient toneRose
class node_history,node_preferences,node_accounts toneIndigo
```

## Components

### Desktop experience

- [App shell](https://github.com/realsigridjin/omo-ui-macosapp/blob/main/src/App.tsx): `src/App.tsx`
- [Composer and skills](https://github.com/realsigridjin/omo-ui-macosapp/blob/main/src/ui/composer/Composer.tsx): `src/ui/composer/Composer.tsx`
- [Conversation view](https://github.com/realsigridjin/omo-ui-macosapp/blob/main/src/ui/conversation/ConversationPane.tsx): `src/ui/conversation/ConversationPane.tsx`
- [Agents and activity](https://github.com/realsigridjin/omo-ui-macosapp/blob/main/src/ui/agents/AgentsPanel.tsx): `src/ui/agents/AgentsPanel.tsx`
- [Side chat](https://github.com/realsigridjin/omo-ui-macosapp/blob/main/src/ui/btw/SidePanel.tsx): `src/ui/btw/SidePanel.tsx`
- [Settings and accounts](https://github.com/realsigridjin/omo-ui-macosapp/blob/main/src/ui/settings/SettingsPage.tsx): `src/ui/settings/SettingsPage.tsx`
- [Onboarding](https://github.com/realsigridjin/omo-ui-macosapp/blob/main/src/ui/onboarding/Onboarding.tsx): `src/ui/onboarding/Onboarding.tsx`

### Session state and views

- [App state and actions](https://github.com/realsigridjin/omo-ui-macosapp/blob/main/src/state/actions.ts): `src/state/actions.ts`
- [Live event parsing](https://github.com/realsigridjin/omo-ui-macosapp/blob/main/src/state/live-wire.ts): `src/state/live-wire.ts`
- [State selectors](https://github.com/realsigridjin/omo-ui-macosapp/blob/main/src/state/selectors.ts): `src/state/selectors.ts`
- [Markdown rendering](https://github.com/realsigridjin/omo-ui-macosapp/blob/main/src/dsh/primitives/markdown/highlight.ts): `src/dsh/primitives/markdown/highlight.ts`

### Electron runtime

- [Main process](https://github.com/realsigridjin/omo-ui-macosapp/blob/main/electron/main.ts): `electron/main.ts`
- [IPC handlers](https://github.com/realsigridjin/omo-ui-macosapp/blob/main/electron/ipc.ts): `electron/ipc.ts`
- [Omo supervisor](https://github.com/realsigridjin/omo-ui-macosapp/blob/main/electron/omo/supervisor.ts): `electron/omo/supervisor.ts`
- [App-server client](https://github.com/realsigridjin/omo-ui-macosapp/blob/main/electron/omo/app-server-client.ts): `electron/omo/app-server-client.ts`
- [IPC and wire contracts](https://github.com/realsigridjin/omo-ui-macosapp/blob/main/shared/protocol.ts): `shared/protocol.ts`
- [Omo updater](https://github.com/realsigridjin/omo-ui-macosapp/blob/main/electron/omo/updater.ts): `electron/omo/updater.ts`

### iPhone companion

- [USB bridge](https://github.com/realsigridjin/omo-ui-macosapp/blob/main/electron/iphone/bridge.ts): `electron/iphone/bridge.ts`
- [iPhone app](https://github.com/realsigridjin/omo-ui-macosapp/blob/main/ios/OmoRemote/RemoteModel.swift): `ios/OmoRemote/RemoteModel.swift`
- [iPhone RPC client](https://github.com/realsigridjin/omo-ui-macosapp/blob/main/ios/OmoKit/Sources/OmoKit/RPCClient.swift): `ios/OmoKit/Sources/OmoKit/RPCClient.swift`

### History and preferences

- [Session history](https://github.com/realsigridjin/omo-ui-macosapp/blob/main/electron/history/session-jsonl.ts): `electron/history/session-jsonl.ts`
- [Preferences](https://github.com/realsigridjin/omo-ui-macosapp/blob/main/electron/prefs.ts): `electron/prefs.ts`
- [Account usage](https://github.com/realsigridjin/omo-ui-macosapp/blob/main/electron/accounts/usage.ts): `electron/accounts/usage.ts`

### Other components

- **User**
- **omo app-server**
- **iPhone user**

## Connections

- User → App shell: uses (evidence: `README.md`)
- App shell → Composer and skills: renders (evidence: `src/App.tsx`)
- App shell → Conversation view: renders (evidence: `src/App.tsx`)
- App shell → Side chat: renders (evidence: `src/App.tsx`)
- App shell → Agents and activity: renders (evidence: `src/App.tsx`)
- App shell → Settings and accounts: opens (evidence: `src/App.tsx`)
- App shell → Onboarding: renders (evidence: `src/App.tsx`)
- App shell → App state and actions: creates (evidence: `src/App.tsx`)
- Composer and skills → App state and actions: dispatches
- App state and actions → Live event parsing: parses events (evidence: `src/state/actions.ts`)
- App state and actions → State selectors: selects state (evidence: `src/state/index.ts`)
- Conversation view → Markdown rendering: renders text
- Main process → IPC handlers: registers handlers (evidence: `electron/main.ts`)
- Main process → Omo supervisor: starts (evidence: `electron/main.ts`)
- Main process → USB bridge: starts (evidence: `electron/main.ts`)
- Omo supervisor → App-server client: launches (evidence: `electron/omo/supervisor.ts`)
- App-server client → omo app-server: sends RPC (evidence: `electron/omo/app-server-client.ts`)
- IPC handlers → Omo supervisor: routes requests (evidence: `electron/ipc.ts`)
- IPC handlers → Session history: loads history (evidence: `electron/ipc.ts`)
- IPC handlers → Preferences: reads settings (evidence: `electron/ipc.ts`)
- IPC handlers → Account usage: loads usage (evidence: `electron/ipc.ts`)
- Omo supervisor → Omo updater: checks updates (evidence: `electron/omo/supervisor.ts`)
- USB bridge → Omo supervisor: relays requests (evidence: `electron/iphone/bridge.ts`)
- iPhone user → iPhone app: controls sessions (evidence: `README.md`)
- iPhone app → iPhone RPC client: uses RPC
- iPhone RPC client → USB bridge: USB connection (evidence: `README.md`)
- omo app-server → Session history: writes sessions (evidence: `README.md`)
- Session history → App state and actions: restores conversations (evidence: `README.md`)
- Settings and accounts → Account usage: shows usage (evidence: `README.md`)
- Onboarding → omo app-server: installs if missing (evidence: `README.md`)
