# eirikrrrr/wingox architecture

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

- Interactive diagram: https://gitdiagram.com/eirikrrrr/wingox
- Repository: https://github.com/eirikrrrr/wingox

## Overview

Wingox is a cross-platform MikroTik RouterOS desktop manager, with a reusable Rust core and a headless CLI. The main desktop flow is device selection into a multi-pane workspace, where users browse RouterOS sections or open an SSH terminal; the core supplies REST, SSH, reachability, and routed network access. The README also highlights proxy and SSH-jump connectivity and REST plus binary APIs. Some backend command wiring and unsampled capabilities are documented but not evidenced by the excerpts, so those links are omitted.

Main entry points: [`src/App.tsx`](https://github.com/eirikrrrr/wingox/blob/main/src/App.tsx) (App shell), [`core/src/routeros/rest.rs`](https://github.com/eirikrrrr/wingox/blob/main/core/src/routeros/rest.rs) (REST client), [`src/Workspace.tsx`](https://github.com/eirikrrrr/wingox/blob/main/src/Workspace.tsx) (Device workspace), [`src-tauri/src/lib.rs`](https://github.com/eirikrrrr/wingox/blob/main/src-tauri/src/lib.rs) (Tauri command layer)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_desktop["Desktop experience"]
  node_app["App shell<br/>[App.tsx]"]
  node_detached["Detached window<br/>[Detached.tsx]"]
  node_settings_ui["Preferences UI<br/>[settings.tsx]"]
  node_cli["Headless CLI<br/>[main.rs]"]
end

subgraph group_device["Device sessions"]
  node_workspace["Device workspace<br/>[Workspace.tsx]"]
  node_panes["Pane tree<br/>[Pane.tsx]"]
  node_terminal["SSH terminal<br/>[Terminal.tsx]"]
  node_cert_ui["Certificate controls<br/>[Certificate.tsx]"]
  node_monitor["Reachability monitor<br/>[monitor.ts]"]
end

subgraph group_core["RouterOS core"]
  node_rest["REST client<br/>[rest.rs]"]
  node_models["REST data models<br/>[model.rs]"]
  node_ssh["SSH client<br/>[ssh.rs]"]
  node_probe["Route probing<br/>[probe.rs]"]
end

subgraph group_connectivity["Network access"]
  node_transport["Transport config<br/>[transport.rs]"]
  node_network["Proxy TCP routing<br/>[net.rs]"]
  node_tls["TLS trust<br/>[tls.rs]"]
  node_errors["Network errors<br/>[error.rs]"]
end

subgraph group_state["Local state"]
  node_tauri["Tauri command layer<br/>[lib.rs]"]
  node_settings_store[("Settings storage<br/>[settings.rs]")]
  node_profile_store[("Profile storage<br/>[store.rs]")]
  node_workspace_store[("Workspace storage<br/>[workspaces.rs]")]
end

node_user(("Operator"))
node_routeros{{"RouterOS device"}}

node_user -->|"uses"| node_app
node_app -->|"renders"| node_workspace
node_app -->|"opens"| node_detached
node_app -->|"renders"| node_settings_ui
node_app -->|"uses"| node_monitor
node_workspace -->|"renders"| node_panes
node_workspace -->|"mounts"| node_terminal
node_workspace -.->|"manages"| node_routeros
node_settings_ui -.->|"invokes"| node_tauri
node_tauri -->|"uses"| node_settings_store
node_tauri -->|"uses"| node_profile_store
node_tauri -->|"uses"| node_workspace_store
node_cli -.->|"connects"| node_routeros
node_probe -->|"probes via"| node_rest
node_probe -->|"checks route"| node_network
node_rest -->|"deserializes"| node_models
node_rest -->|"configures proxy"| node_transport
node_rest -->|"configures trust"| node_tls
node_rest -->|"requests data"| node_routeros
node_ssh -->|"opens stream"| node_network
node_network -->|"uses proxy config"| node_transport
node_network -->|"reports failures"| node_errors
node_tls -->|"reports failures"| node_errors

click node_app "https://github.com/eirikrrrr/wingox/blob/main/src/App.tsx"
click node_detached "https://github.com/eirikrrrr/wingox/blob/main/src/Detached.tsx"
click node_settings_ui "https://github.com/eirikrrrr/wingox/blob/main/src/settings.tsx"
click node_workspace "https://github.com/eirikrrrr/wingox/blob/main/src/Workspace.tsx"
click node_panes "https://github.com/eirikrrrr/wingox/blob/main/src/Pane.tsx"
click node_terminal "https://github.com/eirikrrrr/wingox/blob/main/src/Terminal.tsx"
click node_cert_ui "https://github.com/eirikrrrr/wingox/blob/main/src/Certificate.tsx"
click node_monitor "https://github.com/eirikrrrr/wingox/blob/main/src/monitor.ts"
click node_cli "https://github.com/eirikrrrr/wingox/blob/main/cli/src/main.rs"
click node_tauri "https://github.com/eirikrrrr/wingox/blob/main/src-tauri/src/lib.rs"
click node_settings_store "https://github.com/eirikrrrr/wingox/blob/main/src-tauri/src/settings.rs"
click node_profile_store "https://github.com/eirikrrrr/wingox/blob/main/src-tauri/src/store.rs"
click node_workspace_store "https://github.com/eirikrrrr/wingox/blob/main/src-tauri/src/workspaces.rs"
click node_rest "https://github.com/eirikrrrr/wingox/blob/main/core/src/routeros/rest.rs"
click node_models "https://github.com/eirikrrrr/wingox/blob/main/core/src/routeros/model.rs"
click node_ssh "https://github.com/eirikrrrr/wingox/blob/main/core/src/ssh.rs"
click node_probe "https://github.com/eirikrrrr/wingox/blob/main/core/src/probe.rs"
click node_transport "https://github.com/eirikrrrr/wingox/blob/main/core/src/transport.rs"
click node_network "https://github.com/eirikrrrr/wingox/blob/main/core/src/net.rs"
click node_tls "https://github.com/eirikrrrr/wingox/blob/main/core/src/tls.rs"
click node_errors "https://github.com/eirikrrrr/wingox/blob/main/core/src/error.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_app,node_detached,node_settings_ui,node_cli toneBlue
class node_workspace,node_panes,node_terminal,node_cert_ui,node_monitor toneAmber
class node_rest,node_models,node_ssh,node_probe,node_routeros toneMint
class node_transport,node_network,node_tls,node_errors toneRose
class node_tauri,node_settings_store,node_profile_store,node_workspace_store,node_user toneIndigo
```

## Components

### Desktop experience

- [App shell](https://github.com/eirikrrrr/wingox/blob/main/src/App.tsx): `src/App.tsx`
- [Detached window](https://github.com/eirikrrrr/wingox/blob/main/src/Detached.tsx): `src/Detached.tsx`
- [Preferences UI](https://github.com/eirikrrrr/wingox/blob/main/src/settings.tsx): `src/settings.tsx`
- [Headless CLI](https://github.com/eirikrrrr/wingox/blob/main/cli/src/main.rs): `cli/src/main.rs`

### Device sessions

- [Device workspace](https://github.com/eirikrrrr/wingox/blob/main/src/Workspace.tsx): `src/Workspace.tsx`
- [Pane tree](https://github.com/eirikrrrr/wingox/blob/main/src/Pane.tsx): `src/Pane.tsx`
- [SSH terminal](https://github.com/eirikrrrr/wingox/blob/main/src/Terminal.tsx): `src/Terminal.tsx`
- [Certificate controls](https://github.com/eirikrrrr/wingox/blob/main/src/Certificate.tsx): `src/Certificate.tsx`
- [Reachability monitor](https://github.com/eirikrrrr/wingox/blob/main/src/monitor.ts): `src/monitor.ts`

### RouterOS core

- [REST client](https://github.com/eirikrrrr/wingox/blob/main/core/src/routeros/rest.rs): `core/src/routeros/rest.rs`
- [REST data models](https://github.com/eirikrrrr/wingox/blob/main/core/src/routeros/model.rs): `core/src/routeros/model.rs`
- [SSH client](https://github.com/eirikrrrr/wingox/blob/main/core/src/ssh.rs): `core/src/ssh.rs`
- [Route probing](https://github.com/eirikrrrr/wingox/blob/main/core/src/probe.rs): `core/src/probe.rs`

### Network access

- [Transport config](https://github.com/eirikrrrr/wingox/blob/main/core/src/transport.rs): `core/src/transport.rs`
- [Proxy TCP routing](https://github.com/eirikrrrr/wingox/blob/main/core/src/net.rs): `core/src/net.rs`
- [TLS trust](https://github.com/eirikrrrr/wingox/blob/main/core/src/tls.rs): `core/src/tls.rs`
- [Network errors](https://github.com/eirikrrrr/wingox/blob/main/core/src/error.rs): `core/src/error.rs`

### Local state

- [Tauri command layer](https://github.com/eirikrrrr/wingox/blob/main/src-tauri/src/lib.rs): `src-tauri/src/lib.rs`
- [Settings storage](https://github.com/eirikrrrr/wingox/blob/main/src-tauri/src/settings.rs): `src-tauri/src/settings.rs`
- [Profile storage](https://github.com/eirikrrrr/wingox/blob/main/src-tauri/src/store.rs): `src-tauri/src/store.rs`
- [Workspace storage](https://github.com/eirikrrrr/wingox/blob/main/src-tauri/src/workspaces.rs): `src-tauri/src/workspaces.rs`

### Other components

- **Operator**
- **RouterOS device**

## Connections

- Operator → App shell: uses
- App shell → Device workspace: renders (evidence: `src/App.tsx`)
- App shell → Detached window: opens (evidence: `src/Detached.tsx`)
- App shell → Preferences UI: renders (evidence: `src/App.tsx`)
- App shell → Reachability monitor: uses (evidence: `src/App.tsx`)
- Device workspace → Pane tree: renders (evidence: `src/Workspace.tsx`)
- Device workspace → SSH terminal: mounts (evidence: `src/Workspace.tsx`)
- Device workspace → RouterOS device: manages (evidence: `README.md`)
- Preferences UI → Tauri command layer: invokes
- Tauri command layer → Settings storage: uses (evidence: `src-tauri/src/lib.rs`)
- Tauri command layer → Profile storage: uses (evidence: `src-tauri/src/lib.rs`)
- Tauri command layer → Workspace storage: uses (evidence: `src-tauri/src/lib.rs`)
- Headless CLI → RouterOS device: connects (evidence: `README.md`)
- Route probing → REST client: probes via (evidence: `core/src/probe.rs`)
- Route probing → Proxy TCP routing: checks route (evidence: `core/src/probe.rs`)
- REST client → REST data models: deserializes (evidence: `core/src/routeros/rest.rs`)
- REST client → Transport config: configures proxy (evidence: `core/src/routeros/rest.rs`)
- REST client → TLS trust: configures trust (evidence: `core/src/routeros/rest.rs`)
- REST client → RouterOS device: requests data (evidence: `core/src/routeros/rest.rs`)
- SSH client → Proxy TCP routing: opens stream (evidence: `core/src/ssh.rs`)
- Proxy TCP routing → Transport config: uses proxy config (evidence: `core/src/net.rs`)
- Proxy TCP routing → Network errors: reports failures (evidence: `core/src/net.rs`)
- TLS trust → Network errors: reports failures (evidence: `core/src/error.rs`)
