# hexs/hexss architecture

> Architecture diagram of the GitHub repository hexs/hexss, 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/hexs/hexss
- Repository: https://github.com/hexs/hexss

## Overview

hexss is a Python utility toolkit spanning media annotation and streaming, robotics and device control, local network services, and developer helpers. Its common user workflow is to import a package or start a server, provide media, device, or file inputs, and receive processed results or control/status responses. The graph preserves these distinct capabilities rather than implying one combined pipeline. Some subsystems are included from README and tree evidence; their internal wiring is left unspecified where source excerpts were not provided.

Main entry points: [`hexss/draw_app2/app.py`](https://github.com/hexs/hexss/blob/main/hexss/draw_app2/app.py) (Dataset annotation), [`hexss/github/manager.py`](https://github.com/hexs/hexss/blob/main/hexss/github/manager.py) (GitHub SSH manager), [`hexss/draw_app/app.py`](https://github.com/hexs/hexss/blob/main/hexss/draw_app/app.py) (Video annotation), [`hexss/control_robot/app.py`](https://github.com/hexs/hexss/blob/main/hexss/control_robot/app.py) (Robot web UI)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_media["Media tools"]
  node_draw1["Video annotation<br/>[app.py]"]
  node_sequence["Media sequence<br/>[media_sequence.py]"]
  node_draw2["Dataset annotation<br/>[app.py]"]
  node_dataset["Media dataset<br/>[media_dataset.py]"]
  node_export["Dataset export<br/>[export_dataset.py]"]
  node_detection["Detection tools<br/>[object_detector.py]"]
  node_imaging["Image processing<br/>[im.py]"]
  node_capture["Image capture<br/>[capture.py]"]
  node_publisher["Frame publisher<br/>[publisher.py]"]
  node_publisher_server["Frame server<br/>[server.py]"]
end

subgraph group_control["Device control"]
  node_robot_ui["Robot web UI<br/>[app.py]"]
  node_robot["Robot interface<br/>[robot.py]"]
  node_modbus_ui["Serial robot API<br/>[app.py]"]
  node_modbus_robot["Serial robot<br/>[robot.py]"]
  node_io["GPIO controller<br/>[io_controller.py]"]
  node_mc_server["MC protocol UI<br/>[server.py]"]
  node_mc_client["MC client<br/>[client.py]"]
end

subgraph group_services["Local services"]
  node_camera_server["Camera server<br/>[camera_server.py]"]
  node_files["File manager"]
end

subgraph group_developer["Developer utilities"]
  node_threading["Multithreading<br/>[mutithread.py]"]
  node_config["Configuration<br/>[config.py]"]
  node_packages["Package checks<br/>[packages.py]"]
end

subgraph group_network["Network integrations"]
  node_github["GitHub SSH manager<br/>[manager.py]"]
end

node_user(("Python user"))
node_external_files[("Local files")]
node_github_service(("GitHub API"))
node_serial_device(("Robot device"))
node_browser(("Browser client"))

node_user -->|"starts server"| node_draw1
node_draw1 -->|"loads video"| node_sequence
node_browser -->|"annotates frames"| node_draw1
node_user -->|"starts server"| node_draw2
node_draw2 -->|"loads annotations"| node_dataset
node_draw2 -->|"starts export"| node_export
node_browser -->|"edits dataset"| node_draw2
node_user -->|"uses detection"| node_detection
node_user -->|"processes images"| node_imaging
node_user -->|"captures images"| node_capture
node_user -->|"publishes frames"| node_publisher
node_publisher_server -->|"streams frames"| node_browser
node_user -->|"starts server"| node_robot_ui
node_browser -->|"sends commands"| node_robot_ui
node_robot_ui -->|"invokes controls"| node_robot
node_robot -->|"controls device"| node_serial_device
node_user -->|"starts server"| node_modbus_ui
node_browser -->|"sends commands"| node_modbus_ui
node_modbus_ui -->|"invokes controls"| node_modbus_robot
node_modbus_robot -->|"controls device"| node_serial_device
node_user -->|"configures GPIO"| node_io
node_user -->|"starts server"| node_mc_server
node_browser -->|"reads and writes"| node_mc_server
node_mc_server -->|"accesses tags"| node_mc_client
node_user -->|"starts server"| node_camera_server
node_user -->|"starts server"| node_files
node_browser -->|"requests files"| node_files
node_files -->|"reads and writes"| node_external_files
node_user -->|"runs tasks"| node_threading
node_user -->|"loads settings"| node_config
node_user -->|"checks packages"| node_packages
node_user -->|"syncs SSH key"| node_github
node_github -->|"lists and uploads keys"| node_github_service
node_github -->|"loads credentials"| node_config

click node_draw1 "https://github.com/hexs/hexss/blob/main/hexss/draw_app/app.py"
click node_sequence "https://github.com/hexs/hexss/blob/main/hexss/draw_app/media_sequence.py"
click node_draw2 "https://github.com/hexs/hexss/blob/main/hexss/draw_app2/app.py"
click node_dataset "https://github.com/hexs/hexss/blob/main/hexss/draw_app2/media_dataset.py"
click node_export "https://github.com/hexs/hexss/blob/main/hexss/draw_app2/export_dataset.py"
click node_detection "https://github.com/hexs/hexss/blob/main/hexss/detector/object_detector.py"
click node_imaging "https://github.com/hexs/hexss/blob/main/hexss/image/im.py"
click node_capture "https://github.com/hexs/hexss/blob/main/hexss/image/capture.py"
click node_publisher "https://github.com/hexs/hexss/blob/main/hexss/frame_publisher/publisher.py"
click node_publisher_server "https://github.com/hexs/hexss/blob/main/hexss/frame_publisher/server.py"
click node_robot_ui "https://github.com/hexs/hexss/blob/main/hexss/control_robot/app.py"
click node_robot "https://github.com/hexs/hexss/blob/main/hexss/control_robot/robot.py"
click node_modbus_ui "https://github.com/hexs/hexss/blob/main/hexss/modbus/serial/app.py"
click node_modbus_robot "https://github.com/hexs/hexss/blob/main/hexss/modbus/serial/robot.py"
click node_io "https://github.com/hexs/hexss/blob/main/hexss/protocol/raspberrypi/io_controller.py"
click node_mc_server "https://github.com/hexs/hexss/blob/main/hexss/protocol/mc/server.py"
click node_mc_client "https://github.com/hexs/hexss/blob/main/hexss/protocol/mc/client.py"
click node_camera_server "https://github.com/hexs/hexss/blob/main/hexss/server/camera_server.py"
click node_files "https://github.com/hexs/hexss/blob/main/hexss/server/file_manager_server.py"
click node_threading "https://github.com/hexs/hexss/blob/main/hexss/threading/mutithread.py"
click node_config "https://github.com/hexs/hexss/blob/main/hexss/config.py"
click node_packages "https://github.com/hexs/hexss/blob/main/hexss/python/packages.py"
click node_github "https://github.com/hexs/hexss/blob/main/hexss/github/manager.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_draw1,node_sequence,node_draw2,node_dataset,node_export,node_detection,node_imaging,node_capture,node_publisher,node_publisher_server,node_user,node_browser toneBlue
class node_robot_ui,node_robot,node_modbus_ui,node_modbus_robot,node_io,node_mc_server,node_mc_client,node_external_files toneAmber
class node_camera_server,node_files,node_github_service toneMint
class node_threading,node_config,node_packages toneRose
class node_github,node_serial_device toneIndigo
```

## Components

### Media tools

- [Video annotation](https://github.com/hexs/hexss/blob/main/hexss/draw_app/app.py): `hexss/draw_app/app.py`
- [Media sequence](https://github.com/hexs/hexss/blob/main/hexss/draw_app/media_sequence.py): `hexss/draw_app/media_sequence.py`
- [Dataset annotation](https://github.com/hexs/hexss/blob/main/hexss/draw_app2/app.py): `hexss/draw_app2/app.py`
- [Media dataset](https://github.com/hexs/hexss/blob/main/hexss/draw_app2/media_dataset.py): `hexss/draw_app2/media_dataset.py`
- [Dataset export](https://github.com/hexs/hexss/blob/main/hexss/draw_app2/export_dataset.py): `hexss/draw_app2/export_dataset.py`
- [Detection tools](https://github.com/hexs/hexss/blob/main/hexss/detector/object_detector.py): `hexss/detector/object_detector.py`
- [Image processing](https://github.com/hexs/hexss/blob/main/hexss/image/im.py): `hexss/image/im.py`
- [Image capture](https://github.com/hexs/hexss/blob/main/hexss/image/capture.py): `hexss/image/capture.py`
- [Frame publisher](https://github.com/hexs/hexss/blob/main/hexss/frame_publisher/publisher.py): `hexss/frame_publisher/publisher.py`
- [Frame server](https://github.com/hexs/hexss/blob/main/hexss/frame_publisher/server.py): `hexss/frame_publisher/server.py`

### Device control

- [Robot web UI](https://github.com/hexs/hexss/blob/main/hexss/control_robot/app.py): `hexss/control_robot/app.py`
- [Robot interface](https://github.com/hexs/hexss/blob/main/hexss/control_robot/robot.py): `hexss/control_robot/robot.py`
- [Serial robot API](https://github.com/hexs/hexss/blob/main/hexss/modbus/serial/app.py): `hexss/modbus/serial/app.py`
- [Serial robot](https://github.com/hexs/hexss/blob/main/hexss/modbus/serial/robot.py): `hexss/modbus/serial/robot.py`
- [GPIO controller](https://github.com/hexs/hexss/blob/main/hexss/protocol/raspberrypi/io_controller.py): `hexss/protocol/raspberrypi/io_controller.py`
- [MC protocol UI](https://github.com/hexs/hexss/blob/main/hexss/protocol/mc/server.py): `hexss/protocol/mc/server.py`
- [MC client](https://github.com/hexs/hexss/blob/main/hexss/protocol/mc/client.py): `hexss/protocol/mc/client.py`

### Local services

- [Camera server](https://github.com/hexs/hexss/blob/main/hexss/server/camera_server.py): `hexss/server/camera_server.py`
- [File manager](https://github.com/hexs/hexss/blob/main/hexss/server/file_manager_server.py): `hexss/server/file_manager_server.py`

### Developer utilities

- [Multithreading](https://github.com/hexs/hexss/blob/main/hexss/threading/mutithread.py): `hexss/threading/mutithread.py`
- [Configuration](https://github.com/hexs/hexss/blob/main/hexss/config.py): `hexss/config.py`
- [Package checks](https://github.com/hexs/hexss/blob/main/hexss/python/packages.py): `hexss/python/packages.py`

### Network integrations

- [GitHub SSH manager](https://github.com/hexs/hexss/blob/main/hexss/github/manager.py): `hexss/github/manager.py`

### Other components

- **Python user**
- **Local files**
- **GitHub API**
- **Robot device**
- **Browser client**

## Connections

- Python user → Video annotation: starts server
- Video annotation → Media sequence: loads video
- Browser client → Video annotation: annotates frames
- Python user → Dataset annotation: starts server
- Dataset annotation → Media dataset: loads annotations
- Dataset annotation → Dataset export: starts export
- Browser client → Dataset annotation: edits dataset
- Python user → Detection tools: uses detection
- Python user → Image processing: processes images
- Python user → Image capture: captures images
- Python user → Frame publisher: publishes frames
- Frame server → Browser client: streams frames
- Python user → Robot web UI: starts server
- Browser client → Robot web UI: sends commands
- Robot web UI → Robot interface: invokes controls
- Robot interface → Robot device: controls device
- Python user → Serial robot API: starts server
- Browser client → Serial robot API: sends commands
- Serial robot API → Serial robot: invokes controls
- Serial robot → Robot device: controls device
- Python user → GPIO controller: configures GPIO
- Python user → MC protocol UI: starts server
- Browser client → MC protocol UI: reads and writes
- MC protocol UI → MC client: accesses tags
- Python user → Camera server: starts server
- Python user → File manager: starts server
- Browser client → File manager: requests files
- File manager → Local files: reads and writes
- Python user → Multithreading: runs tasks
- Python user → Configuration: loads settings
- Python user → Package checks: checks packages
- Python user → GitHub SSH manager: syncs SSH key
- GitHub SSH manager → GitHub API: lists and uploads keys
- GitHub SSH manager → Configuration: loads credentials
