# ys-ll/uniterm architecture

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

## Overview

uniTerm is a cross-platform remote-access workspace: users select a saved connection or workspace, open a terminal or specialized session, and interact with remote systems through a shared tabbed UI. The session manager dispatches connection types to protocol-specific implementations; separate product branches provide file transfer, databases, desktops, monitoring, containers, Kubernetes, and AI. The README documents these capabilities, while the sampled source confirms the Wails frontend/backend boundary, session dispatch, and selected subsystem behavior. Wiring for unsampled branches is shown only where documented.

Main entry points: [`app.go`](https://github.com/ys-ll/uniterm/blob/main/app.go) (Wails App API), [`frontend/src/App.vue`](https://github.com/ys-ll/uniterm/blob/main/frontend/src/App.vue) (Workspace Shell), [`backend/session`](https://github.com/ys-ll/uniterm/tree/main/backend/session) (Protocol Sessions), [`app_ai.go`](https://github.com/ys-ll/uniterm/blob/main/app_ai.go) (AI Agent)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Workspace UI"]
  node_workspace["Workspace Shell<br/>[App.vue]"]
  node_terminalui["Terminal Views"]
  node_termmanager["Terminal Manager<br/>[terminalManager.ts]"]
  node_connectionui["Connection Manager UI<br/>[Sidebar.vue]"]
end

subgraph group_sessions["Sessions and Transfer"]
  node_app["Wails App API<br/>[app.go]"]
  node_sessionmgr["Session Manager<br/>[manager.go]"]
  node_sessionimpl["Protocol Sessions"]
  node_filetransfer["File Transfer"]
end

subgraph group_ops["Infrastructure Tools"]
  node_dbclient["Database Client"]
  node_container["Container Manager<br/>[manager.go]"]
  node_k8s["Kubernetes Manager<br/>[manager.go]"]
  node_monitor["Server Monitor<br/>[monitor_session.go]"]
  node_desktop["Remote Desktop"]
end

subgraph group_assist["AI and Integrations"]
  node_aiui["AI Sidebar<br/>[AISidebar.vue]"]
  node_aiagent["AI Agent<br/>[app_ai.go]"]
  node_mcp["MCP Server<br/>[server.go]"]
end

subgraph group_state["User State"]
  node_stores[("App Stores")]
  node_sync["Encrypted Sync<br/>[sync_service.go]"]
  node_importer["Connection Import<br/>[importer.go]"]
end

node_user(("User"))
node_remote(("Remote Systems"))
node_llm(("LLM Service"))
node_externalagents(("External Agents"))
node_gitrepo(("Private Git Repo"))

node_user -->|"uses"| node_workspace
node_workspace -->|"shows"| node_connectionui
node_workspace -->|"mounts"| node_terminalui
node_terminalui -->|"manages terminal"| node_termmanager
node_workspace -->|"calls bindings"| node_app
node_app -->|"starts sessions"| node_sessionmgr
node_sessionmgr -->|"dispatches type"| node_sessionimpl
node_sessionimpl -->|"connects"| node_remote
node_app -->|"provides transfer"| node_filetransfer
node_app -->|"provides database access"| node_dbclient
node_app -->|"manages containers"| node_container
node_app -->|"manages cluster"| node_k8s
node_app -->|"opens monitoring"| node_monitor
node_app -->|"opens desktop"| node_desktop
node_aiui -->|"uses bindings"| node_app
node_aiagent -->|"runs terminal commands"| node_sessionimpl
node_aiagent -->|"requests completions"| node_llm
node_externalagents -->|"calls tools"| node_mcp
node_mcp -->|"executes SSH commands"| node_sessionimpl
node_app -->|"reads and writes"| node_stores
node_app -->|"imports connections"| node_importer
node_app -->|"configures sync"| node_sync
node_sync -.->|"syncs encrypted data"| node_gitrepo

click node_workspace "https://github.com/ys-ll/uniterm/blob/main/frontend/src/App.vue"
click node_terminalui "https://github.com/ys-ll/uniterm/blob/main/frontend/src/components/TerminalTabContent.vue"
click node_termmanager "https://github.com/ys-ll/uniterm/blob/main/frontend/src/services/terminalManager.ts"
click node_app "https://github.com/ys-ll/uniterm/blob/main/app.go"
click node_sessionmgr "https://github.com/ys-ll/uniterm/blob/main/backend/session/manager.go"
click node_sessionimpl "https://github.com/ys-ll/uniterm/tree/main/backend/session"
click node_filetransfer "https://github.com/ys-ll/uniterm/tree/main/backend/session"
click node_dbclient "https://github.com/ys-ll/uniterm/tree/main/backend/database"
click node_container "https://github.com/ys-ll/uniterm/blob/main/backend/container/manager.go"
click node_k8s "https://github.com/ys-ll/uniterm/blob/main/backend/k8s/manager.go"
click node_monitor "https://github.com/ys-ll/uniterm/blob/main/backend/session/monitor_session.go"
click node_desktop "https://github.com/ys-ll/uniterm/tree/main/backend/session"
click node_aiui "https://github.com/ys-ll/uniterm/blob/main/frontend/src/components/AISidebar.vue"
click node_aiagent "https://github.com/ys-ll/uniterm/blob/main/app_ai.go"
click node_mcp "https://github.com/ys-ll/uniterm/blob/main/backend/mcp/server.go"
click node_stores "https://github.com/ys-ll/uniterm/tree/main/backend/store"
click node_sync "https://github.com/ys-ll/uniterm/blob/main/backend/sync/sync_service.go"
click node_connectionui "https://github.com/ys-ll/uniterm/blob/main/frontend/src/components/Sidebar.vue"
click node_importer "https://github.com/ys-ll/uniterm/blob/main/backend/importer/importer.go"

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_workspace,node_terminalui,node_termmanager,node_connectionui,node_user toneBlue
class node_app,node_sessionmgr,node_sessionimpl,node_filetransfer toneAmber
class node_dbclient,node_container,node_k8s,node_monitor,node_desktop toneMint
class node_aiui,node_aiagent,node_mcp toneRose
class node_stores,node_sync,node_importer,node_remote,node_llm,node_externalagents,node_gitrepo toneIndigo
```

## Components

### Workspace UI

- [Workspace Shell](https://github.com/ys-ll/uniterm/blob/main/frontend/src/App.vue): `frontend/src/App.vue`
- [Terminal Views](https://github.com/ys-ll/uniterm/blob/main/frontend/src/components/TerminalTabContent.vue): `frontend/src/components/TerminalTabContent.vue`
- [Terminal Manager](https://github.com/ys-ll/uniterm/blob/main/frontend/src/services/terminalManager.ts): `frontend/src/services/terminalManager.ts`
- [Connection Manager UI](https://github.com/ys-ll/uniterm/blob/main/frontend/src/components/Sidebar.vue): `frontend/src/components/Sidebar.vue`

### Sessions and Transfer

- [Wails App API](https://github.com/ys-ll/uniterm/blob/main/app.go): `app.go`
- [Session Manager](https://github.com/ys-ll/uniterm/blob/main/backend/session/manager.go): `backend/session/manager.go`
- [Protocol Sessions](https://github.com/ys-ll/uniterm/tree/main/backend/session): `backend/session`
- [File Transfer](https://github.com/ys-ll/uniterm/tree/main/backend/session): `backend/session`

### Infrastructure Tools

- [Database Client](https://github.com/ys-ll/uniterm/tree/main/backend/database): `backend/database`
- [Container Manager](https://github.com/ys-ll/uniterm/blob/main/backend/container/manager.go): `backend/container/manager.go`
- [Kubernetes Manager](https://github.com/ys-ll/uniterm/blob/main/backend/k8s/manager.go): `backend/k8s/manager.go`
- [Server Monitor](https://github.com/ys-ll/uniterm/blob/main/backend/session/monitor_session.go): `backend/session/monitor_session.go`
- [Remote Desktop](https://github.com/ys-ll/uniterm/tree/main/backend/session): `backend/session`

### AI and Integrations

- [AI Sidebar](https://github.com/ys-ll/uniterm/blob/main/frontend/src/components/AISidebar.vue): `frontend/src/components/AISidebar.vue`
- [AI Agent](https://github.com/ys-ll/uniterm/blob/main/app_ai.go): `app_ai.go`
- [MCP Server](https://github.com/ys-ll/uniterm/blob/main/backend/mcp/server.go): `backend/mcp/server.go`

### User State

- [App Stores](https://github.com/ys-ll/uniterm/tree/main/backend/store): `backend/store`
- [Encrypted Sync](https://github.com/ys-ll/uniterm/blob/main/backend/sync/sync_service.go): `backend/sync/sync_service.go`
- [Connection Import](https://github.com/ys-ll/uniterm/blob/main/backend/importer/importer.go): `backend/importer/importer.go`

### Other components

- **User**
- **Remote Systems**
- **LLM Service**
- **External Agents**
- **Private Git Repo**

## Connections

- User → Workspace Shell: uses
- Workspace Shell → Connection Manager UI: shows
- Workspace Shell → Terminal Views: mounts
- Terminal Views → Terminal Manager: manages terminal
- Workspace Shell → Wails App API: calls bindings
- Wails App API → Session Manager: starts sessions
- Session Manager → Protocol Sessions: dispatches type
- Protocol Sessions → Remote Systems: connects
- Wails App API → File Transfer: provides transfer
- Wails App API → Database Client: provides database access
- Wails App API → Container Manager: manages containers
- Wails App API → Kubernetes Manager: manages cluster
- Wails App API → Server Monitor: opens monitoring
- Wails App API → Remote Desktop: opens desktop
- AI Sidebar → Wails App API: uses bindings
- AI Agent → Protocol Sessions: runs terminal commands
- AI Agent → LLM Service: requests completions
- External Agents → MCP Server: calls tools
- MCP Server → Protocol Sessions: executes SSH commands
- Wails App API → App Stores: reads and writes
- Wails App API → Connection Import: imports connections
- Wails App API → Encrypted Sync: configures sync
- Encrypted Sync → Private Git Repo: syncs encrypted data
