# shubhamshnd/open-cluely architecture

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

- Interactive diagram: https://gitdiagram.com/shubhamshnd/open-cluely
- Repository: https://github.com/shubhamshnd/open-cluely

## Overview

Open-Cluely is an Electron copilot for interviews and meetings. The main workflow is to capture system and microphone audio and screenshots, assemble enabled context in the desktop chat, and request an AI response or meeting notes. The app also offers settings, persistent session state, a stealth-capable window, and a mobile chat companion. The graph uses the README and source-index references for relationships; some implementation details, especially renderer-to-main IPC wiring, were not excerpted.

Main entry points: [`src/main-process/start-application.js`](https://github.com/shubhamshnd/open-cluely/blob/main/src/main-process/start-application.js) (Application startup), [`src/windows/assistant/renderer.js`](https://github.com/shubhamshnd/open-cluely/blob/main/src/windows/assistant/renderer.js) (Assistant interface), [`src/main-process/features/assistant/gemini-runtime.js`](https://github.com/shubhamshnd/open-cluely/blob/main/src/main-process/features/assistant/gemini-runtime.js) (AI provider runtime), [`src/services/assembly-ai/service.js`](https://github.com/shubhamshnd/open-cluely/blob/main/src/services/assembly-ai/service.js) (Streaming transcription service)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_desktop["Desktop shell"]
  node_startup["Application startup"]
  node_window["Stealth window"]
  node_settings["Settings panel"]
  node_state[("Persisted session state<br/>[app-state.js]")]
end

subgraph group_capture["Session capture"]
  node_transcription["Transcription controls"]
  node_audio["Audio capture pipeline<br/>[audio-pipeline.js]"]
  node_transcript_buffer["Transcript buffering"]
  node_assembly["Streaming transcription service<br/>[service.js]"]
  node_assembly_api["AssemblyAI"]
  node_screenshots["Screenshot capture and retention"]
end

subgraph group_context["Chat and context"]
  node_renderer["Assistant interface<br/>[renderer.js]"]
  node_chat["Chat and actions<br/>[chat-ui-manager.js]"]
  node_context_bundle["AI context selection<br/>[context-bundle.js]"]
  node_messages["Message inclusion controls<br/>[message-store.js]"]
end

subgraph group_ai["AI services"]
  node_gemini_runtime["AI provider runtime<br/>[gemini-runtime.js]"]
  node_assistant_ipc["Assistant request handling<br/>[ipc.js]"]
  node_gemini["Gemini service<br/>[gemini-service.js]"]
  node_ollama["Ollama service<br/>[ollama-service.js]"]
  node_prompts["AI action prompts<br/>[prompts.js]"]
end

subgraph group_companion["Mobile companion"]
  node_mobile["Mobile chat server<br/>[server.js]"]
end

node_user(("Interviewer or host"))
node_phone(("Phone browser"))

node_user -->|"uses"| node_renderer
node_startup -->|"creates"| node_window
node_startup -->|"loads and saves"| node_state
node_startup -->|"initializes"| node_screenshots
node_startup -->|"initializes"| node_gemini_runtime
node_startup -->|"registers"| node_assistant_ipc
node_startup -->|"initializes"| node_assembly
node_startup -->|"starts"| node_mobile
node_renderer -->|"uses"| node_chat
node_renderer -->|"uses"| node_context_bundle
node_renderer -->|"uses"| node_messages
node_renderer -->|"uses"| node_transcription
node_renderer -->|"uses"| node_settings
node_chat -->|"records messages"| node_messages
node_user -->|"starts and controls"| node_transcription
node_transcription -->|"controls capture"| node_audio
node_audio -.->|"streams audio"| node_assembly
node_assembly -.->|"streams audio"| node_assembly_api
node_assembly -.->|"emits transcript"| node_transcript_buffer
node_user -->|"requests capture"| node_screenshots
node_user -->|"chooses AI action"| node_chat
node_context_bundle -->|"selects context"| node_messages
node_assistant_ipc -.->|"dispatches requests"| node_gemini_runtime
node_assistant_ipc -.->|"requests images"| node_screenshots
node_gemini_runtime -->|"selects provider"| node_gemini
node_gemini_runtime -->|"selects provider"| node_ollama
node_gemini -->|"builds prompts"| node_prompts
node_ollama -->|"builds prompts"| node_prompts
node_user -->|"configures app"| node_settings
node_settings -.->|"saves settings"| node_state
node_phone -->|"opens chat"| node_mobile
node_mobile -->|"requests AI responses"| node_gemini_runtime
node_mobile -->|"reads screenshots"| node_screenshots

click node_startup "https://github.com/shubhamshnd/open-cluely/blob/main/src/main-process/start-application.js"
click node_window "https://github.com/shubhamshnd/open-cluely/blob/main/src/main-process/features/window/window-controller.js"
click node_settings "https://github.com/shubhamshnd/open-cluely/blob/main/src/windows/assistant/renderer/features/settings/settings-panel-manager.js"
click node_state "https://github.com/shubhamshnd/open-cluely/blob/main/src/services/state/app-state.js"
click node_renderer "https://github.com/shubhamshnd/open-cluely/blob/main/src/windows/assistant/renderer.js"
click node_chat "https://github.com/shubhamshnd/open-cluely/blob/main/src/windows/assistant/renderer/features/chat/chat-ui-manager.js"
click node_context_bundle "https://github.com/shubhamshnd/open-cluely/blob/main/src/windows/assistant/renderer/features/ai-context/context-bundle.js"
click node_messages "https://github.com/shubhamshnd/open-cluely/blob/main/src/windows/assistant/renderer/features/ai-context/message-store.js"
click node_transcription "https://github.com/shubhamshnd/open-cluely/blob/main/src/windows/assistant/renderer/features/transcription/transcription-manager.js"
click node_audio "https://github.com/shubhamshnd/open-cluely/blob/main/src/windows/assistant/renderer/features/assembly-ai/audio-pipeline.js"
click node_transcript_buffer "https://github.com/shubhamshnd/open-cluely/blob/main/src/windows/assistant/renderer/features/assembly-ai/transcript-buffer.js"
click node_assembly "https://github.com/shubhamshnd/open-cluely/blob/main/src/services/assembly-ai/service.js"
click node_screenshots "https://github.com/shubhamshnd/open-cluely/blob/main/src/main-process/features/assistant/screenshot-manager.js"
click node_gemini_runtime "https://github.com/shubhamshnd/open-cluely/blob/main/src/main-process/features/assistant/gemini-runtime.js"
click node_assistant_ipc "https://github.com/shubhamshnd/open-cluely/blob/main/src/main-process/features/assistant/ipc.js"
click node_gemini "https://github.com/shubhamshnd/open-cluely/blob/main/src/services/ai/gemini-service.js"
click node_ollama "https://github.com/shubhamshnd/open-cluely/blob/main/src/services/ai/ollama-service.js"
click node_prompts "https://github.com/shubhamshnd/open-cluely/blob/main/src/services/ai/prompts.js"
click node_mobile "https://github.com/shubhamshnd/open-cluely/blob/main/src/main-process/features/mobile-server/server.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_startup,node_window,node_settings,node_state,node_user,node_phone toneBlue
class node_transcription,node_audio,node_transcript_buffer,node_assembly,node_assembly_api,node_screenshots toneAmber
class node_renderer,node_chat,node_context_bundle,node_messages toneMint
class node_gemini_runtime,node_assistant_ipc,node_gemini,node_ollama,node_prompts toneRose
class node_mobile toneIndigo
```

## Components

### Desktop shell

- [Application startup](https://github.com/shubhamshnd/open-cluely/blob/main/src/main-process/start-application.js): `src/main-process/start-application.js`
- [Stealth window](https://github.com/shubhamshnd/open-cluely/blob/main/src/main-process/features/window/window-controller.js): `src/main-process/features/window/window-controller.js`
- [Settings panel](https://github.com/shubhamshnd/open-cluely/blob/main/src/windows/assistant/renderer/features/settings/settings-panel-manager.js): `src/windows/assistant/renderer/features/settings/settings-panel-manager.js`
- [Persisted session state](https://github.com/shubhamshnd/open-cluely/blob/main/src/services/state/app-state.js): `src/services/state/app-state.js`

### Session capture

- [Transcription controls](https://github.com/shubhamshnd/open-cluely/blob/main/src/windows/assistant/renderer/features/transcription/transcription-manager.js): `src/windows/assistant/renderer/features/transcription/transcription-manager.js`
- [Audio capture pipeline](https://github.com/shubhamshnd/open-cluely/blob/main/src/windows/assistant/renderer/features/assembly-ai/audio-pipeline.js): `src/windows/assistant/renderer/features/assembly-ai/audio-pipeline.js`
- [Transcript buffering](https://github.com/shubhamshnd/open-cluely/blob/main/src/windows/assistant/renderer/features/assembly-ai/transcript-buffer.js): `src/windows/assistant/renderer/features/assembly-ai/transcript-buffer.js`
- [Streaming transcription service](https://github.com/shubhamshnd/open-cluely/blob/main/src/services/assembly-ai/service.js): `src/services/assembly-ai/service.js`
- **AssemblyAI**
- [Screenshot capture and retention](https://github.com/shubhamshnd/open-cluely/blob/main/src/main-process/features/assistant/screenshot-manager.js): `src/main-process/features/assistant/screenshot-manager.js`

### Chat and context

- [Assistant interface](https://github.com/shubhamshnd/open-cluely/blob/main/src/windows/assistant/renderer.js): `src/windows/assistant/renderer.js`
- [Chat and actions](https://github.com/shubhamshnd/open-cluely/blob/main/src/windows/assistant/renderer/features/chat/chat-ui-manager.js): `src/windows/assistant/renderer/features/chat/chat-ui-manager.js`
- [AI context selection](https://github.com/shubhamshnd/open-cluely/blob/main/src/windows/assistant/renderer/features/ai-context/context-bundle.js): `src/windows/assistant/renderer/features/ai-context/context-bundle.js`
- [Message inclusion controls](https://github.com/shubhamshnd/open-cluely/blob/main/src/windows/assistant/renderer/features/ai-context/message-store.js): `src/windows/assistant/renderer/features/ai-context/message-store.js`

### AI services

- [AI provider runtime](https://github.com/shubhamshnd/open-cluely/blob/main/src/main-process/features/assistant/gemini-runtime.js): `src/main-process/features/assistant/gemini-runtime.js`
- [Assistant request handling](https://github.com/shubhamshnd/open-cluely/blob/main/src/main-process/features/assistant/ipc.js): `src/main-process/features/assistant/ipc.js`
- [Gemini service](https://github.com/shubhamshnd/open-cluely/blob/main/src/services/ai/gemini-service.js): `src/services/ai/gemini-service.js`
- [Ollama service](https://github.com/shubhamshnd/open-cluely/blob/main/src/services/ai/ollama-service.js): `src/services/ai/ollama-service.js`
- [AI action prompts](https://github.com/shubhamshnd/open-cluely/blob/main/src/services/ai/prompts.js): `src/services/ai/prompts.js`

### Mobile companion

- [Mobile chat server](https://github.com/shubhamshnd/open-cluely/blob/main/src/main-process/features/mobile-server/server.js): `src/main-process/features/mobile-server/server.js`

### Other components

- **Interviewer or host**
- **Phone browser**

## Connections

- Interviewer or host → Assistant interface: uses
- Application startup → Stealth window: creates (evidence: `src/main-process/start-application.js`)
- Application startup → Persisted session state: loads and saves (evidence: `src/main-process/start-application.js`)
- Application startup → Screenshot capture and retention: initializes (evidence: `src/main-process/start-application.js`)
- Application startup → AI provider runtime: initializes (evidence: `src/main-process/start-application.js`)
- Application startup → Assistant request handling: registers (evidence: `src/main-process/start-application.js`)
- Application startup → Streaming transcription service: initializes (evidence: `src/main-process/start-application.js`)
- Application startup → Mobile chat server: starts (evidence: `src/main-process/start-application.js`)
- Assistant interface → Chat and actions: uses (evidence: `src/windows/assistant/renderer.js`)
- Assistant interface → AI context selection: uses (evidence: `src/windows/assistant/renderer.js`)
- Assistant interface → Message inclusion controls: uses (evidence: `src/windows/assistant/renderer.js`)
- Assistant interface → Transcription controls: uses (evidence: `src/windows/assistant/renderer.js`)
- Assistant interface → Settings panel: uses (evidence: `src/windows/assistant/renderer.js`)
- Chat and actions → Message inclusion controls: records messages (evidence: `src/windows/assistant/renderer/features/chat/chat-ui-manager.js`)
- Interviewer or host → Transcription controls: starts and controls
- Transcription controls → Audio capture pipeline: controls capture (evidence: `src/windows/assistant/renderer/features/transcription/transcription-manager.js`)
- Audio capture pipeline → Streaming transcription service: streams audio
- Streaming transcription service → AssemblyAI: streams audio
- Streaming transcription service → Transcript buffering: emits transcript
- Interviewer or host → Screenshot capture and retention: requests capture
- Interviewer or host → Chat and actions: chooses AI action
- AI context selection → Message inclusion controls: selects context (evidence: `src/windows/assistant/renderer/features/ai-context/context-bundle.js`)
- Assistant request handling → AI provider runtime: dispatches requests
- Assistant request handling → Screenshot capture and retention: requests images
- AI provider runtime → Gemini service: selects provider (evidence: `src/main-process/features/assistant/gemini-runtime.js`)
- AI provider runtime → Ollama service: selects provider (evidence: `src/main-process/features/assistant/gemini-runtime.js`)
- Gemini service → AI action prompts: builds prompts (evidence: `src/services/ai/gemini-service.js`)
- Ollama service → AI action prompts: builds prompts (evidence: `src/services/ai/ollama-service.js`)
- Interviewer or host → Settings panel: configures app
- Settings panel → Persisted session state: saves settings
- Phone browser → Mobile chat server: opens chat
- Mobile chat server → AI provider runtime: requests AI responses (evidence: `src/main-process/features/mobile-server/server.js`)
- Mobile chat server → Screenshot capture and retention: reads screenshots (evidence: `src/main-process/features/mobile-server/server.js`)
