# jhaabhay7667-cyber/rax architecture

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

- Interactive diagram: https://gitdiagram.com/jhaabhay7667-cyber/rax
- Repository: https://github.com/jhaabhay7667-cyber/rax

## Overview

RAX is a desktop voice assistant: a user issues a spoken or typed command, the app routes it to a capability, and the assistant responds through speech and its GUI. The sampled source also shows language selection, routines, web lookups, coding help, desktop actions, screenshots, memory, and to-dos. Most runtime behavior is concentrated in main_v4.py. The source excerpts are partial and the documentation contents were not supplied, so uncertain subsystem wiring is omitted.

Main entry points: [`main_v4.py`](https://github.com/jhaabhay7667-cyber/rax/blob/main/main_v4.py) (Command handling), [`rax_command_history.txt`](https://github.com/jhaabhay7667-cyber/rax/blob/main/rax_command_history.txt) (Command history), [`rax_memory.json`](https://github.com/jhaabhay7667-cyber/rax/blob/main/rax_memory.json) (Memory data), [`rax_todos.json`](https://github.com/jhaabhay7667-cyber/rax/blob/main/rax_todos.json) (To-do data)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["User Interface"]
  node_app["RAX desktop app<br/>[main_v4.py]"]
  node_gui["GUI status and tabs<br/>[main_v4.py]"]
end

subgraph group_interaction["Assistant Runtime"]
  node_voice["Voice interaction<br/>[main_v4.py]"]
  node_router["Command handling<br/>[main_v4.py]"]
  node_speech["Spoken responses<br/>[main_v4.py]"]
end

subgraph group_features["Assistant Capabilities"]
  node_language["Language selection<br/>[main_v4.py]"]
  node_routines["User routines<br/>[main_v4.py]"]
  node_web["Web information<br/>[main_v4.py]"]
  node_desktop["Desktop actions<br/>[main_v4.py]"]
  node_screenshots["Screenshots<br/>[main_v4.py]"]
  node_coding["AI coding<br/>[main_v4.py]"]
  node_memory["Memory<br/>[main_v4.py]"]
  node_todos["To-dos<br/>[main_v4.py]"]
end

subgraph group_state["Local State"]
  node_history["Command history"]
  node_memoryfile["Memory data<br/>[rax_memory.json]"]
  node_todofile["To-do data<br/>[rax_todos.json]"]
end

node_user(("User"))
node_os["Desktop operating system"]
node_webservice["Web information services"]
node_openai["OpenAI API"]
node_judge0["Judge0 service"]

node_user -->|"uses"| node_app
node_app -->|"updates"| node_gui
node_app -->|"handles input"| node_voice
node_voice -->|"dispatches commands"| node_router
node_router -->|"selects language"| node_language
node_router -->|"runs routines"| node_routines
node_router -->|"handles queries"| node_web
node_router -->|"handles actions"| node_desktop
node_router -->|"handles capture"| node_screenshots
node_router -->|"handles coding"| node_coding
node_router -->|"handles memory"| node_memory
node_router -->|"handles tasks"| node_todos
node_language -->|"announces selection"| node_speech
node_web -.->|"requests information"| node_webservice
node_coding -.->|"requests code"| node_openai
node_coding -.->|"submits code"| node_judge0
node_desktop -->|"controls applications"| node_os
node_screenshots -->|"captures screen"| node_os
node_memory -->|"reads and writes"| node_memoryfile
node_todos -->|"reads and writes"| node_todofile
node_voice -.->|"records commands"| node_history
node_speech -->|"speaks response"| node_user

click node_app "https://github.com/jhaabhay7667-cyber/rax/blob/main/main_v4.py"
click node_gui "https://github.com/jhaabhay7667-cyber/rax/blob/main/main_v4.py"
click node_voice "https://github.com/jhaabhay7667-cyber/rax/blob/main/main_v4.py"
click node_router "https://github.com/jhaabhay7667-cyber/rax/blob/main/main_v4.py"
click node_speech "https://github.com/jhaabhay7667-cyber/rax/blob/main/main_v4.py"
click node_language "https://github.com/jhaabhay7667-cyber/rax/blob/main/main_v4.py"
click node_routines "https://github.com/jhaabhay7667-cyber/rax/blob/main/main_v4.py"
click node_web "https://github.com/jhaabhay7667-cyber/rax/blob/main/main_v4.py"
click node_desktop "https://github.com/jhaabhay7667-cyber/rax/blob/main/main_v4.py"
click node_screenshots "https://github.com/jhaabhay7667-cyber/rax/blob/main/main_v4.py"
click node_coding "https://github.com/jhaabhay7667-cyber/rax/blob/main/main_v4.py"
click node_memory "https://github.com/jhaabhay7667-cyber/rax/blob/main/main_v4.py"
click node_todos "https://github.com/jhaabhay7667-cyber/rax/blob/main/main_v4.py"
click node_history "https://github.com/jhaabhay7667-cyber/rax/blob/main/rax_command_history.txt"
click node_memoryfile "https://github.com/jhaabhay7667-cyber/rax/blob/main/rax_memory.json"
click node_todofile "https://github.com/jhaabhay7667-cyber/rax/blob/main/rax_todos.json"

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_gui,node_user toneBlue
class node_voice,node_router,node_speech toneAmber
class node_language,node_routines,node_web,node_desktop,node_screenshots,node_coding,node_memory,node_todos,node_openai toneMint
class node_history,node_memoryfile,node_todofile toneRose
class node_os,node_webservice,node_judge0 toneIndigo
```

## Components

### User Interface

- [RAX desktop app](https://github.com/jhaabhay7667-cyber/rax/blob/main/main_v4.py): `main_v4.py`
- [GUI status and tabs](https://github.com/jhaabhay7667-cyber/rax/blob/main/main_v4.py): `main_v4.py`

### Assistant Runtime

- [Voice interaction](https://github.com/jhaabhay7667-cyber/rax/blob/main/main_v4.py): `main_v4.py`
- [Command handling](https://github.com/jhaabhay7667-cyber/rax/blob/main/main_v4.py): `main_v4.py`
- [Spoken responses](https://github.com/jhaabhay7667-cyber/rax/blob/main/main_v4.py): `main_v4.py`

### Assistant Capabilities

- [Language selection](https://github.com/jhaabhay7667-cyber/rax/blob/main/main_v4.py): `main_v4.py`
- [User routines](https://github.com/jhaabhay7667-cyber/rax/blob/main/main_v4.py): `main_v4.py`
- [Web information](https://github.com/jhaabhay7667-cyber/rax/blob/main/main_v4.py): `main_v4.py`
- [Desktop actions](https://github.com/jhaabhay7667-cyber/rax/blob/main/main_v4.py): `main_v4.py`
- [Screenshots](https://github.com/jhaabhay7667-cyber/rax/blob/main/main_v4.py): `main_v4.py`
- [AI coding](https://github.com/jhaabhay7667-cyber/rax/blob/main/main_v4.py): `main_v4.py`
- [Memory](https://github.com/jhaabhay7667-cyber/rax/blob/main/main_v4.py): `main_v4.py`
- [To-dos](https://github.com/jhaabhay7667-cyber/rax/blob/main/main_v4.py): `main_v4.py`

### Local State

- [Command history](https://github.com/jhaabhay7667-cyber/rax/blob/main/rax_command_history.txt): `rax_command_history.txt`
- [Memory data](https://github.com/jhaabhay7667-cyber/rax/blob/main/rax_memory.json): `rax_memory.json`
- [To-do data](https://github.com/jhaabhay7667-cyber/rax/blob/main/rax_todos.json): `rax_todos.json`

### Other components

- **User**
- **Desktop operating system**
- **Web information services**
- **OpenAI API**
- **Judge0 service**

## Connections

- User → RAX desktop app: uses
- RAX desktop app → GUI status and tabs: updates
- RAX desktop app → Voice interaction: handles input
- Voice interaction → Command handling: dispatches commands
- Command handling → Language selection: selects language
- Command handling → User routines: runs routines
- Command handling → Web information: handles queries
- Command handling → Desktop actions: handles actions
- Command handling → Screenshots: handles capture
- Command handling → AI coding: handles coding
- Command handling → Memory: handles memory
- Command handling → To-dos: handles tasks
- Language selection → Spoken responses: announces selection
- Web information → Web information services: requests information
- AI coding → OpenAI API: requests code
- AI coding → Judge0 service: submits code
- Desktop actions → Desktop operating system: controls applications
- Screenshots → Desktop operating system: captures screen
- Memory → Memory data: reads and writes
- To-dos → To-do data: reads and writes
- Voice interaction → Command history: records commands
- Spoken responses → User: speaks response
