# st0ff3l/fileterm architecture

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

- Interactive diagram: https://gitdiagram.com/st0ff3l/fileterm
- Repository: https://github.com/st0ff3l/fileterm

## Overview

FileTerm is a desktop remote-work workspace, with a documented browser-based Web edition. The primary user workflow is to manage connection profiles, open SSH or FTP/FTPS sessions in workspace tabs, work in a terminal or remote file view, and manage transfers. The source tree also shows distinct backend session, transfer, AI/MCP, and web-server subsystems. The sampled excerpts are mostly renderer UI, so backend call paths and several integrations are not asserted; documented product relationships are cited to the README.

Main entry points: [`apps/tauri/src/renderer/features/workspace/session-workspace.tsx`](https://github.com/st0ff3l/fileterm/blob/main/apps/tauri/src/renderer/features/workspace/session-workspace.tsx) (Workspace tabs), [`apps/tauri/src/renderer/features/files/file-manager.tsx`](https://github.com/st0ff3l/fileterm/blob/main/apps/tauri/src/renderer/features/files/file-manager.tsx) (File manager), [`apps/tauri/src/renderer/features/connections/connection-manager-modal.tsx`](https://github.com/st0ff3l/fileterm/blob/main/apps/tauri/src/renderer/features/connections/connection-manager-modal.tsx) (Connection profiles), [`apps/tauri/src-tauri/src/bin/fileterm_web.rs`](https://github.com/st0ff3l/fileterm/blob/main/apps/tauri/src-tauri/src/bin/fileterm_web.rs) (Web server)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workspace["Workspace UI"]
  node_renderer["Application shell<br/>[app.tsx]"]
  node_workspace_tabs["Workspace tabs"]
  node_file_manager["File manager<br/>[file-manager.tsx]"]
end

subgraph group_connections["Connections"]
  node_profile_manager["Connection profiles"]
  node_proxy_manager["Proxy and routes"]
  node_ssh_keys["SSH key manager"]
end

subgraph group_remote["Remote sessions"]
  node_terminal["Terminal session<br/>[terminal.rs]"]
  node_ssh_session["SSH and SFTP<br/>[session.rs]"]
  node_ftp_session["FTP and FTPS<br/>[worker.rs]"]
  node_desktop_session["Remote desktop<br/>[mod.rs]"]
end

subgraph group_services["Backend services"]
  node_transfers["Transfer tasks<br/>[runtime.rs]"]
  node_connection_services["Connection operations"]
  node_profile_services["Profile operations<br/>[profiles.rs]"]
  node_ai["AI assistant<br/>[chat_runtime.rs]"]
  node_mcp["MCP integration<br/>[runtime.rs]"]
  node_storage[("JSON persistence<br/>[json_io.rs]")]
end

subgraph group_web["Web edition"]
  node_web_server["Web server<br/>[fileterm_web.rs]"]
  node_web_login["Web login<br/>[login.rs]"]
  node_web_rpc["Web RPC<br/>[core.rs]"]
end

node_user(("Developer or operator"))
node_browser(("Browser user"))

node_user -->|"uses workspace"| node_renderer
node_renderer -.->|"shows workspace"| node_workspace_tabs
node_user -->|"manages profiles"| node_profile_manager
node_profile_manager -.->|"configures connections"| node_connection_services
node_profile_manager -.->|"manages profiles"| node_profile_services
node_profile_services -.->|"persists profiles"| node_storage
node_user -->|"opens sessions"| node_workspace_tabs
node_workspace_tabs -.->|"opens SSH terminal"| node_terminal
node_workspace_tabs -->|"opens SFTP"| node_ssh_session
node_workspace_tabs -->|"opens FTP"| node_ftp_session
node_workspace_tabs -.->|"opens remote desktop"| node_desktop_session
node_file_manager -->|"manages transfers"| node_transfers
node_file_manager -->|"browses remote files"| node_ssh_session
node_file_manager -->|"browses remote files"| node_ftp_session
node_user -.->|"configures routes"| node_proxy_manager
node_user -.->|"manages SSH keys"| node_ssh_keys
node_browser -->|"opens Web edition"| node_web_server
node_web_server -.->|"authenticates users"| node_web_login
node_web_server -.->|"serves RPC"| node_web_rpc
node_user -.->|"uses AI assistant"| node_ai
node_user -.->|"connects MCP client"| node_mcp

click node_renderer "https://github.com/st0ff3l/fileterm/blob/main/apps/tauri/src/renderer/app.tsx"
click node_workspace_tabs "https://github.com/st0ff3l/fileterm/blob/main/apps/tauri/src/renderer/features/workspace/session-workspace.tsx"
click node_profile_manager "https://github.com/st0ff3l/fileterm/blob/main/apps/tauri/src/renderer/features/connections/connection-manager-modal.tsx"
click node_proxy_manager "https://github.com/st0ff3l/fileterm/blob/main/apps/tauri/src/renderer/features/proxies/proxy-manager-page.tsx"
click node_ssh_keys "https://github.com/st0ff3l/fileterm/blob/main/apps/tauri/src/renderer/features/ssh-keys/ssh-key-manager-page.tsx"
click node_file_manager "https://github.com/st0ff3l/fileterm/blob/main/apps/tauri/src/renderer/features/files/file-manager.tsx"
click node_terminal "https://github.com/st0ff3l/fileterm/blob/main/apps/tauri/src-tauri/src/sessions/terminal.rs"
click node_ssh_session "https://github.com/st0ff3l/fileterm/blob/main/apps/tauri/src-tauri/src/sessions/ssh/session.rs"
click node_ftp_session "https://github.com/st0ff3l/fileterm/blob/main/apps/tauri/src-tauri/src/sessions/ftp/worker.rs"
click node_desktop_session "https://github.com/st0ff3l/fileterm/blob/main/apps/tauri/src-tauri/src/sessions/desktop/mod.rs"
click node_transfers "https://github.com/st0ff3l/fileterm/blob/main/apps/tauri/src-tauri/src/services/transfers/runtime.rs"
click node_connection_services "https://github.com/st0ff3l/fileterm/blob/main/apps/tauri/src-tauri/src/services/connection_operations.rs"
click node_profile_services "https://github.com/st0ff3l/fileterm/blob/main/apps/tauri/src-tauri/src/services/profile_ops/profiles.rs"
click node_ai "https://github.com/st0ff3l/fileterm/blob/main/apps/tauri/src-tauri/src/services/ai/chat_runtime.rs"
click node_mcp "https://github.com/st0ff3l/fileterm/blob/main/apps/tauri/src-tauri/src/services/mcp/runtime.rs"
click node_storage "https://github.com/st0ff3l/fileterm/blob/main/apps/tauri/src-tauri/src/storage/json_io.rs"
click node_web_server "https://github.com/st0ff3l/fileterm/blob/main/apps/tauri/src-tauri/src/bin/fileterm_web.rs"
click node_web_login "https://github.com/st0ff3l/fileterm/blob/main/apps/tauri/src-tauri/src/web/login.rs"
click node_web_rpc "https://github.com/st0ff3l/fileterm/blob/main/apps/tauri/src-tauri/src/web/rpc/core.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_renderer,node_workspace_tabs,node_file_manager,node_browser toneBlue
class node_profile_manager,node_proxy_manager,node_ssh_keys toneAmber
class node_terminal,node_ssh_session,node_ftp_session,node_desktop_session toneMint
class node_transfers,node_connection_services,node_profile_services,node_ai,node_mcp,node_storage toneRose
class node_web_server,node_web_login,node_web_rpc,node_user toneIndigo
```

## Components

### Workspace UI

- [Application shell](https://github.com/st0ff3l/fileterm/blob/main/apps/tauri/src/renderer/app.tsx): `apps/tauri/src/renderer/app.tsx`
- [Workspace tabs](https://github.com/st0ff3l/fileterm/blob/main/apps/tauri/src/renderer/features/workspace/session-workspace.tsx): `apps/tauri/src/renderer/features/workspace/session-workspace.tsx`
- [File manager](https://github.com/st0ff3l/fileterm/blob/main/apps/tauri/src/renderer/features/files/file-manager.tsx): `apps/tauri/src/renderer/features/files/file-manager.tsx`

### Connections

- [Connection profiles](https://github.com/st0ff3l/fileterm/blob/main/apps/tauri/src/renderer/features/connections/connection-manager-modal.tsx): `apps/tauri/src/renderer/features/connections/connection-manager-modal.tsx`
- [Proxy and routes](https://github.com/st0ff3l/fileterm/blob/main/apps/tauri/src/renderer/features/proxies/proxy-manager-page.tsx): `apps/tauri/src/renderer/features/proxies/proxy-manager-page.tsx`
- [SSH key manager](https://github.com/st0ff3l/fileterm/blob/main/apps/tauri/src/renderer/features/ssh-keys/ssh-key-manager-page.tsx): `apps/tauri/src/renderer/features/ssh-keys/ssh-key-manager-page.tsx`

### Remote sessions

- [Terminal session](https://github.com/st0ff3l/fileterm/blob/main/apps/tauri/src-tauri/src/sessions/terminal.rs): `apps/tauri/src-tauri/src/sessions/terminal.rs`
- [SSH and SFTP](https://github.com/st0ff3l/fileterm/blob/main/apps/tauri/src-tauri/src/sessions/ssh/session.rs): `apps/tauri/src-tauri/src/sessions/ssh/session.rs`
- [FTP and FTPS](https://github.com/st0ff3l/fileterm/blob/main/apps/tauri/src-tauri/src/sessions/ftp/worker.rs): `apps/tauri/src-tauri/src/sessions/ftp/worker.rs`
- [Remote desktop](https://github.com/st0ff3l/fileterm/blob/main/apps/tauri/src-tauri/src/sessions/desktop/mod.rs): `apps/tauri/src-tauri/src/sessions/desktop/mod.rs`

### Backend services

- [Transfer tasks](https://github.com/st0ff3l/fileterm/blob/main/apps/tauri/src-tauri/src/services/transfers/runtime.rs): `apps/tauri/src-tauri/src/services/transfers/runtime.rs`
- [Connection operations](https://github.com/st0ff3l/fileterm/blob/main/apps/tauri/src-tauri/src/services/connection_operations.rs): `apps/tauri/src-tauri/src/services/connection_operations.rs`
- [Profile operations](https://github.com/st0ff3l/fileterm/blob/main/apps/tauri/src-tauri/src/services/profile_ops/profiles.rs): `apps/tauri/src-tauri/src/services/profile_ops/profiles.rs`
- [AI assistant](https://github.com/st0ff3l/fileterm/blob/main/apps/tauri/src-tauri/src/services/ai/chat_runtime.rs): `apps/tauri/src-tauri/src/services/ai/chat_runtime.rs`
- [MCP integration](https://github.com/st0ff3l/fileterm/blob/main/apps/tauri/src-tauri/src/services/mcp/runtime.rs): `apps/tauri/src-tauri/src/services/mcp/runtime.rs`
- [JSON persistence](https://github.com/st0ff3l/fileterm/blob/main/apps/tauri/src-tauri/src/storage/json_io.rs): `apps/tauri/src-tauri/src/storage/json_io.rs`

### Web edition

- [Web server](https://github.com/st0ff3l/fileterm/blob/main/apps/tauri/src-tauri/src/bin/fileterm_web.rs): `apps/tauri/src-tauri/src/bin/fileterm_web.rs`
- [Web login](https://github.com/st0ff3l/fileterm/blob/main/apps/tauri/src-tauri/src/web/login.rs): `apps/tauri/src-tauri/src/web/login.rs`
- [Web RPC](https://github.com/st0ff3l/fileterm/blob/main/apps/tauri/src-tauri/src/web/rpc/core.rs): `apps/tauri/src-tauri/src/web/rpc/core.rs`

### Other components

- **Developer or operator**
- **Browser user**

## Connections

- Developer or operator → Application shell: uses workspace (evidence: `README.md`)
- Application shell → Workspace tabs: shows workspace
- Developer or operator → Connection profiles: manages profiles (evidence: `README.md`)
- Connection profiles → Connection operations: configures connections
- Connection profiles → Profile operations: manages profiles
- Profile operations → JSON persistence: persists profiles
- Developer or operator → Workspace tabs: opens sessions (evidence: `README.md`)
- Workspace tabs → Terminal session: opens SSH terminal
- Workspace tabs → SSH and SFTP: opens SFTP (evidence: `README.md`)
- Workspace tabs → FTP and FTPS: opens FTP (evidence: `README.md`)
- Workspace tabs → Remote desktop: opens remote desktop
- File manager → Transfer tasks: manages transfers (evidence: `README.md`)
- File manager → SSH and SFTP: browses remote files (evidence: `README.md`)
- File manager → FTP and FTPS: browses remote files (evidence: `README.md`)
- Developer or operator → Proxy and routes: configures routes
- Developer or operator → SSH key manager: manages SSH keys
- Browser user → Web server: opens Web edition (evidence: `README.md`)
- Web server → Web login: authenticates users
- Web server → Web RPC: serves RPC
- Developer or operator → AI assistant: uses AI assistant
- Developer or operator → MCP integration: connects MCP client
