# aditya7j/tron architecture

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

- Interactive diagram: https://gitdiagram.com/aditya7j/tron
- Repository: https://github.com/aditya7j/tron

## Overview

Knowledge Galaxy combines a notes visualization and conversational assistant with voice-driven desktop controls. The main path is browser question → HTTP server → local-note recall or live web lookup → model answer, with the indexed corpus also feeding the galaxy viewer. Separate branches provide focus sessions, guarded tools, study workflows, and locally produced/published video. Several server subsystems are documented in the README but their implementation was not sampled, so those links cite the README rather than implying source-level inspection.

Main entry points: [`server.py`](https://github.com/aditya7j/tron/blob/main/server.py) (Assistant Server), [`build.py`](https://github.com/aditya7j/tron/blob/main/build.py) (Note Indexer), [`hands.py`](https://github.com/aditya7j/tron/blob/main/hands.py) (Tool Gate), [`broadcast.py`](https://github.com/aditya7j/tron/blob/main/broadcast.py) (Video Broadcaster)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Galaxy &amp; Chat"]
  node_viewer["Galaxy Viewer<br/>[index.html]"]
  node_http["Assistant Server<br/>[server.py]"]
end

subgraph group_knowledge["Knowledge Pipeline"]
  node_indexer["Note Indexer<br/>[build.py]"]
  node_ingestion["Ingest &amp; Recall<br/>[ingest.py]"]
  node_notes["Markdown Corpus"]
  node_graphdata["Galaxy Graph Data<br/>[graph-data.js]"]
  node_noteindex["Searchable Note Index"]
end

subgraph group_assistant["Assistant Runtime"]
  node_websearch["Web Lookup<br/>[search.py]"]
  node_model["Model Provider"]
end

subgraph group_actions["Voice &amp; Actions"]
  node_focus["Focus Sessions<br/>[focus.py]"]
  node_toolgate["Tool Gate<br/>[hands.py]"]
  node_toolhands["Tool Actions"]
  node_process["Process Runner<br/>[_proc.py]"]
  node_speech["Speech Output<br/>[say.py]"]
  node_voiceid["Voice Identification<br/>[voiceprint.py]"]
end

subgraph group_media["Study &amp; Media"]
  node_scholar["Study Engine<br/>[scholar.py]"]
  node_studyjob["Study Tick<br/>[study_tick.py]"]
  node_director["Video Director<br/>[director.py]"]
  node_broadcast["Video Broadcaster<br/>[broadcast.py]"]
  node_google["Google API<br/>[google_api.py]"]
end

node_user(("User"))

node_user -->|"opens"| node_viewer
node_user -->|"asks"| node_http
node_viewer -.->|"sends chat"| node_http
node_http -->|"serves"| node_viewer
node_indexer -->|"reads"| node_notes
node_indexer -->|"uses"| node_ingestion
node_indexer -->|"generates"| node_graphdata
node_indexer -->|"generates"| node_noteindex
node_http -->|"runs if missing"| node_indexer
node_http -->|"reloads"| node_noteindex
node_http -.->|"recalls notes"| node_ingestion
node_http -->|"looks up web"| node_websearch
node_http -->|"requests answer"| node_model
node_http -->|"runs sessions"| node_focus
node_http -->|"routes tool requests"| node_toolgate
node_toolgate -->|"dispatches"| node_toolhands
node_toolgate -->|"uses"| node_google
node_toolgate -->|"runs subprocesses"| node_process
node_focus -->|"uses"| node_process
node_http -.->|"speaks responses"| node_speech
node_http -.->|"checks speaker"| node_voiceid
node_studyjob -->|"runs study tick"| node_scholar
node_studyjob -->|"checks readiness"| node_http
node_director -.->|"hands off films"| node_broadcast
node_broadcast -->|"uses API"| node_google
node_broadcast -->|"reads configuration"| node_http

click node_viewer "https://github.com/aditya7j/tron/blob/main/viewer/index.html"
click node_http "https://github.com/aditya7j/tron/blob/main/server.py"
click node_indexer "https://github.com/aditya7j/tron/blob/main/build.py"
click node_ingestion "https://github.com/aditya7j/tron/blob/main/ingest.py"
click node_notes "https://github.com/aditya7j/tron/tree/main/notes"
click node_graphdata "https://github.com/aditya7j/tron/blob/main/viewer/graph-data.js"
click node_websearch "https://github.com/aditya7j/tron/blob/main/search.py"
click node_focus "https://github.com/aditya7j/tron/blob/main/focus.py"
click node_toolgate "https://github.com/aditya7j/tron/blob/main/hands.py"
click node_toolhands "https://github.com/aditya7j/tron/tree/main/tools"
click node_process "https://github.com/aditya7j/tron/blob/main/tools/_proc.py"
click node_speech "https://github.com/aditya7j/tron/blob/main/say.py"
click node_voiceid "https://github.com/aditya7j/tron/blob/main/voiceprint.py"
click node_scholar "https://github.com/aditya7j/tron/blob/main/scholar.py"
click node_studyjob "https://github.com/aditya7j/tron/blob/main/tools/study_tick.py"
click node_director "https://github.com/aditya7j/tron/blob/main/director.py"
click node_broadcast "https://github.com/aditya7j/tron/blob/main/broadcast.py"
click node_google "https://github.com/aditya7j/tron/blob/main/google_api.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_viewer,node_http,node_user toneBlue
class node_indexer,node_ingestion,node_notes,node_graphdata,node_noteindex toneAmber
class node_websearch,node_model toneMint
class node_focus,node_toolgate,node_toolhands,node_process,node_speech,node_voiceid toneRose
class node_scholar,node_studyjob,node_director,node_broadcast,node_google toneIndigo
```

## Components

### Galaxy & Chat

- [Galaxy Viewer](https://github.com/aditya7j/tron/blob/main/viewer/index.html): `viewer/index.html`
- [Assistant Server](https://github.com/aditya7j/tron/blob/main/server.py): `server.py`

### Knowledge Pipeline

- [Note Indexer](https://github.com/aditya7j/tron/blob/main/build.py): `build.py`
- [Ingest & Recall](https://github.com/aditya7j/tron/blob/main/ingest.py): `ingest.py`
- [Markdown Corpus](https://github.com/aditya7j/tron/tree/main/notes): `notes`
- [Galaxy Graph Data](https://github.com/aditya7j/tron/blob/main/viewer/graph-data.js): `viewer/graph-data.js`
- **Searchable Note Index**

### Assistant Runtime

- [Web Lookup](https://github.com/aditya7j/tron/blob/main/search.py): `search.py`
- **Model Provider**

### Voice & Actions

- [Focus Sessions](https://github.com/aditya7j/tron/blob/main/focus.py): `focus.py`
- [Tool Gate](https://github.com/aditya7j/tron/blob/main/hands.py): `hands.py`
- [Tool Actions](https://github.com/aditya7j/tron/tree/main/tools): `tools`
- [Process Runner](https://github.com/aditya7j/tron/blob/main/tools/_proc.py): `tools/_proc.py`
- [Speech Output](https://github.com/aditya7j/tron/blob/main/say.py): `say.py`
- [Voice Identification](https://github.com/aditya7j/tron/blob/main/voiceprint.py): `voiceprint.py`

### Study & Media

- [Study Engine](https://github.com/aditya7j/tron/blob/main/scholar.py): `scholar.py`
- [Study Tick](https://github.com/aditya7j/tron/blob/main/tools/study_tick.py): `tools/study_tick.py`
- [Video Director](https://github.com/aditya7j/tron/blob/main/director.py): `director.py`
- [Video Broadcaster](https://github.com/aditya7j/tron/blob/main/broadcast.py): `broadcast.py`
- [Google API](https://github.com/aditya7j/tron/blob/main/google_api.py): `google_api.py`

### Other components

- **User**

## Connections

- User → Galaxy Viewer: opens
- User → Assistant Server: asks
- Galaxy Viewer → Assistant Server: sends chat
- Assistant Server → Galaxy Viewer: serves
- Note Indexer → Markdown Corpus: reads
- Note Indexer → Ingest & Recall: uses (evidence: `build.py`)
- Note Indexer → Galaxy Graph Data: generates
- Note Indexer → Searchable Note Index: generates
- Assistant Server → Note Indexer: runs if missing
- Assistant Server → Searchable Note Index: reloads
- Assistant Server → Ingest & Recall: recalls notes
- Assistant Server → Web Lookup: looks up web
- Assistant Server → Model Provider: requests answer
- Assistant Server → Focus Sessions: runs sessions
- Assistant Server → Tool Gate: routes tool requests
- Tool Gate → Tool Actions: dispatches (evidence: `hands.py`)
- Tool Gate → Google API: uses (evidence: `hands.py`)
- Tool Gate → Process Runner: runs subprocesses (evidence: `tools/_proc.py`)
- Focus Sessions → Process Runner: uses (evidence: `focus.py`)
- Assistant Server → Speech Output: speaks responses
- Assistant Server → Voice Identification: checks speaker
- Study Tick → Study Engine: runs study tick (evidence: `tools/study_tick.py`)
- Study Tick → Assistant Server: checks readiness (evidence: `tools/study_tick.py`)
- Video Director → Video Broadcaster: hands off films (evidence: `broadcast.py`)
- Video Broadcaster → Google API: uses API (evidence: `broadcast.py`)
- Video Broadcaster → Assistant Server: reads configuration (evidence: `broadcast.py`)
