# samyak17jain/donnafinal architecture

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

- Interactive diagram: https://gitdiagram.com/samyak17jain/donnafinal
- Repository: https://github.com/samyak17jain/donnafinal

## Overview

Donna is an Electron desktop copilot that captures microphone and system audio, transcribes conversation, combines the rolling transcript with screen and personal context, and streams tailored assistance into a discreet overlay. The graph preserves both cloud and local transcription, profile/interview preparation, meeting notes, and the overlay’s privacy features. README architecture and feature descriptions support the main product flows; source excerpts confirm selected module responsibilities, but several renderer-to-main and storage interactions were not shown, so those links are omitted or marked unverified.

Main entry points: [`main.js`](https://github.com/samyak17jain/donnafinal/blob/main/main.js) (Electron coordinator), [`src/llm.js`](https://github.com/samyak17jain/donnafinal/blob/main/src/llm.js) (Streaming LLM), [`src/vad.js`](https://github.com/samyak17jain/donnafinal/blob/main/src/vad.js) (Adaptive VAD), [`renderer/renderer.js`](https://github.com/samyak17jain/donnafinal/blob/main/renderer/renderer.js) (Copilot interface)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_audio["Audio and transcription"]
  node_mic(("Microphone audio"))
  node_systemaudio(("System audio"))
  node_vad["Adaptive VAD<br/>[vad.js]"]
  node_segmenter["Utterance segmenter"]
  node_streamstt["Streaming STT<br/>[stt-streaming.js]"]
  node_cloudstt["Cloud STT<br/>[stt.js]"]
  node_wav["PCM and WAV<br/>[wav.js]"]
  node_localtranscriber["Local transcriber"]
  node_modelcatalog["Whisper model catalog"]
  node_modelmanager["Whisper model manager"]
  node_runtime["Whisper runtime<br/>[whisper-runtime.js]"]
  node_session["Whisper server session"]
  node_transcript["Live transcript<br/>[main.js]"]
end

subgraph group_context["Context and preparation"]
  node_screen["Screen capture<br/>[screen.js]"]
  node_interview["Interview context"]
  node_profile["Profile context<br/>[profile-context.js]"]
  node_documents["Resume parsing<br/>[resume.js]"]
end

subgraph group_copilot["Assistance and providers"]
  node_prompts["Mode prompts<br/>[prompts.js]"]
  node_llm["Streaming LLM<br/>[llm.js]"]
  node_compatible["Compatible endpoints"]
  node_providers(("LLM providers"))
end

subgraph group_desktop["Desktop experience and records"]
  node_renderer["Copilot interface<br/>[renderer.js]"]
  node_main["Electron coordinator<br/>[main.js]"]
  node_meetings["Meeting history<br/>[meetings.js]"]
  node_notes["Meeting notes<br/>[notes.js]"]
  node_store[("Local settings store<br/>[store.js]")]
  node_contentprotection["OS content protection"]
end

node_person(("User"))

node_person -->|"uses"| node_renderer
node_mic -->|"captures speech"| node_vad
node_systemaudio -->|"captures speech"| node_vad
node_vad -->|"segments audio"| node_streamstt
node_vad -.->|"segments audio"| node_localtranscriber
node_streamstt -->|"produces transcript"| node_transcript
node_cloudstt -->|"produces transcript"| node_transcript
node_localtranscriber -->|"produces transcript"| node_transcript
node_segmenter -->|"uses detection"| node_vad
node_streamstt -->|"uses audio format"| node_wav
node_cloudstt -->|"encodes audio"| node_wav
node_localtranscriber -->|"uses session"| node_session
node_session -->|"encodes audio"| node_wav
node_modelmanager -->|"loads catalog"| node_modelcatalog
node_main -->|"manages models"| node_modelmanager
node_main -->|"starts local runtime"| node_runtime
node_runtime -.->|"starts server"| node_session
node_renderer -.->|"requests assistance"| node_main
node_main -->|"captures screen"| node_screen
node_transcript -->|"classifies questions"| node_interview
node_profile -->|"grounds answers"| node_interview
node_documents -.->|"supplies background"| node_profile
node_interview -->|"provides context"| node_prompts
node_prompts -->|"builds request"| node_llm
node_screen -->|"provides image"| node_llm
node_llm -->|"streams to"| node_providers
node_llm -->|"uses adapter"| node_compatible
node_llm -->|"streams response"| node_renderer
node_main -->|"selects mode"| node_prompts
node_main -->|"creates client"| node_llm
node_renderer -.->|"views history"| node_meetings
node_meetings -.->|"summarizes meetings"| node_notes
node_main -->|"uses settings"| node_store
node_main -->|"protects overlay"| node_contentprotection

click node_renderer "https://github.com/samyak17jain/donnafinal/blob/main/renderer/renderer.js"
click node_main "https://github.com/samyak17jain/donnafinal/blob/main/main.js"
click node_vad "https://github.com/samyak17jain/donnafinal/blob/main/src/vad.js"
click node_segmenter "https://github.com/samyak17jain/donnafinal/blob/main/src/utterance-segmenter.js"
click node_streamstt "https://github.com/samyak17jain/donnafinal/blob/main/src/stt-streaming.js"
click node_cloudstt "https://github.com/samyak17jain/donnafinal/blob/main/src/stt.js"
click node_wav "https://github.com/samyak17jain/donnafinal/blob/main/src/wav.js"
click node_localtranscriber "https://github.com/samyak17jain/donnafinal/blob/main/src/local-whisper-transcriber.js"
click node_modelcatalog "https://github.com/samyak17jain/donnafinal/blob/main/src/whisper-model-catalog.js"
click node_modelmanager "https://github.com/samyak17jain/donnafinal/blob/main/src/whisper-model-manager.js"
click node_runtime "https://github.com/samyak17jain/donnafinal/blob/main/src/whisper-runtime.js"
click node_session "https://github.com/samyak17jain/donnafinal/blob/main/src/whisper-server-session.js"
click node_transcript "https://github.com/samyak17jain/donnafinal/blob/main/main.js"
click node_screen "https://github.com/samyak17jain/donnafinal/blob/main/src/screen.js"
click node_interview "https://github.com/samyak17jain/donnafinal/blob/main/src/interview-context.js"
click node_profile "https://github.com/samyak17jain/donnafinal/blob/main/src/profile-context.js"
click node_prompts "https://github.com/samyak17jain/donnafinal/blob/main/src/prompts.js"
click node_llm "https://github.com/samyak17jain/donnafinal/blob/main/src/llm.js"
click node_compatible "https://github.com/samyak17jain/donnafinal/blob/main/src/openai-compatible.js"
click node_documents "https://github.com/samyak17jain/donnafinal/blob/main/src/resume.js"
click node_meetings "https://github.com/samyak17jain/donnafinal/blob/main/src/meetings.js"
click node_notes "https://github.com/samyak17jain/donnafinal/blob/main/src/notes.js"
click node_store "https://github.com/samyak17jain/donnafinal/blob/main/src/store.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_mic,node_systemaudio,node_vad,node_segmenter,node_streamstt,node_cloudstt,node_wav,node_localtranscriber,node_modelcatalog,node_modelmanager,node_runtime,node_session,node_transcript,node_person toneBlue
class node_screen,node_interview,node_profile,node_documents toneAmber
class node_prompts,node_llm,node_compatible,node_providers toneMint
class node_renderer,node_main,node_meetings,node_notes,node_store,node_contentprotection toneRose
```

## Components

### Audio and transcription

- **Microphone audio**
- **System audio**
- [Adaptive VAD](https://github.com/samyak17jain/donnafinal/blob/main/src/vad.js): `src/vad.js`
- [Utterance segmenter](https://github.com/samyak17jain/donnafinal/blob/main/src/utterance-segmenter.js): `src/utterance-segmenter.js`
- [Streaming STT](https://github.com/samyak17jain/donnafinal/blob/main/src/stt-streaming.js): `src/stt-streaming.js`
- [Cloud STT](https://github.com/samyak17jain/donnafinal/blob/main/src/stt.js): `src/stt.js`
- [PCM and WAV](https://github.com/samyak17jain/donnafinal/blob/main/src/wav.js): `src/wav.js`
- [Local transcriber](https://github.com/samyak17jain/donnafinal/blob/main/src/local-whisper-transcriber.js): `src/local-whisper-transcriber.js`
- [Whisper model catalog](https://github.com/samyak17jain/donnafinal/blob/main/src/whisper-model-catalog.js): `src/whisper-model-catalog.js`
- [Whisper model manager](https://github.com/samyak17jain/donnafinal/blob/main/src/whisper-model-manager.js): `src/whisper-model-manager.js`
- [Whisper runtime](https://github.com/samyak17jain/donnafinal/blob/main/src/whisper-runtime.js): `src/whisper-runtime.js`
- [Whisper server session](https://github.com/samyak17jain/donnafinal/blob/main/src/whisper-server-session.js): `src/whisper-server-session.js`
- [Live transcript](https://github.com/samyak17jain/donnafinal/blob/main/main.js): `main.js`

### Context and preparation

- [Screen capture](https://github.com/samyak17jain/donnafinal/blob/main/src/screen.js): `src/screen.js`
- [Interview context](https://github.com/samyak17jain/donnafinal/blob/main/src/interview-context.js): `src/interview-context.js`
- [Profile context](https://github.com/samyak17jain/donnafinal/blob/main/src/profile-context.js): `src/profile-context.js`
- [Resume parsing](https://github.com/samyak17jain/donnafinal/blob/main/src/resume.js): `src/resume.js`

### Assistance and providers

- [Mode prompts](https://github.com/samyak17jain/donnafinal/blob/main/src/prompts.js): `src/prompts.js`
- [Streaming LLM](https://github.com/samyak17jain/donnafinal/blob/main/src/llm.js): `src/llm.js`
- [Compatible endpoints](https://github.com/samyak17jain/donnafinal/blob/main/src/openai-compatible.js): `src/openai-compatible.js`
- **LLM providers**

### Desktop experience and records

- [Copilot interface](https://github.com/samyak17jain/donnafinal/blob/main/renderer/renderer.js): `renderer/renderer.js`
- [Electron coordinator](https://github.com/samyak17jain/donnafinal/blob/main/main.js): `main.js`
- [Meeting history](https://github.com/samyak17jain/donnafinal/blob/main/src/meetings.js): `src/meetings.js`
- [Meeting notes](https://github.com/samyak17jain/donnafinal/blob/main/src/notes.js): `src/notes.js`
- [Local settings store](https://github.com/samyak17jain/donnafinal/blob/main/src/store.js): `src/store.js`
- **OS content protection**

### Other components

- **User**

## Connections

- User → Copilot interface: uses (evidence: `README.md`)
- Microphone audio → Adaptive VAD: captures speech (evidence: `README.md`)
- System audio → Adaptive VAD: captures speech (evidence: `README.md`)
- Adaptive VAD → Streaming STT: segments audio (evidence: `README.md`)
- Adaptive VAD → Local transcriber: segments audio
- Streaming STT → Live transcript: produces transcript (evidence: `README.md`)
- Cloud STT → Live transcript: produces transcript (evidence: `README.md`)
- Local transcriber → Live transcript: produces transcript (evidence: `README.md`)
- Utterance segmenter → Adaptive VAD: uses detection (evidence: `src/utterance-segmenter.js`)
- Streaming STT → PCM and WAV: uses audio format (evidence: `src/stt-streaming.js`)
- Cloud STT → PCM and WAV: encodes audio (evidence: `src/stt.js`)
- Local transcriber → Whisper server session: uses session (evidence: `src/local-whisper-transcriber.js`)
- Whisper server session → PCM and WAV: encodes audio (evidence: `src/whisper-server-session.js`)
- Whisper model manager → Whisper model catalog: loads catalog (evidence: `src/whisper-model-manager.js`)
- Electron coordinator → Whisper model manager: manages models (evidence: `main.js`)
- Electron coordinator → Whisper runtime: starts local runtime (evidence: `main.js`)
- Whisper runtime → Whisper server session: starts server
- Copilot interface → Electron coordinator: requests assistance
- Electron coordinator → Screen capture: captures screen (evidence: `README.md`)
- Live transcript → Interview context: classifies questions (evidence: `README.md`)
- Profile context → Interview context: grounds answers (evidence: `README.md`)
- Resume parsing → Profile context: supplies background
- Interview context → Mode prompts: provides context (evidence: `README.md`)
- Mode prompts → Streaming LLM: builds request (evidence: `README.md`)
- Screen capture → Streaming LLM: provides image (evidence: `README.md`)
- Streaming LLM → LLM providers: streams to (evidence: `README.md`)
- Streaming LLM → Compatible endpoints: uses adapter (evidence: `src/llm.js`)
- Streaming LLM → Copilot interface: streams response (evidence: `README.md`)
- Electron coordinator → Mode prompts: selects mode (evidence: `main.js`)
- Electron coordinator → Streaming LLM: creates client (evidence: `main.js`)
- Copilot interface → Meeting history: views history
- Meeting history → Meeting notes: summarizes meetings
- Electron coordinator → Local settings store: uses settings (evidence: `main.js`)
- Electron coordinator → OS content protection: protects overlay (evidence: `README.md`)
