# elhefe3/infra-werf architecture

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

- Interactive diagram: https://gitdiagram.com/elhefe3/infra-werf
- Repository: https://github.com/elhefe3/infra-werf

## Overview

InfraWerf is a Tauri desktop application for mapping and managing self-hosted servers. The main flow is the React UI calling the Rust workspace commands, which delegate to the Rust core for saved map/workspace state and authenticated server operations. Distinct capabilities include inventory and health, SFTP and transfers, terminal and workload control, tunneled apps, and permissioned plugins. Edges follow explicit README or excerpted relationships; unsampled subsystems are retained where documented, but their internal calls are not inferred.

Main entry points: [`src-tauri/src/workspace.rs`](https://github.com/elhefe3/infra-werf/blob/main/src-tauri/src/workspace.rs) (Workspace orchestration), [`ui/workspace-client.ts`](https://github.com/elhefe3/infra-werf/blob/main/ui/workspace-client.ts) (Workspace client), [`ui/main.tsx`](https://github.com/elhefe3/infra-werf/blob/main/ui/main.tsx) (React workspace), [`crates/atlas-core/src/ssh.rs`](https://github.com/elhefe3/infra-werf/blob/main/crates/atlas-core/src/ssh.rs) (SSH sessions)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Desktop interface"]
  node_frontend["React workspace<br/>[main.tsx]"]
  node_map["Map model<br/>[map-model.ts]"]
  node_fileui["Files and transfers<br/>[file-browser.tsx]"]
  node_workspaceui["Workspace panels<br/>[extensions.tsx]"]
  node_pluginui["Plugin UI<br/>[plugins.tsx]"]
  node_contracts["UI contracts<br/>[contracts.gen.ts]"]
end

subgraph group_app["Workspace bridge"]
  node_client["Workspace client"]
  node_commands["Tauri commands<br/>[lib.rs]"]
  node_workspace["Workspace orchestration<br/>[workspace.rs]"]
  node_apps["App windows<br/>[apps.rs]"]
end

subgraph group_core["Server operations"]
  node_inventory["Inventory and health<br/>[inventory.rs]"]
  node_health["Health checks<br/>[health.rs]"]
  node_files["SFTP files<br/>[files.rs]"]
  node_transfers["Transfer operations<br/>[transfers.rs]"]
  node_ssh["SSH sessions<br/>[ssh.rs]"]
  node_conversation["SSH trust handling<br/>[conversation.rs]"]
  node_workloads["Workload inspection<br/>[workloads.rs]"]
  node_tunnels["App tunnels<br/>[tunnel.rs]"]
end

subgraph group_plugins["Plugin system"]
  node_extensions["Extension registry<br/>[extensions.rs]"]
  node_manifest["Plugin manifests<br/>[plugin.rs]"]
  node_pluginhost["Plugin authorization<br/>[plugin_host.rs]"]
  node_plugininstall["Plugin installation<br/>[plugin_install.rs]"]
  node_pluginviews["Plugin views<br/>[views.rs]"]
  node_pluginjobs["Plugin jobs<br/>[jobs.rs]"]
end

subgraph group_state["Saved state"]
  node_mapstate[("Map and workspace data<br/>[store.rs]")]
end

node_owner(("Operator"))
node_openssh["System OpenSSH"]
node_servers["Managed servers"]

node_owner -->|"uses"| node_frontend
node_frontend -->|"renders"| node_map
node_frontend -->|"renders"| node_workspaceui
node_frontend -.->|"invokes"| node_client
node_fileui -.->|"requests"| node_client
node_pluginui -.->|"requests"| node_client
node_client -->|"invokes"| node_commands
node_commands -->|"delegates"| node_workspace
node_workspace -.->|"uses"| node_mapstate
node_workspace -.->|"delegates"| node_inventory
node_workspace -->|"ticks"| node_health
node_workspace -.->|"delegates"| node_files
node_files -.->|"uses"| node_transfers
node_files -->|"uses"| node_ssh
node_ssh -.->|"uses"| node_conversation
node_ssh -->|"connects"| node_openssh
node_ssh -->|"authenticates"| node_servers
node_workspace -->|"delegates"| node_workloads
node_workspace -->|"opens"| node_tunnels
node_apps -->|"opens tunnel"| node_workspace
node_apps -->|"opens app"| node_servers
node_workspace -.->|"manages"| node_pluginhost
node_pluginhost -->|"validates"| node_manifest
node_pluginhost -->|"uses"| node_extensions
node_plugininstall -->|"validates"| node_manifest
node_workspace -.->|"delegates"| node_plugininstall
node_workspace -->|"manages"| node_pluginviews
node_workspace -->|"manages"| node_pluginjobs
node_pluginui -.->|"displays"| node_pluginviews
node_client -->|"checks"| node_contracts

click node_frontend "https://github.com/elhefe3/infra-werf/blob/main/ui/main.tsx"
click node_map "https://github.com/elhefe3/infra-werf/blob/main/ui/map-model.ts"
click node_fileui "https://github.com/elhefe3/infra-werf/blob/main/ui/file-browser.tsx"
click node_workspaceui "https://github.com/elhefe3/infra-werf/blob/main/ui/extensions.tsx"
click node_pluginui "https://github.com/elhefe3/infra-werf/blob/main/ui/plugins.tsx"
click node_contracts "https://github.com/elhefe3/infra-werf/blob/main/ui/contracts.gen.ts"
click node_client "https://github.com/elhefe3/infra-werf/blob/main/ui/workspace-client.ts"
click node_commands "https://github.com/elhefe3/infra-werf/blob/main/src-tauri/src/lib.rs"
click node_workspace "https://github.com/elhefe3/infra-werf/blob/main/src-tauri/src/workspace.rs"
click node_apps "https://github.com/elhefe3/infra-werf/blob/main/src-tauri/src/apps.rs"
click node_mapstate "https://github.com/elhefe3/infra-werf/blob/main/crates/atlas-core/src/store.rs"
click node_inventory "https://github.com/elhefe3/infra-werf/blob/main/crates/atlas-core/src/inventory.rs"
click node_health "https://github.com/elhefe3/infra-werf/blob/main/crates/atlas-core/src/health.rs"
click node_files "https://github.com/elhefe3/infra-werf/blob/main/crates/atlas-core/src/files.rs"
click node_transfers "https://github.com/elhefe3/infra-werf/blob/main/crates/atlas-core/src/files/transfers.rs"
click node_ssh "https://github.com/elhefe3/infra-werf/blob/main/crates/atlas-core/src/ssh.rs"
click node_conversation "https://github.com/elhefe3/infra-werf/blob/main/crates/atlas-core/src/ssh/conversation.rs"
click node_workloads "https://github.com/elhefe3/infra-werf/blob/main/crates/atlas-core/src/workloads.rs"
click node_tunnels "https://github.com/elhefe3/infra-werf/blob/main/crates/atlas-core/src/tunnel.rs"
click node_extensions "https://github.com/elhefe3/infra-werf/blob/main/crates/atlas-core/src/extensions.rs"
click node_manifest "https://github.com/elhefe3/infra-werf/blob/main/crates/atlas-core/src/plugin.rs"
click node_pluginhost "https://github.com/elhefe3/infra-werf/blob/main/crates/atlas-core/src/plugin_host.rs"
click node_plugininstall "https://github.com/elhefe3/infra-werf/blob/main/crates/atlas-core/src/plugin_install.rs"
click node_pluginviews "https://github.com/elhefe3/infra-werf/blob/main/src-tauri/src/workspace/views.rs"
click node_pluginjobs "https://github.com/elhefe3/infra-werf/blob/main/src-tauri/src/workspace/jobs.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_frontend,node_map,node_fileui,node_workspaceui,node_pluginui,node_contracts toneBlue
class node_client,node_commands,node_workspace,node_apps toneAmber
class node_inventory,node_health,node_files,node_transfers,node_ssh,node_conversation,node_workloads,node_tunnels,node_servers toneMint
class node_extensions,node_manifest,node_pluginhost,node_plugininstall,node_pluginviews,node_pluginjobs toneRose
class node_mapstate,node_owner,node_openssh toneIndigo
```

## Components

### Desktop interface

- [React workspace](https://github.com/elhefe3/infra-werf/blob/main/ui/main.tsx): `ui/main.tsx`
- [Map model](https://github.com/elhefe3/infra-werf/blob/main/ui/map-model.ts): `ui/map-model.ts`
- [Files and transfers](https://github.com/elhefe3/infra-werf/blob/main/ui/file-browser.tsx): `ui/file-browser.tsx`
- [Workspace panels](https://github.com/elhefe3/infra-werf/blob/main/ui/extensions.tsx): `ui/extensions.tsx`
- [Plugin UI](https://github.com/elhefe3/infra-werf/blob/main/ui/plugins.tsx): `ui/plugins.tsx`
- [UI contracts](https://github.com/elhefe3/infra-werf/blob/main/ui/contracts.gen.ts): `ui/contracts.gen.ts`

### Workspace bridge

- [Workspace client](https://github.com/elhefe3/infra-werf/blob/main/ui/workspace-client.ts): `ui/workspace-client.ts`
- [Tauri commands](https://github.com/elhefe3/infra-werf/blob/main/src-tauri/src/lib.rs): `src-tauri/src/lib.rs`
- [Workspace orchestration](https://github.com/elhefe3/infra-werf/blob/main/src-tauri/src/workspace.rs): `src-tauri/src/workspace.rs`
- [App windows](https://github.com/elhefe3/infra-werf/blob/main/src-tauri/src/apps.rs): `src-tauri/src/apps.rs`

### Server operations

- [Inventory and health](https://github.com/elhefe3/infra-werf/blob/main/crates/atlas-core/src/inventory.rs): `crates/atlas-core/src/inventory.rs`
- [Health checks](https://github.com/elhefe3/infra-werf/blob/main/crates/atlas-core/src/health.rs): `crates/atlas-core/src/health.rs`
- [SFTP files](https://github.com/elhefe3/infra-werf/blob/main/crates/atlas-core/src/files.rs): `crates/atlas-core/src/files.rs`
- [Transfer operations](https://github.com/elhefe3/infra-werf/blob/main/crates/atlas-core/src/files/transfers.rs): `crates/atlas-core/src/files/transfers.rs`
- [SSH sessions](https://github.com/elhefe3/infra-werf/blob/main/crates/atlas-core/src/ssh.rs): `crates/atlas-core/src/ssh.rs`
- [SSH trust handling](https://github.com/elhefe3/infra-werf/blob/main/crates/atlas-core/src/ssh/conversation.rs): `crates/atlas-core/src/ssh/conversation.rs`
- [Workload inspection](https://github.com/elhefe3/infra-werf/blob/main/crates/atlas-core/src/workloads.rs): `crates/atlas-core/src/workloads.rs`
- [App tunnels](https://github.com/elhefe3/infra-werf/blob/main/crates/atlas-core/src/tunnel.rs): `crates/atlas-core/src/tunnel.rs`

### Plugin system

- [Extension registry](https://github.com/elhefe3/infra-werf/blob/main/crates/atlas-core/src/extensions.rs): `crates/atlas-core/src/extensions.rs`
- [Plugin manifests](https://github.com/elhefe3/infra-werf/blob/main/crates/atlas-core/src/plugin.rs): `crates/atlas-core/src/plugin.rs`
- [Plugin authorization](https://github.com/elhefe3/infra-werf/blob/main/crates/atlas-core/src/plugin_host.rs): `crates/atlas-core/src/plugin_host.rs`
- [Plugin installation](https://github.com/elhefe3/infra-werf/blob/main/crates/atlas-core/src/plugin_install.rs): `crates/atlas-core/src/plugin_install.rs`
- [Plugin views](https://github.com/elhefe3/infra-werf/blob/main/src-tauri/src/workspace/views.rs): `src-tauri/src/workspace/views.rs`
- [Plugin jobs](https://github.com/elhefe3/infra-werf/blob/main/src-tauri/src/workspace/jobs.rs): `src-tauri/src/workspace/jobs.rs`

### Saved state

- [Map and workspace data](https://github.com/elhefe3/infra-werf/blob/main/crates/atlas-core/src/store.rs): `crates/atlas-core/src/store.rs`

### Other components

- **Operator**
- **System OpenSSH**
- **Managed servers**

## Connections

- Operator → React workspace: uses (evidence: `README.md`)
- React workspace → Map model: renders (evidence: `ui/main.tsx`)
- React workspace → Workspace panels: renders (evidence: `ui/main.tsx`)
- React workspace → Workspace client: invokes (evidence: `ui/main.tsx`)
- Files and transfers → Workspace client: requests
- Plugin UI → Workspace client: requests
- Workspace client → Tauri commands: invokes (evidence: `README.md`)
- Tauri commands → Workspace orchestration: delegates (evidence: `src-tauri/src/lib.rs`)
- Workspace orchestration → Map and workspace data: uses
- Workspace orchestration → Inventory and health: delegates
- Workspace orchestration → Health checks: ticks
- Workspace orchestration → SFTP files: delegates
- SFTP files → Transfer operations: uses
- SFTP files → SSH sessions: uses
- SSH sessions → SSH trust handling: uses
- SSH sessions → System OpenSSH: connects (evidence: `README.md`)
- SSH sessions → Managed servers: authenticates (evidence: `README.md`)
- Workspace orchestration → Workload inspection: delegates (evidence: `crates/atlas-core/src/workloads.rs`)
- Workspace orchestration → App tunnels: opens
- App windows → Workspace orchestration: opens tunnel (evidence: `src-tauri/src/apps.rs`)
- App windows → Managed servers: opens app (evidence: `README.md`)
- Workspace orchestration → Plugin authorization: manages
- Plugin authorization → Plugin manifests: validates (evidence: `crates/atlas-core/src/plugin.rs`)
- Plugin authorization → Extension registry: uses (evidence: `crates/atlas-core/src/plugin_host.rs`)
- Plugin installation → Plugin manifests: validates (evidence: `crates/atlas-core/src/plugin_install.rs`)
- Workspace orchestration → Plugin installation: delegates
- Workspace orchestration → Plugin views: manages (evidence: `src-tauri/src/workspace/views.rs`)
- Workspace orchestration → Plugin jobs: manages (evidence: `src-tauri/src/workspace/jobs.rs`)
- Plugin UI → Plugin views: displays
- Workspace client → UI contracts: checks (evidence: `ui/workspace-client.ts`)
