# andrewkochulab/jarvis-dashboard architecture

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

- Interactive diagram: https://gitdiagram.com/andrewkochulab/jarvis-dashboard
- Repository: https://github.com/andrewkochulab/jarvis-dashboard

## Overview

J.A.R.V.I.S. is a cross-platform AI command dashboard; its principal mobile voice workflow sends audio or text over WebSocket, transcribes audio, runs Claude, streams responses and optionally synthesizes speech. The dashboard also monitors sessions and analytics and provides configurable productivity widgets. The graph combines documented capabilities with relationships visible in the supplied source excerpts; unsampled widget, iOS and platform internals are represented only at supported subsystem boundaries.

Main entry points: [`companion/modules/server-factory.js`](https://github.com/andrewkochulab/jarvis-dashboard/blob/main/companion/modules/server-factory.js) (Server assembly), [`companion/modules/voice-pipeline.js`](https://github.com/andrewkochulab/jarvis-dashboard/blob/main/companion/modules/voice-pipeline.js) (Voice orchestration), [`companion/modules/tts/tts-manager.js`](https://github.com/andrewkochulab/jarvis-dashboard/blob/main/companion/modules/tts/tts-manager.js) (Speech queue), [`ios/JarvisApp/Views/DashboardView.swift`](https://github.com/andrewkochulab/jarvis-dashboard/blob/main/ios/JarvisApp/Views/DashboardView.swift) (iOS voice dashboard)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_clients["Dashboard clients"]
  node_dashboard["iOS voice dashboard"]
  node_voice_widget["Voice Command widget"]
  node_network_client["Mobile network client<br/>[network-client.js]"]
end

subgraph group_voice["Voice interaction"]
  node_audio_session["Audio capture session<br/>[audio.js]"]
  node_transcriber["Speech transcription<br/>[transcriber.js]"]
  node_voice_pipeline["Voice orchestration<br/>[voice-pipeline.js]"]
  node_claude_runner["Claude execution<br/>[claude-runner.js]"]
  node_tts_manager["Speech queue<br/>[tts-manager.js]"]
  node_piper["Piper synthesis<br/>[piper-engine.js]"]
  node_say["macOS Say synthesis<br/>[say-engine.js]"]
  node_base_tts["TTS engine callbacks<br/>[base-engine.js]"]
end

subgraph group_server["Companion server"]
  node_server_entry["Server entry<br/>[server.js]"]
  node_server_assembly["Server assembly<br/>[server-factory.js]"]
  node_authentication["Client authentication<br/>[auth.js]"]
  node_message_router["Message routing<br/>[message-router.js]"]
  node_message_handlers["Message handlers<br/>[handlers.js]"]
  node_connection["Connection state"]
  node_protocol["WebSocket protocol<br/>[protocol.js]"]
end

subgraph group_monitoring["Monitoring and widgets"]
  node_session_monitor["Live sessions<br/>[index.js]"]
  node_session_service["Session monitoring<br/>[session-manager.js]"]
  node_analytics["Activity analytics<br/>[index.js]"]
  node_productivity["Productivity widgets<br/>[index.js]"]
end

subgraph group_platform["Platform integration"]
  node_macos_app["macOS desktop app<br/>[lib.rs]"]
  node_platform_adapter["Platform adapters"]
  node_ios_bridge["iOS web bridge"]
end

node_mobile_user(("Mobile user"))
node_external_services{{"Claude CLI, Whisper, TTS tools"}}

node_mobile_user -->|"uses"| node_dashboard
node_dashboard -.->|"hosts voice UI"| node_voice_widget
node_voice_widget -.->|"sends commands"| node_network_client
node_network_client -.->|"connects by WebSocket"| node_server_entry
node_server_entry -->|"starts"| node_server_assembly
node_server_assembly -->|"configures"| node_authentication
node_server_assembly -->|"registers routes"| node_message_router
node_server_assembly -->|"creates per client"| node_connection
node_server_assembly -->|"creates per client"| node_voice_pipeline
node_server_assembly -->|"parses messages"| node_protocol
node_message_router -->|"dispatches"| node_message_handlers
node_message_handlers -->|"creates and appends audio"| node_audio_session
node_message_handlers -->|"starts processing"| node_voice_pipeline
node_voice_pipeline -->|"transcribes audio"| node_transcriber
node_voice_pipeline -->|"runs prompt"| node_claude_runner
node_voice_pipeline -->|"builds response messages"| node_protocol
node_voice_pipeline -->|"queues response speech"| node_tts_manager
node_connection -->|"initializes"| node_claude_runner
node_connection -->|"initializes when enabled"| node_tts_manager
node_tts_manager -->|"selects engine"| node_piper
node_tts_manager -->|"selects or falls back"| node_say
node_piper -->|"inherits callbacks"| node_base_tts
node_say -->|"inherits callbacks"| node_base_tts
node_claude_runner -.->|"invokes Claude CLI"| node_external_services
node_transcriber -.->|"uses Whisper"| node_external_services
node_piper -->|"spawns Piper binary"| node_external_services
node_say -->|"spawns say"| node_external_services
node_session_monitor -.->|"monitors sessions"| node_session_service
node_analytics -.->|"summarizes activity"| node_session_service
node_macos_app -.->|"uses shared adapters"| node_platform_adapter
node_dashboard -->|"hosts web view"| node_ios_bridge

click node_dashboard "https://github.com/andrewkochulab/jarvis-dashboard/blob/main/ios/JarvisApp/Views/DashboardView.swift"
click node_voice_widget "https://github.com/andrewkochulab/jarvis-dashboard/tree/main/src/widgets/voice-command"
click node_network_client "https://github.com/andrewkochulab/jarvis-dashboard/blob/main/src/services/network-client.js"
click node_server_entry "https://github.com/andrewkochulab/jarvis-dashboard/blob/main/companion/server.js"
click node_server_assembly "https://github.com/andrewkochulab/jarvis-dashboard/blob/main/companion/modules/server-factory.js"
click node_authentication "https://github.com/andrewkochulab/jarvis-dashboard/blob/main/companion/modules/auth.js"
click node_message_router "https://github.com/andrewkochulab/jarvis-dashboard/blob/main/companion/modules/message-router.js"
click node_message_handlers "https://github.com/andrewkochulab/jarvis-dashboard/blob/main/companion/modules/handlers.js"
click node_connection "https://github.com/andrewkochulab/jarvis-dashboard/blob/main/companion/modules/connection-handler.js"
click node_protocol "https://github.com/andrewkochulab/jarvis-dashboard/blob/main/companion/modules/protocol.js"
click node_audio_session "https://github.com/andrewkochulab/jarvis-dashboard/blob/main/companion/modules/audio.js"
click node_transcriber "https://github.com/andrewkochulab/jarvis-dashboard/blob/main/companion/modules/transcriber.js"
click node_voice_pipeline "https://github.com/andrewkochulab/jarvis-dashboard/blob/main/companion/modules/voice-pipeline.js"
click node_claude_runner "https://github.com/andrewkochulab/jarvis-dashboard/blob/main/companion/modules/claude-runner.js"
click node_tts_manager "https://github.com/andrewkochulab/jarvis-dashboard/blob/main/companion/modules/tts/tts-manager.js"
click node_piper "https://github.com/andrewkochulab/jarvis-dashboard/blob/main/companion/modules/tts/piper-engine.js"
click node_say "https://github.com/andrewkochulab/jarvis-dashboard/blob/main/companion/modules/tts/say-engine.js"
click node_base_tts "https://github.com/andrewkochulab/jarvis-dashboard/blob/main/companion/modules/tts/base-engine.js"
click node_session_monitor "https://github.com/andrewkochulab/jarvis-dashboard/blob/main/src/widgets/live-sessions/index.js"
click node_session_service "https://github.com/andrewkochulab/jarvis-dashboard/blob/main/src/services/session-manager.js"
click node_analytics "https://github.com/andrewkochulab/jarvis-dashboard/blob/main/src/widgets/activity-analytics/index.js"
click node_productivity "https://github.com/andrewkochulab/jarvis-dashboard/blob/main/src/widgets/focus-timer/index.js"
click node_macos_app "https://github.com/andrewkochulab/jarvis-dashboard/blob/main/macos/src-tauri/src/lib.rs"
click node_platform_adapter "https://github.com/andrewkochulab/jarvis-dashboard/blob/main/shared/bridge/platform-adapter.js"
click node_ios_bridge "https://github.com/andrewkochulab/jarvis-dashboard/blob/main/ios/JarvisApp/Bridge/WebViewBridge.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_dashboard,node_voice_widget,node_network_client,node_mobile_user toneBlue
class node_audio_session,node_transcriber,node_voice_pipeline,node_claude_runner,node_tts_manager,node_piper,node_say,node_base_tts toneAmber
class node_server_entry,node_server_assembly,node_authentication,node_message_router,node_message_handlers,node_connection,node_protocol toneMint
class node_session_monitor,node_session_service,node_analytics,node_productivity toneRose
class node_macos_app,node_platform_adapter,node_ios_bridge,node_external_services toneIndigo
```

## Components

### Dashboard clients

- [iOS voice dashboard](https://github.com/andrewkochulab/jarvis-dashboard/blob/main/ios/JarvisApp/Views/DashboardView.swift): `ios/JarvisApp/Views/DashboardView.swift`
- [Voice Command widget](https://github.com/andrewkochulab/jarvis-dashboard/tree/main/src/widgets/voice-command): `src/widgets/voice-command`
- [Mobile network client](https://github.com/andrewkochulab/jarvis-dashboard/blob/main/src/services/network-client.js): `src/services/network-client.js`

### Voice interaction

- [Audio capture session](https://github.com/andrewkochulab/jarvis-dashboard/blob/main/companion/modules/audio.js): `companion/modules/audio.js`
- [Speech transcription](https://github.com/andrewkochulab/jarvis-dashboard/blob/main/companion/modules/transcriber.js): `companion/modules/transcriber.js`
- [Voice orchestration](https://github.com/andrewkochulab/jarvis-dashboard/blob/main/companion/modules/voice-pipeline.js): `companion/modules/voice-pipeline.js`
- [Claude execution](https://github.com/andrewkochulab/jarvis-dashboard/blob/main/companion/modules/claude-runner.js): `companion/modules/claude-runner.js`
- [Speech queue](https://github.com/andrewkochulab/jarvis-dashboard/blob/main/companion/modules/tts/tts-manager.js): `companion/modules/tts/tts-manager.js`
- [Piper synthesis](https://github.com/andrewkochulab/jarvis-dashboard/blob/main/companion/modules/tts/piper-engine.js): `companion/modules/tts/piper-engine.js`
- [macOS Say synthesis](https://github.com/andrewkochulab/jarvis-dashboard/blob/main/companion/modules/tts/say-engine.js): `companion/modules/tts/say-engine.js`
- [TTS engine callbacks](https://github.com/andrewkochulab/jarvis-dashboard/blob/main/companion/modules/tts/base-engine.js): `companion/modules/tts/base-engine.js`

### Companion server

- [Server entry](https://github.com/andrewkochulab/jarvis-dashboard/blob/main/companion/server.js): `companion/server.js`
- [Server assembly](https://github.com/andrewkochulab/jarvis-dashboard/blob/main/companion/modules/server-factory.js): `companion/modules/server-factory.js`
- [Client authentication](https://github.com/andrewkochulab/jarvis-dashboard/blob/main/companion/modules/auth.js): `companion/modules/auth.js`
- [Message routing](https://github.com/andrewkochulab/jarvis-dashboard/blob/main/companion/modules/message-router.js): `companion/modules/message-router.js`
- [Message handlers](https://github.com/andrewkochulab/jarvis-dashboard/blob/main/companion/modules/handlers.js): `companion/modules/handlers.js`
- [Connection state](https://github.com/andrewkochulab/jarvis-dashboard/blob/main/companion/modules/connection-handler.js): `companion/modules/connection-handler.js`
- [WebSocket protocol](https://github.com/andrewkochulab/jarvis-dashboard/blob/main/companion/modules/protocol.js): `companion/modules/protocol.js`

### Monitoring and widgets

- [Live sessions](https://github.com/andrewkochulab/jarvis-dashboard/blob/main/src/widgets/live-sessions/index.js): `src/widgets/live-sessions/index.js`
- [Session monitoring](https://github.com/andrewkochulab/jarvis-dashboard/blob/main/src/services/session-manager.js): `src/services/session-manager.js`
- [Activity analytics](https://github.com/andrewkochulab/jarvis-dashboard/blob/main/src/widgets/activity-analytics/index.js): `src/widgets/activity-analytics/index.js`
- [Productivity widgets](https://github.com/andrewkochulab/jarvis-dashboard/blob/main/src/widgets/focus-timer/index.js): `src/widgets/focus-timer/index.js`

### Platform integration

- [macOS desktop app](https://github.com/andrewkochulab/jarvis-dashboard/blob/main/macos/src-tauri/src/lib.rs): `macos/src-tauri/src/lib.rs`
- [Platform adapters](https://github.com/andrewkochulab/jarvis-dashboard/blob/main/shared/bridge/platform-adapter.js): `shared/bridge/platform-adapter.js`
- [iOS web bridge](https://github.com/andrewkochulab/jarvis-dashboard/blob/main/ios/JarvisApp/Bridge/WebViewBridge.swift): `ios/JarvisApp/Bridge/WebViewBridge.swift`

### Other components

- **Mobile user**
- **Claude CLI, Whisper, TTS tools**

## Connections

- Mobile user → iOS voice dashboard: uses
- iOS voice dashboard → Voice Command widget: hosts voice UI
- Voice Command widget → Mobile network client: sends commands
- Mobile network client → Server entry: connects by WebSocket
- Server entry → Server assembly: starts (evidence: `companion/server.js`)
- Server assembly → Client authentication: configures (evidence: `companion/modules/server-factory.js`)
- Server assembly → Message routing: registers routes (evidence: `companion/modules/server-factory.js`)
- Server assembly → Connection state: creates per client (evidence: `companion/modules/server-factory.js`)
- Server assembly → Voice orchestration: creates per client (evidence: `companion/modules/server-factory.js`)
- Server assembly → WebSocket protocol: parses messages (evidence: `companion/modules/server-factory.js`)
- Message routing → Message handlers: dispatches (evidence: `companion/modules/server-factory.js`)
- Message handlers → Audio capture session: creates and appends audio (evidence: `companion/modules/handlers.js`)
- Message handlers → Voice orchestration: starts processing (evidence: `companion/modules/handlers.js`)
- Voice orchestration → Speech transcription: transcribes audio (evidence: `companion/modules/voice-pipeline.js`)
- Voice orchestration → Claude execution: runs prompt (evidence: `companion/modules/voice-pipeline.js`)
- Voice orchestration → WebSocket protocol: builds response messages (evidence: `companion/modules/voice-pipeline.js`)
- Voice orchestration → Speech queue: queues response speech (evidence: `companion/modules/voice-pipeline.js`)
- Connection state → Claude execution: initializes (evidence: `companion/modules/connection-handler.js`)
- Connection state → Speech queue: initializes when enabled (evidence: `companion/modules/connection-handler.js`)
- Speech queue → Piper synthesis: selects engine (evidence: `companion/modules/tts/tts-manager.js`)
- Speech queue → macOS Say synthesis: selects or falls back (evidence: `companion/modules/tts/tts-manager.js`)
- Piper synthesis → TTS engine callbacks: inherits callbacks (evidence: `companion/modules/tts/piper-engine.js`)
- macOS Say synthesis → TTS engine callbacks: inherits callbacks (evidence: `companion/modules/tts/say-engine.js`)
- Claude execution → Claude CLI, Whisper, TTS tools: invokes Claude CLI
- Speech transcription → Claude CLI, Whisper, TTS tools: uses Whisper
- Piper synthesis → Claude CLI, Whisper, TTS tools: spawns Piper binary (evidence: `companion/modules/tts/piper-engine.js`)
- macOS Say synthesis → Claude CLI, Whisper, TTS tools: spawns say (evidence: `companion/modules/tts/say-engine.js`)
- Live sessions → Session monitoring: monitors sessions
- Activity analytics → Session monitoring: summarizes activity
- macOS desktop app → Platform adapters: uses shared adapters
- iOS voice dashboard → iOS web bridge: hosts web view (evidence: `ios/JarvisApp/Views/DashboardView.swift`)
