# devcarson88888/qemubox architecture

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

- Interactive diagram: https://gitdiagram.com/devcarson88888/qemubox
- Repository: https://github.com/devcarson88888/qemubox

## Overview

QemuBox is a native desktop control panel for local QEMU virtual machines and remote libvirt hosts. Its principal workflow is to configure or create a VM, save its definition, then start or stop it and inspect its status. The application also supports importing JSON definitions and a separate SSH-based remote-management workflow. The sampled implementation is a single large Rust source file, so several responsibilities map to that same path; the README documents major capabilities, while the excerpts show only selected UI and remote-command behavior.

Main entry points: [`src/main.rs`](https://github.com/devcarson88888/qemubox/blob/main/src/main.rs) (Home screen)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workstation["Workstation UI"]
  node_home["Home screen<br/>[main.rs]"]
  node_vm_editor["VM editor<br/>[main.rs]"]
  node_typical_wizard["Typical wizard<br/>[main.rs]"]
  node_custom_wizard["Custom wizard<br/>[main.rs]"]
end

subgraph group_local_vm["Local VM Management"]
  node_library["VM library<br/>[main.rs]"]
  node_json_import["JSON import<br/>[main.rs]"]
  node_vm_store[("VM settings store<br/>[main.rs]")]
  node_disk_options["Disk options<br/>[main.rs]"]
end

subgraph group_local_runtime["Local Runtime"]
  node_vm_controls["VM controls<br/>[main.rs]"]
  node_qemu_process["QEMU process"]
  node_qemu_img["qemu-img"]
end

subgraph group_remote["Remote Management"]
  node_remote_profiles[("Remote profiles<br/>[main.rs]")]
  node_remote_console["Remote console<br/>[main.rs]"]
  node_ssh["OpenSSH"]
  node_remote_libvirt["Remote libvirt"]
end

node_user(("User"))

node_user -->|"uses"| node_home
node_home -->|"opens"| node_vm_editor
node_vm_editor -->|"saves settings"| node_vm_store
node_home -->|"opens"| node_library
node_library -->|"configures"| node_vm_editor
node_library -->|"imports definition"| node_json_import
node_json_import -->|"saves definition"| node_vm_store
node_vm_editor -->|"sets disk format"| node_disk_options
node_home -->|"creates VM"| node_typical_wizard
node_typical_wizard -->|"creates disk"| node_qemu_img
node_home -->|"creates VM"| node_custom_wizard
node_custom_wizard -->|"saves definition"| node_vm_store
node_library -->|"starts or stops"| node_vm_controls
node_vm_controls -->|"uses saved settings"| node_vm_store
node_vm_controls -->|"manages process"| node_qemu_process
node_qemu_process -->|"reports status"| node_vm_controls
node_home -->|"opens"| node_remote_console
node_remote_console -->|"stores profiles"| node_remote_profiles
node_remote_console -->|"runs commands"| node_ssh
node_ssh -->|"invokes virsh"| node_remote_libvirt

click node_home "https://github.com/devcarson88888/qemubox/blob/main/src/main.rs"
click node_vm_editor "https://github.com/devcarson88888/qemubox/blob/main/src/main.rs"
click node_typical_wizard "https://github.com/devcarson88888/qemubox/blob/main/src/main.rs"
click node_custom_wizard "https://github.com/devcarson88888/qemubox/blob/main/src/main.rs"
click node_library "https://github.com/devcarson88888/qemubox/blob/main/src/main.rs"
click node_json_import "https://github.com/devcarson88888/qemubox/blob/main/src/main.rs"
click node_vm_store "https://github.com/devcarson88888/qemubox/blob/main/src/main.rs"
click node_disk_options "https://github.com/devcarson88888/qemubox/blob/main/src/main.rs"
click node_vm_controls "https://github.com/devcarson88888/qemubox/blob/main/src/main.rs"
click node_remote_profiles "https://github.com/devcarson88888/qemubox/blob/main/src/main.rs"
click node_remote_console "https://github.com/devcarson88888/qemubox/blob/main/src/main.rs"

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_home,node_vm_editor,node_typical_wizard,node_custom_wizard,node_user toneBlue
class node_library,node_json_import,node_vm_store,node_disk_options toneAmber
class node_vm_controls,node_qemu_process,node_qemu_img toneMint
class node_remote_profiles,node_remote_console,node_ssh,node_remote_libvirt toneRose
```

## Components

### Workstation UI

- [Home screen](https://github.com/devcarson88888/qemubox/blob/main/src/main.rs): `src/main.rs`
- [VM editor](https://github.com/devcarson88888/qemubox/blob/main/src/main.rs): `src/main.rs`
- [Typical wizard](https://github.com/devcarson88888/qemubox/blob/main/src/main.rs): `src/main.rs`
- [Custom wizard](https://github.com/devcarson88888/qemubox/blob/main/src/main.rs): `src/main.rs`

### Local VM Management

- [VM library](https://github.com/devcarson88888/qemubox/blob/main/src/main.rs): `src/main.rs`
- [JSON import](https://github.com/devcarson88888/qemubox/blob/main/src/main.rs): `src/main.rs`
- [VM settings store](https://github.com/devcarson88888/qemubox/blob/main/src/main.rs): `src/main.rs`
- [Disk options](https://github.com/devcarson88888/qemubox/blob/main/src/main.rs): `src/main.rs`

### Local Runtime

- [VM controls](https://github.com/devcarson88888/qemubox/blob/main/src/main.rs): `src/main.rs`
- **QEMU process**
- **qemu-img**

### Remote Management

- [Remote profiles](https://github.com/devcarson88888/qemubox/blob/main/src/main.rs): `src/main.rs`
- [Remote console](https://github.com/devcarson88888/qemubox/blob/main/src/main.rs): `src/main.rs`
- **OpenSSH**
- **Remote libvirt**

### Other components

- **User**

## Connections

- User → Home screen: uses (evidence: `README.md`)
- Home screen → VM editor: opens (evidence: `README.md`)
- VM editor → VM settings store: saves settings (evidence: `README.md`)
- Home screen → VM library: opens (evidence: `README.md`)
- VM library → VM editor: configures (evidence: `README.md`)
- VM library → JSON import: imports definition (evidence: `README.md`)
- JSON import → VM settings store: saves definition (evidence: `README.md`)
- VM editor → Disk options: sets disk format (evidence: `README.md`)
- Home screen → Typical wizard: creates VM (evidence: `README.md`)
- Typical wizard → qemu-img: creates disk (evidence: `README.md`)
- Home screen → Custom wizard: creates VM (evidence: `README.md`)
- Custom wizard → VM settings store: saves definition (evidence: `README.md`)
- VM library → VM controls: starts or stops (evidence: `README.md`)
- VM controls → VM settings store: uses saved settings (evidence: `README.md`)
- VM controls → QEMU process: manages process (evidence: `README.md`)
- QEMU process → VM controls: reports status (evidence: `README.md`)
- Home screen → Remote console: opens (evidence: `README.md`)
- Remote console → Remote profiles: stores profiles (evidence: `README.md`)
- Remote console → OpenSSH: runs commands (evidence: `src/main.rs`)
- OpenSSH → Remote libvirt: invokes virsh (evidence: `README.md`)
