# arhaansethi-1/orbitdesk architecture

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

- Interactive diagram: https://gitdiagram.com/arhaansethi-1/orbitdesk
- Repository: https://github.com/arhaansethi-1/orbitdesk

## Overview

OrbitDesk is a Windows desktop assistant whose main workflow is user input through the Tkinter app or wake-word microphone, command handling by the brain, then a spoken or displayed response or a requested desktop/web action. Its distinct capabilities include local-model conversation, speech recognition and synthesis, browser/search and desktop automation, and a prototype security policy. The sampled source and README support the main integrations; several command internals were not excerpted, so capability links rely on README documentation.

Main entry points: [`brain.py`](https://github.com/arhaansethi-1/orbitdesk/blob/main/brain.py) (Command routing), [`main.py`](https://github.com/arhaansethi-1/orbitdesk/blob/main/main.py) (GUI and tray), [`speech_output.py`](https://github.com/arhaansethi-1/orbitdesk/blob/main/speech_output.py) (Spoken responses), [`speech.py`](https://github.com/arhaansethi-1/orbitdesk/blob/main/speech.py) (Wake-word recognition)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["Desktop interface"]
  node_gui["GUI and tray<br/>[main.py]"]
  node_orb["Animated orb<br/>[orb.py]"]
end

subgraph group_conversation["Conversation and policy"]
  node_brain["Command routing<br/>[brain.py]"]
  node_localai["Local AI conversation<br/>[brain.py]"]
  node_policy["Security policy<br/>[safeguards.py]"]
end

subgraph group_voice["Voice interaction"]
  node_recognition["Wake-word recognition<br/>[speech.py]"]
  node_speechout["Spoken responses<br/>[speech_output.py]"]
end

subgraph group_actions["Assistant actions"]
  node_utilities["Time and arithmetic<br/>[brain.py]"]
  node_webactions["Search and websites<br/>[brain.py]"]
  node_automation["Desktop automation<br/>[brain.py]"]
  node_timersnotes["Timers and notes<br/>[brain.py]"]
end

node_user(("User"))
node_microphone["Microphone"]
node_desktop["Windows desktop"]
node_ollama["Ollama model"]
node_web["Web services"]
node_tts["Edge TTS"]

node_user -->|"types commands"| node_gui
node_microphone -->|"provides audio"| node_recognition
node_recognition -->|"returns command"| node_gui
node_gui -->|"dispatches commands"| node_brain
node_gui -->|"updates display"| node_orb
node_brain -->|"requests response"| node_localai
node_localai -->|"sends inference request"| node_ollama
node_brain -->|"checks actions"| node_policy
node_brain -->|"handles requests"| node_utilities
node_brain -->|"handles requests"| node_webactions
node_webactions -->|"searches web"| node_web
node_brain -->|"handles requests"| node_automation
node_automation -->|"opens apps and folders"| node_desktop
node_brain -->|"handles requests"| node_timersnotes
node_gui -->|"speaks responses"| node_speechout
node_speechout -->|"generates speech"| node_tts
node_speechout -->|"plays response"| node_user

click node_gui "https://github.com/arhaansethi-1/orbitdesk/blob/main/main.py"
click node_orb "https://github.com/arhaansethi-1/orbitdesk/blob/main/orb.py"
click node_brain "https://github.com/arhaansethi-1/orbitdesk/blob/main/brain.py"
click node_localai "https://github.com/arhaansethi-1/orbitdesk/blob/main/brain.py"
click node_policy "https://github.com/arhaansethi-1/orbitdesk/blob/main/safeguards.py"
click node_recognition "https://github.com/arhaansethi-1/orbitdesk/blob/main/speech.py"
click node_speechout "https://github.com/arhaansethi-1/orbitdesk/blob/main/speech_output.py"
click node_utilities "https://github.com/arhaansethi-1/orbitdesk/blob/main/brain.py"
click node_webactions "https://github.com/arhaansethi-1/orbitdesk/blob/main/brain.py"
click node_automation "https://github.com/arhaansethi-1/orbitdesk/blob/main/brain.py"
click node_timersnotes "https://github.com/arhaansethi-1/orbitdesk/blob/main/brain.py"

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_gui,node_orb,node_user toneBlue
class node_brain,node_localai,node_policy toneAmber
class node_recognition,node_speechout toneMint
class node_utilities,node_webactions,node_automation,node_timersnotes toneRose
class node_microphone,node_desktop,node_ollama,node_web,node_tts toneIndigo
```

## Components

### Desktop interface

- [GUI and tray](https://github.com/arhaansethi-1/orbitdesk/blob/main/main.py): `main.py`
- [Animated orb](https://github.com/arhaansethi-1/orbitdesk/blob/main/orb.py): `orb.py`

### Conversation and policy

- [Command routing](https://github.com/arhaansethi-1/orbitdesk/blob/main/brain.py): `brain.py`
- [Local AI conversation](https://github.com/arhaansethi-1/orbitdesk/blob/main/brain.py): `brain.py`
- [Security policy](https://github.com/arhaansethi-1/orbitdesk/blob/main/safeguards.py): `safeguards.py`

### Voice interaction

- [Wake-word recognition](https://github.com/arhaansethi-1/orbitdesk/blob/main/speech.py): `speech.py`
- [Spoken responses](https://github.com/arhaansethi-1/orbitdesk/blob/main/speech_output.py): `speech_output.py`

### Assistant actions

- [Time and arithmetic](https://github.com/arhaansethi-1/orbitdesk/blob/main/brain.py): `brain.py`
- [Search and websites](https://github.com/arhaansethi-1/orbitdesk/blob/main/brain.py): `brain.py`
- [Desktop automation](https://github.com/arhaansethi-1/orbitdesk/blob/main/brain.py): `brain.py`
- [Timers and notes](https://github.com/arhaansethi-1/orbitdesk/blob/main/brain.py): `brain.py`

### Other components

- **User**
- **Microphone**
- **Windows desktop**
- **Ollama model**
- **Web services**
- **Edge TTS**

## Connections

- User → GUI and tray: types commands (evidence: `README.md`)
- Microphone → Wake-word recognition: provides audio (evidence: `speech.py`)
- Wake-word recognition → GUI and tray: returns command (evidence: `main.py`)
- GUI and tray → Command routing: dispatches commands (evidence: `main.py`)
- GUI and tray → Animated orb: updates display (evidence: `main.py`)
- Command routing → Local AI conversation: requests response (evidence: `brain.py`)
- Local AI conversation → Ollama model: sends inference request (evidence: `README.md`)
- Command routing → Security policy: checks actions (evidence: `brain.py`)
- Command routing → Time and arithmetic: handles requests (evidence: `README.md`)
- Command routing → Search and websites: handles requests (evidence: `README.md`)
- Search and websites → Web services: searches web (evidence: `README.md`)
- Command routing → Desktop automation: handles requests (evidence: `README.md`)
- Desktop automation → Windows desktop: opens apps and folders (evidence: `README.md`)
- Command routing → Timers and notes: handles requests (evidence: `brain.py`)
- GUI and tray → Spoken responses: speaks responses (evidence: `main.py`)
- Spoken responses → Edge TTS: generates speech (evidence: `speech_output.py`)
- Spoken responses → User: plays response (evidence: `speech_output.py`)
