# jeevanjames2000/native-ai-cluely-assistant architecture

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

- Interactive diagram: https://gitdiagram.com/jeevanjames2000/native-ai-cluely-assistant
- Repository: https://github.com/jeevanjames2000/native-ai-cluely-assistant

## Overview

Native AI Assistant is an Electron desktop copilot for live conversations and screen-based questions. Its main workflow captures microphone/system audio or screen content, transcribes or extracts context, retrieves relevant local knowledge, generates an answer, and presents it in an overlay; meeting summaries and diagrams are additional product outcomes. The graph also shows the RAG embedding/retrieval layer and local persistence. README-documented links are cited to README.md; source-index links are cited only where the index names the relationship. Unsampled wiring is not inferred.

Main entry points: [`electron/IntelligenceManager.ts`](https://github.com/jeevanjames2000/native-ai-cluely-assistant/blob/main/electron/IntelligenceManager.ts) (Conversation intelligence), [`electron/rag/RAGManager.ts`](https://github.com/jeevanjames2000/native-ai-cluely-assistant/blob/main/electron/rag/RAGManager.ts) (RAG orchestration), [`electron/llm/ProviderRouter.ts`](https://github.com/jeevanjames2000/native-ai-cluely-assistant/blob/main/electron/llm/ProviderRouter.ts) (LLM gateway), [`electron/audio/MicrophoneCapture.ts`](https://github.com/jeevanjames2000/native-ai-cluely-assistant/blob/main/electron/audio/MicrophoneCapture.ts) (Audio capture)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_capture["Capture and transcription"]
  node_audio["Audio capture"]
  node_native["Native audio<br/>[lib.rs]"]
  node_stt["Speech recognition<br/>[AppleSpeechSTT.ts]"]
  node_screen["Screen capture"]
  node_ocr["Screen intelligence"]
end

subgraph group_intelligence["Context and answers"]
  node_intelligence["Conversation intelligence"]
  node_fusion["Context fusion"]
  node_bridge["Answer orchestration<br/>[engine-bridge.ts]"]
  node_llm["LLM gateway<br/>[ProviderRouter.ts]"]
end

subgraph group_knowledge["Knowledge and persistence"]
  node_rag["RAG orchestration<br/>[RAGManager.ts]"]
  node_embed["Embedding pipeline"]
  node_vector[("Vector store<br/>[VectorStore.ts]")]
  node_db[("Local database<br/>[DatabaseManager.ts]")]
end

subgraph group_desktop["Desktop experience"]
  node_manager["App orchestration<br/>[main.ts]"]
  node_renderer["Desktop UI<br/>[App.tsx]"]
  node_overlay["Assistant overlay<br/>[App.tsx]"]
end

subgraph group_outcomes["Meeting and visual outputs"]
  node_meeting["Meeting intelligence"]
  node_diagram["Diagram answers"]
end

node_user(("User"))
node_providers{{"AI providers"}}
node_meeting_notes["Meeting notes"]

node_user -->|"provides audio"| node_audio
node_audio -->|"uses native capture"| node_native
node_audio -->|"feeds transcription"| node_stt
node_user -->|"requests capture"| node_screen
node_screen -->|"supplies screen context"| node_ocr
node_stt -->|"transcript stream"| node_intelligence
node_ocr -->|"visual context"| node_intelligence
node_manager -->|"coordinates"| node_intelligence
node_intelligence -.->|"assembles context"| node_fusion
node_fusion -.->|"prepares prompt context"| node_bridge
node_bridge -->|"routes answer request"| node_llm
node_intelligence -.->|"uses retrieval"| node_rag
node_rag -->|"initializes embeddings"| node_embed
node_rag -->|"streams response"| node_llm
node_embed -->|"stores vectors"| node_vector
node_rag -->|"reads meeting data"| node_db
node_llm -.->|"dispatches inference"| node_providers
node_llm -->|"streams response"| node_overlay
node_renderer -->|"renders"| node_overlay
node_manager -->|"serves desktop UI"| node_renderer
node_intelligence -->|"supports meeting summaries"| node_meeting
node_meeting -->|"produces notes"| node_meeting_notes
node_intelligence -->|"generates visual answers"| node_diagram
node_rag -.->|"retrieves evidence"| node_vector
node_db -->|"persists locally"| node_meeting_notes

click node_audio "https://github.com/jeevanjames2000/native-ai-cluely-assistant/blob/main/electron/audio/MicrophoneCapture.ts"
click node_native "https://github.com/jeevanjames2000/native-ai-cluely-assistant/blob/main/native-module/src/lib.rs"
click node_stt "https://github.com/jeevanjames2000/native-ai-cluely-assistant/blob/main/electron/audio/AppleSpeechSTT.ts"
click node_screen "https://github.com/jeevanjames2000/native-ai-cluely-assistant/blob/main/electron/ScreenshotHelper.ts"
click node_ocr "https://github.com/jeevanjames2000/native-ai-cluely-assistant/blob/main/electron/services/screen/ScreenContextService.ts"
click node_manager "https://github.com/jeevanjames2000/native-ai-cluely-assistant/blob/main/electron/main.ts"
click node_intelligence "https://github.com/jeevanjames2000/native-ai-cluely-assistant/blob/main/electron/IntelligenceManager.ts"
click node_fusion "https://github.com/jeevanjames2000/native-ai-cluely-assistant/blob/main/electron/intelligence/ContextFusionEngine.ts"
click node_bridge "https://github.com/jeevanjames2000/native-ai-cluely-assistant/blob/main/electron/context-intelligence/orchestration/engine-bridge.ts"
click node_llm "https://github.com/jeevanjames2000/native-ai-cluely-assistant/blob/main/electron/llm/ProviderRouter.ts"
click node_rag "https://github.com/jeevanjames2000/native-ai-cluely-assistant/blob/main/electron/rag/RAGManager.ts"
click node_embed "https://github.com/jeevanjames2000/native-ai-cluely-assistant/blob/main/electron/rag/EmbeddingPipeline.ts"
click node_vector "https://github.com/jeevanjames2000/native-ai-cluely-assistant/blob/main/electron/rag/VectorStore.ts"
click node_db "https://github.com/jeevanjames2000/native-ai-cluely-assistant/blob/main/electron/db/DatabaseManager.ts"
click node_renderer "https://github.com/jeevanjames2000/native-ai-cluely-assistant/blob/main/src/App.tsx"
click node_overlay "https://github.com/jeevanjames2000/native-ai-cluely-assistant/blob/main/src/App.tsx"
click node_meeting "https://github.com/jeevanjames2000/native-ai-cluely-assistant/blob/main/electron/services/meeting/MeetingSummaryV3.ts"
click node_diagram "https://github.com/jeevanjames2000/native-ai-cluely-assistant/blob/main/electron/intelligence/DiagramIntelligenceService.ts"

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_audio,node_native,node_stt,node_screen,node_ocr,node_user toneBlue
class node_intelligence,node_fusion,node_bridge,node_llm toneAmber
class node_rag,node_embed,node_vector,node_db toneMint
class node_manager,node_renderer,node_overlay toneRose
class node_meeting,node_diagram,node_providers,node_meeting_notes toneIndigo
```

## Components

### Capture and transcription

- [Audio capture](https://github.com/jeevanjames2000/native-ai-cluely-assistant/blob/main/electron/audio/MicrophoneCapture.ts): `electron/audio/MicrophoneCapture.ts`
- [Native audio](https://github.com/jeevanjames2000/native-ai-cluely-assistant/blob/main/native-module/src/lib.rs): `native-module/src/lib.rs`
- [Speech recognition](https://github.com/jeevanjames2000/native-ai-cluely-assistant/blob/main/electron/audio/AppleSpeechSTT.ts): `electron/audio/AppleSpeechSTT.ts`
- [Screen capture](https://github.com/jeevanjames2000/native-ai-cluely-assistant/blob/main/electron/ScreenshotHelper.ts): `electron/ScreenshotHelper.ts`
- [Screen intelligence](https://github.com/jeevanjames2000/native-ai-cluely-assistant/blob/main/electron/services/screen/ScreenContextService.ts): `electron/services/screen/ScreenContextService.ts`

### Context and answers

- [Conversation intelligence](https://github.com/jeevanjames2000/native-ai-cluely-assistant/blob/main/electron/IntelligenceManager.ts): `electron/IntelligenceManager.ts`
- [Context fusion](https://github.com/jeevanjames2000/native-ai-cluely-assistant/blob/main/electron/intelligence/ContextFusionEngine.ts): `electron/intelligence/ContextFusionEngine.ts`
- [Answer orchestration](https://github.com/jeevanjames2000/native-ai-cluely-assistant/blob/main/electron/context-intelligence/orchestration/engine-bridge.ts): `electron/context-intelligence/orchestration/engine-bridge.ts`
- [LLM gateway](https://github.com/jeevanjames2000/native-ai-cluely-assistant/blob/main/electron/llm/ProviderRouter.ts): `electron/llm/ProviderRouter.ts`

### Knowledge and persistence

- [RAG orchestration](https://github.com/jeevanjames2000/native-ai-cluely-assistant/blob/main/electron/rag/RAGManager.ts): `electron/rag/RAGManager.ts`
- [Embedding pipeline](https://github.com/jeevanjames2000/native-ai-cluely-assistant/blob/main/electron/rag/EmbeddingPipeline.ts): `electron/rag/EmbeddingPipeline.ts`
- [Vector store](https://github.com/jeevanjames2000/native-ai-cluely-assistant/blob/main/electron/rag/VectorStore.ts): `electron/rag/VectorStore.ts`
- [Local database](https://github.com/jeevanjames2000/native-ai-cluely-assistant/blob/main/electron/db/DatabaseManager.ts): `electron/db/DatabaseManager.ts`

### Desktop experience

- [App orchestration](https://github.com/jeevanjames2000/native-ai-cluely-assistant/blob/main/electron/main.ts): `electron/main.ts`
- [Desktop UI](https://github.com/jeevanjames2000/native-ai-cluely-assistant/blob/main/src/App.tsx): `src/App.tsx`
- [Assistant overlay](https://github.com/jeevanjames2000/native-ai-cluely-assistant/blob/main/src/App.tsx): `src/App.tsx`

### Meeting and visual outputs

- [Meeting intelligence](https://github.com/jeevanjames2000/native-ai-cluely-assistant/blob/main/electron/services/meeting/MeetingSummaryV3.ts): `electron/services/meeting/MeetingSummaryV3.ts`
- [Diagram answers](https://github.com/jeevanjames2000/native-ai-cluely-assistant/blob/main/electron/intelligence/DiagramIntelligenceService.ts): `electron/intelligence/DiagramIntelligenceService.ts`

### Other components

- **User**
- **AI providers**
- **Meeting notes**

## Connections

- User → Audio capture: provides audio (evidence: `README.md`)
- Audio capture → Native audio: uses native capture (evidence: `README.md`)
- Audio capture → Speech recognition: feeds transcription (evidence: `README.md`)
- User → Screen capture: requests capture (evidence: `README.md`)
- Screen capture → Screen intelligence: supplies screen context (evidence: `README.md`)
- Speech recognition → Conversation intelligence: transcript stream (evidence: `README.md`)
- Screen intelligence → Conversation intelligence: visual context (evidence: `README.md`)
- App orchestration → Conversation intelligence: coordinates (evidence: `electron/main.ts`)
- Conversation intelligence → Context fusion: assembles context
- Context fusion → Answer orchestration: prepares prompt context
- Answer orchestration → LLM gateway: routes answer request (evidence: `electron/context-intelligence/orchestration/engine-bridge.ts`)
- Conversation intelligence → RAG orchestration: uses retrieval
- RAG orchestration → Embedding pipeline: initializes embeddings (evidence: `electron/rag/RAGManager.ts`)
- RAG orchestration → LLM gateway: streams response (evidence: `electron/rag/RAGManager.ts`)
- Embedding pipeline → Vector store: stores vectors (evidence: `electron/rag/EmbeddingPipeline.ts`)
- RAG orchestration → Local database: reads meeting data (evidence: `electron/rag/RAGManager.ts`)
- LLM gateway → AI providers: dispatches inference
- LLM gateway → Assistant overlay: streams response (evidence: `README.md`)
- Desktop UI → Assistant overlay: renders (evidence: `src/App.tsx`)
- App orchestration → Desktop UI: serves desktop UI (evidence: `README.md`)
- Conversation intelligence → Meeting intelligence: supports meeting summaries (evidence: `README.md`)
- Meeting intelligence → Meeting notes: produces notes (evidence: `README.md`)
- Conversation intelligence → Diagram answers: generates visual answers (evidence: `README.md`)
- RAG orchestration → Vector store: retrieves evidence (evidence: `electron/rag/RAGManager.ts`)
- Local database → Meeting notes: persists locally (evidence: `README.md`)
