# arjatala/jarvis-prototype architecture

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

- Interactive diagram: https://gitdiagram.com/arjatala/jarvis-prototype
- Repository: https://github.com/arjatala/jarvis-prototype

## Overview

J.A.R.V.I.S. is a Windows desktop voice assistant for local system control, online tasks, and conversational responses. Its principal workflow captures speech, recognizes a command, routes it to an action, then presents the result in the HUD and through speech. The repository also contains a separate Flask voice endpoint using Whisper and a local Ollama model. The README describes Gemini capabilities, but the sampled app.py excerpt does not show their implementation; those links are therefore marked unverified.

Main entry points: [`app.py`](https://github.com/arjatala/jarvis-prototype/blob/main/app.py) (Command Router), [`server.py`](https://github.com/arjatala/jarvis-prototype/blob/main/server.py) (Alternate Flask Server), [`index.html`](https://github.com/arjatala/jarvis-prototype/blob/main/index.html) (Cyberpunk HUD)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_desktop["Desktop Assistant"]
  node_app["Desktop Core<br/>[app.py]"]
  node_hud["Cyberpunk HUD<br/>[index.html]"]
  node_api["Flask API<br/>[app.py]"]
end

subgraph group_voice["Voice and State"]
  node_state[("Message and Status State<br/>[app.py]")]
  node_speech["Speech Recognition<br/>[app.py]"]
  node_tts["Speech Synthesis<br/>[app.py]"]
end

subgraph group_actions["Command Actions"]
  node_router["Command Router<br/>[app.py]"]
  node_windows["Windows Control<br/>[app.py]"]
  node_filesystem["Filesystem Operations<br/>[app.py]"]
  node_telemetry["System Telemetry<br/>[app.py]"]
  node_web["Web Navigation and Search<br/>[app.py]"]
end

subgraph group_alternate["Alternate Server"]
  node_server["Alternate Flask Server<br/>[server.py]"]
  node_whisper["Whisper Transcription<br/>[server.py]"]
  node_localcommands["Local Command Handler<br/>[server.py]"]
  node_servertts["Server Speech Output<br/>[server.py]"]
end

node_user(("User"))
node_microphone(("Microphone"))
node_gemini["Gemini AI"]
node_ollama["Ollama Local Model"]

node_user -->|"speaks into"| node_microphone
node_microphone -->|"captures audio"| node_speech
node_speech -->|"transcribes for"| node_router
node_router -->|"dispatches commands"| node_windows
node_router -->|"handles file requests"| node_filesystem
node_router -->|"opens or searches"| node_web
node_router -.->|"may query"| node_gemini
node_api -->|"serves interface"| node_hud
node_hud -.->|"polls status"| node_api
node_api -->|"reads messages"| node_state
node_router -->|"adds responses"| node_state
node_api -->|"returns CPU and RAM"| node_telemetry
node_state -->|"queues responses"| node_tts
node_tts -->|"speaks response"| node_user
node_user -.->|"requests listening"| node_server
node_microphone -->|"captures audio"| node_server
node_server -->|"transcribes audio"| node_whisper
node_server -->|"routes recognized text"| node_localcommands
node_localcommands -->|"falls back to"| node_ollama
node_server -->|"speaks response"| node_servertts

click node_app "https://github.com/arjatala/jarvis-prototype/blob/main/app.py"
click node_hud "https://github.com/arjatala/jarvis-prototype/blob/main/index.html"
click node_api "https://github.com/arjatala/jarvis-prototype/blob/main/app.py"
click node_state "https://github.com/arjatala/jarvis-prototype/blob/main/app.py"
click node_speech "https://github.com/arjatala/jarvis-prototype/blob/main/app.py"
click node_tts "https://github.com/arjatala/jarvis-prototype/blob/main/app.py"
click node_router "https://github.com/arjatala/jarvis-prototype/blob/main/app.py"
click node_windows "https://github.com/arjatala/jarvis-prototype/blob/main/app.py"
click node_filesystem "https://github.com/arjatala/jarvis-prototype/blob/main/app.py"
click node_telemetry "https://github.com/arjatala/jarvis-prototype/blob/main/app.py"
click node_web "https://github.com/arjatala/jarvis-prototype/blob/main/app.py"
click node_server "https://github.com/arjatala/jarvis-prototype/blob/main/server.py"
click node_whisper "https://github.com/arjatala/jarvis-prototype/blob/main/server.py"
click node_localcommands "https://github.com/arjatala/jarvis-prototype/blob/main/server.py"
click node_servertts "https://github.com/arjatala/jarvis-prototype/blob/main/server.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_app,node_hud,node_api,node_user toneBlue
class node_state,node_speech,node_tts toneAmber
class node_router,node_windows,node_filesystem,node_telemetry,node_web toneMint
class node_server,node_whisper,node_localcommands,node_servertts toneRose
class node_microphone,node_gemini,node_ollama toneIndigo
```

## Components

### Desktop Assistant

- [Desktop Core](https://github.com/arjatala/jarvis-prototype/blob/main/app.py): `app.py`
- [Cyberpunk HUD](https://github.com/arjatala/jarvis-prototype/blob/main/index.html): `index.html`
- [Flask API](https://github.com/arjatala/jarvis-prototype/blob/main/app.py): `app.py`

### Voice and State

- [Message and Status State](https://github.com/arjatala/jarvis-prototype/blob/main/app.py): `app.py`
- [Speech Recognition](https://github.com/arjatala/jarvis-prototype/blob/main/app.py): `app.py`
- [Speech Synthesis](https://github.com/arjatala/jarvis-prototype/blob/main/app.py): `app.py`

### Command Actions

- [Command Router](https://github.com/arjatala/jarvis-prototype/blob/main/app.py): `app.py`
- [Windows Control](https://github.com/arjatala/jarvis-prototype/blob/main/app.py): `app.py`
- [Filesystem Operations](https://github.com/arjatala/jarvis-prototype/blob/main/app.py): `app.py`
- [System Telemetry](https://github.com/arjatala/jarvis-prototype/blob/main/app.py): `app.py`
- [Web Navigation and Search](https://github.com/arjatala/jarvis-prototype/blob/main/app.py): `app.py`

### Alternate Server

- [Alternate Flask Server](https://github.com/arjatala/jarvis-prototype/blob/main/server.py): `server.py`
- [Whisper Transcription](https://github.com/arjatala/jarvis-prototype/blob/main/server.py): `server.py`
- [Local Command Handler](https://github.com/arjatala/jarvis-prototype/blob/main/server.py): `server.py`
- [Server Speech Output](https://github.com/arjatala/jarvis-prototype/blob/main/server.py): `server.py`

### Other components

- **User**
- **Microphone**
- **Gemini AI**
- **Ollama Local Model**

## Connections

- User → Microphone: speaks into (evidence: `README.md`)
- Microphone → Speech Recognition: captures audio (evidence: `app.py`)
- Speech Recognition → Command Router: transcribes for (evidence: `app.py`)
- Command Router → Windows Control: dispatches commands (evidence: `app.py`)
- Command Router → Filesystem Operations: handles file requests (evidence: `app.py`)
- Command Router → Web Navigation and Search: opens or searches (evidence: `app.py`)
- Command Router → Gemini AI: may query (evidence: `README.md`)
- Flask API → Cyberpunk HUD: serves interface (evidence: `README.md`)
- Cyberpunk HUD → Flask API: polls status
- Flask API → Message and Status State: reads messages (evidence: `app.py`)
- Command Router → Message and Status State: adds responses (evidence: `app.py`)
- Flask API → System Telemetry: returns CPU and RAM (evidence: `app.py`)
- Message and Status State → Speech Synthesis: queues responses (evidence: `app.py`)
- Speech Synthesis → User: speaks response (evidence: `app.py`)
- User → Alternate Flask Server: requests listening
- Microphone → Alternate Flask Server: captures audio (evidence: `server.py`)
- Alternate Flask Server → Whisper Transcription: transcribes audio (evidence: `server.py`)
- Alternate Flask Server → Local Command Handler: routes recognized text (evidence: `server.py`)
- Local Command Handler → Ollama Local Model: falls back to (evidence: `server.py`)
- Alternate Flask Server → Server Speech Output: speaks response (evidence: `server.py`)
