# tanishqaryan9/tech-buddy architecture

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

- Interactive diagram: https://gitdiagram.com/tanishqaryan9/tech-buddy
- Repository: https://github.com/tanishqaryan9/tech-buddy

## Overview

This is a desktop screen assistant with two user-facing modes: Action Mode turns typed or spoken commands into desktop actions, while Guide Mode captures the screen, asks Gemini for task instructions, and highlights returned coordinates. The main workflow is orchestrated in main.py; voice input and command execution, screen processing, configuration, and AI analysis are separate modules. The repository also contains a separate live-overlay implementation. Its relationship to the main application is not shown, and ui.py and claude/claude.py were not sampled.

Main entry points: [`main.py`](https://github.com/tanishqaryan9/tech-buddy/blob/main/main.py) (Mode orchestrator), [`claude/claude_Overlay.py`](https://github.com/tanishqaryan9/tech-buddy/blob/main/claude/claude_Overlay.py) (Overlay assistant), [`voice.py`](https://github.com/tanishqaryan9/tech-buddy/blob/main/voice.py) (Voice input), [`logic.py`](https://github.com/tanishqaryan9/tech-buddy/blob/main/logic.py) (Screen processing)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Assistant workflow"]
  node_assistant["Mode orchestrator<br/>[main.py]"]
end

subgraph group_interaction["Input and actions"]
  node_ui["Console UI<br/>[ui.py]"]
  node_voice["Voice input<br/>[voice.py]"]
  node_actions["Command executor<br/>[voice.py]"]
end

subgraph group_guide["Screen guidance"]
  node_screen["Screen processing<br/>[logic.py]"]
  node_config["API key config<br/>[logic.py]"]
  node_settings["Config file<br/>[logic.py]"]
  node_api["Screen analysis<br/>[api.py]"]
  node_screenshots["Screenshot files<br/>[main.py]"]
end

subgraph group_overlay["Overlay assistant"]
  node_overlay_assistant["Overlay assistant<br/>[claude_Overlay.py]"]
  node_overlay["Live highlight overlay<br/>[claude_Overlay.py]"]
end

node_user(("User"))
node_desktop["Desktop environment"]
node_gemini["Gemini API"]
node_overlay_gemini["Gemini API"]
node_speech_service["Google speech recognition"]

node_user -->|"selects mode"| node_assistant
node_assistant -->|"shows prompts"| node_ui
node_assistant -->|"requests speech"| node_voice
node_assistant -->|"dispatches command"| node_actions
node_assistant -->|"captures screen"| node_screen
node_assistant -->|"validates key"| node_config
node_assistant -->|"requests analysis"| node_api
node_assistant -->|"saves images"| node_screenshots
node_voice -->|"recognizes speech"| node_speech_service
node_actions -->|"controls desktop"| node_desktop
node_screen -->|"captures display"| node_desktop
node_config -->|"reads and writes"| node_settings
node_api -->|"analyzes image"| node_gemini
node_overlay_assistant -->|"shows highlights"| node_overlay
node_overlay_assistant -->|"sends analysis request"| node_overlay_gemini

click node_assistant "https://github.com/tanishqaryan9/tech-buddy/blob/main/main.py"
click node_ui "https://github.com/tanishqaryan9/tech-buddy/blob/main/ui.py"
click node_voice "https://github.com/tanishqaryan9/tech-buddy/blob/main/voice.py"
click node_actions "https://github.com/tanishqaryan9/tech-buddy/blob/main/voice.py"
click node_screen "https://github.com/tanishqaryan9/tech-buddy/blob/main/logic.py"
click node_config "https://github.com/tanishqaryan9/tech-buddy/blob/main/logic.py"
click node_settings "https://github.com/tanishqaryan9/tech-buddy/blob/main/logic.py"
click node_api "https://github.com/tanishqaryan9/tech-buddy/blob/main/api.py"
click node_screenshots "https://github.com/tanishqaryan9/tech-buddy/blob/main/main.py"
click node_overlay_assistant "https://github.com/tanishqaryan9/tech-buddy/blob/main/claude/claude_Overlay.py"
click node_overlay "https://github.com/tanishqaryan9/tech-buddy/blob/main/claude/claude_Overlay.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_assistant,node_user toneBlue
class node_ui,node_voice,node_actions toneAmber
class node_screen,node_config,node_settings,node_api,node_screenshots,node_gemini,node_overlay_gemini toneMint
class node_overlay_assistant,node_overlay toneRose
class node_desktop,node_speech_service toneIndigo
```

## Components

### Assistant workflow

- [Mode orchestrator](https://github.com/tanishqaryan9/tech-buddy/blob/main/main.py): `main.py`

### Input and actions

- [Console UI](https://github.com/tanishqaryan9/tech-buddy/blob/main/ui.py): `ui.py`
- [Voice input](https://github.com/tanishqaryan9/tech-buddy/blob/main/voice.py): `voice.py`
- [Command executor](https://github.com/tanishqaryan9/tech-buddy/blob/main/voice.py): `voice.py`

### Screen guidance

- [Screen processing](https://github.com/tanishqaryan9/tech-buddy/blob/main/logic.py): `logic.py`
- [API key config](https://github.com/tanishqaryan9/tech-buddy/blob/main/logic.py): `logic.py`
- [Config file](https://github.com/tanishqaryan9/tech-buddy/blob/main/logic.py): `logic.py`
- [Screen analysis](https://github.com/tanishqaryan9/tech-buddy/blob/main/api.py): `api.py`
- [Screenshot files](https://github.com/tanishqaryan9/tech-buddy/blob/main/main.py): `main.py`

### Overlay assistant

- [Overlay assistant](https://github.com/tanishqaryan9/tech-buddy/blob/main/claude/claude_Overlay.py): `claude/claude_Overlay.py`
- [Live highlight overlay](https://github.com/tanishqaryan9/tech-buddy/blob/main/claude/claude_Overlay.py): `claude/claude_Overlay.py`

### Other components

- **User**
- **Desktop environment**
- **Gemini API**
- **Gemini API**
- **Google speech recognition**

## Connections

- User → Mode orchestrator: selects mode (evidence: `main.py`)
- Mode orchestrator → Console UI: shows prompts (evidence: `main.py`)
- Mode orchestrator → Voice input: requests speech (evidence: `main.py`)
- Mode orchestrator → Command executor: dispatches command (evidence: `main.py`)
- Mode orchestrator → Screen processing: captures screen (evidence: `main.py`)
- Mode orchestrator → API key config: validates key (evidence: `main.py`)
- Mode orchestrator → Screen analysis: requests analysis (evidence: `main.py`)
- Mode orchestrator → Screenshot files: saves images (evidence: `main.py`)
- Voice input → Google speech recognition: recognizes speech (evidence: `voice.py`)
- Command executor → Desktop environment: controls desktop (evidence: `voice.py`)
- Screen processing → Desktop environment: captures display (evidence: `logic.py`)
- API key config → Config file: reads and writes (evidence: `logic.py`)
- Screen analysis → Gemini API: analyzes image (evidence: `api.py`)
- Overlay assistant → Live highlight overlay: shows highlights (evidence: `claude/claude_Overlay.py`)
- Overlay assistant → Gemini API: sends analysis request (evidence: `claude/claude_Overlay.py`)
