# parkhw328/wook-shell architecture

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

- Interactive diagram: https://gitdiagram.com/parkhw328/wook-shell
- Repository: https://github.com/parkhw328/wook-shell

## Overview

wShell is a native multi-platform SSH terminal and SFTP workspace, with the README describing Windows and macOS as supported products and an iPad preview as a separate, currently paused build. The main workflow is selecting or entering a host, establishing a trusted authenticated connection, then using terminal tabs and split panes or an SFTP browser for remote files. The graph preserves documented key management, backups, host settings, and workspace input features. Some Windows and iPad subsystem links are documented but their implementation excerpts were not supplied.

Main entry points: [`src/main.cpp`](https://github.com/parkhw328/wook-shell/blob/main/src/main.cpp) (Windows app), [`mac/Sources/WShell/Workspace.swift`](https://github.com/parkhw328/wook-shell/blob/main/mac/Sources/WShell/Workspace.swift) (Workspace), [`ios/App.swift`](https://github.com/parkhw328/wook-shell/blob/main/ios/App.swift) (iPad app), [`ios/Files.swift`](https://github.com/parkhw328/wook-shell/blob/main/ios/Files.swift) (File browser)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_win["Windows workspace"]
  node_winapp["Windows app<br/>[main.cpp]"]
  node_winhosts[("Host profiles<br/>[core.cpp]")]
  node_winsettings["Host settings<br/>[settings_ui.cpp]"]
  node_winssh["SSH sessions<br/>[launch.cpp]"]
  node_winterm["Terminal panes<br/>[main.cpp]"]
  node_winsftp["SFTP browser<br/>[sftp_view.cpp]"]
  node_winbackup["Settings backup<br/>[backup.cpp]"]
  node_winkeys["Key management<br/>[key_dialog.cpp]"]
  node_winrelay["SSH launch relay<br/>[launch_relay.cpp]"]
end

subgraph group_mac["macOS workspace"]
  node_macapp["macOS app<br/>[main.swift]"]
  node_macworkspace["Workspace<br/>[Workspace.swift]"]
  node_macsettings[("Host settings<br/>[Settings.swift]")]
  node_mactrust[("Host trust<br/>[HostTrust.swift]")]
  node_macterminal["Terminal sessions<br/>[Terminal.swift]"]
  node_macsplit["Split layout<br/>[SplitLayout.swift]"]
  node_macsftpui["SFTP browser<br/>[SftpBrowser.swift]"]
  node_macsftp["SFTP client<br/>[SftpClient.swift]"]
  node_macheditor["Host editor<br/>[HostEditor.swift]"]
  node_macsettingsui[("Settings store<br/>[Settings.swift]")]
end

subgraph group_ipad["iPad preview"]
  node_ipadapp["iPad app<br/>[App.swift]"]
  node_ipadssh["SSH connection<br/>[Connection.swift]"]
  node_ipadfiles["File browser<br/>[Files.swift]"]
  node_ipadclient["SFTP client<br/>[FileClient.swift]"]
  node_ipadstore[("Host store<br/>[Storage.swift]")]
end

subgraph group_shared["Shared capabilities"]
end

node_user(("User"))
node_remote{{"SSH server"}}
node_shell{{"Remote shell"}}
node_localfiles[("Local files")]

node_user -->|"starts and uses"| node_winapp
node_winapp -->|"loads profiles"| node_winhosts
node_winapp -->|"opens settings"| node_winsettings
node_winapp -->|"starts sessions"| node_winssh
node_winapp -->|"manages panes"| node_winterm
node_winapp -->|"opens SFTP"| node_winsftp
node_winapp -->|"imports and exports"| node_winbackup
node_winapp -->|"opens key manager"| node_winkeys
node_winapp -.->|"routes launch"| node_winrelay
node_winsettings -->|"edits profiles"| node_winhosts
node_winssh -.->|"connects"| node_remote
node_winterm -.->|"renders session"| node_shell
node_user -->|"starts and uses"| node_macapp
node_macapp -->|"opens workspace"| node_macworkspace
node_macworkspace -->|"loads host records"| node_macsettings
node_macworkspace -->|"lays out panes"| node_macsplit
node_macworkspace -.->|"manages sessions"| node_macterminal
node_macworkspace -->|"opens file browser"| node_macsftpui
node_macworkspace -->|"checks host keys"| node_mactrust
node_macworkspace -.->|"edits hosts"| node_macheditor
node_macsftpui -->|"uses client"| node_macsftp
node_macsftp -.->|"transfers files"| node_remote
node_macterminal -.->|"opens SSH"| node_remote
node_user -->|"uses preview"| node_ipadapp
node_ipadapp -->|"starts connection"| node_ipadssh
node_ipadapp -->|"loads and backs up"| node_ipadstore
node_ipadapp -->|"opens file browser"| node_ipadfiles
node_ipadssh -.->|"authenticates"| node_remote
node_ipadfiles -->|"lists and transfers"| node_ipadclient
node_ipadclient -->|"uses connection"| node_ipadssh
node_ipadclient -.->|"runs SFTP"| node_remote
node_ipadfiles -->|"imports and exports"| node_localfiles

click node_winapp "https://github.com/parkhw328/wook-shell/blob/main/src/main.cpp"
click node_winhosts "https://github.com/parkhw328/wook-shell/blob/main/src/core.cpp"
click node_winsettings "https://github.com/parkhw328/wook-shell/blob/main/src/settings_ui.cpp"
click node_winssh "https://github.com/parkhw328/wook-shell/blob/main/src/launch.cpp"
click node_winterm "https://github.com/parkhw328/wook-shell/blob/main/src/main.cpp"
click node_winsftp "https://github.com/parkhw328/wook-shell/blob/main/src/sftp_view.cpp"
click node_winbackup "https://github.com/parkhw328/wook-shell/blob/main/src/backup.cpp"
click node_winkeys "https://github.com/parkhw328/wook-shell/blob/main/src/key_dialog.cpp"
click node_winrelay "https://github.com/parkhw328/wook-shell/blob/main/src/launch_relay.cpp"
click node_macapp "https://github.com/parkhw328/wook-shell/blob/main/mac/Sources/WShell/main.swift"
click node_macworkspace "https://github.com/parkhw328/wook-shell/blob/main/mac/Sources/WShell/Workspace.swift"
click node_macsettings "https://github.com/parkhw328/wook-shell/blob/main/mac/Sources/WShellCore/Settings.swift"
click node_mactrust "https://github.com/parkhw328/wook-shell/blob/main/mac/Sources/WShellCore/HostTrust.swift"
click node_macterminal "https://github.com/parkhw328/wook-shell/blob/main/mac/Sources/WShell/Terminal.swift"
click node_macsplit "https://github.com/parkhw328/wook-shell/blob/main/mac/Sources/WShellCore/SplitLayout.swift"
click node_macsftpui "https://github.com/parkhw328/wook-shell/blob/main/mac/Sources/WShell/SftpBrowser.swift"
click node_macsftp "https://github.com/parkhw328/wook-shell/blob/main/mac/Sources/WShell/SftpClient.swift"
click node_macheditor "https://github.com/parkhw328/wook-shell/blob/main/mac/Sources/WShell/HostEditor.swift"
click node_macsettingsui "https://github.com/parkhw328/wook-shell/blob/main/mac/Sources/WShellCore/Settings.swift"
click node_ipadapp "https://github.com/parkhw328/wook-shell/blob/main/ios/App.swift"
click node_ipadssh "https://github.com/parkhw328/wook-shell/blob/main/ios/Connection.swift"
click node_ipadfiles "https://github.com/parkhw328/wook-shell/blob/main/ios/Files.swift"
click node_ipadclient "https://github.com/parkhw328/wook-shell/blob/main/ios/FileClient.swift"
click node_ipadstore "https://github.com/parkhw328/wook-shell/blob/main/ios/Storage.swift"

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_winapp,node_winhosts,node_winsettings,node_winssh,node_winterm,node_winsftp,node_winbackup,node_winkeys,node_winrelay,node_user toneBlue
class node_macapp,node_macworkspace,node_macsettings,node_mactrust,node_macterminal,node_macsplit,node_macsftpui,node_macsftp,node_macheditor,node_macsettingsui,node_localfiles toneAmber
class node_ipadapp,node_ipadssh,node_ipadfiles,node_ipadclient,node_ipadstore,node_remote toneMint
class node_shell toneIndigo
```

## Components

### Windows workspace

- [Windows app](https://github.com/parkhw328/wook-shell/blob/main/src/main.cpp): `src/main.cpp`
- [Host profiles](https://github.com/parkhw328/wook-shell/blob/main/src/core.cpp): `src/core.cpp`
- [Host settings](https://github.com/parkhw328/wook-shell/blob/main/src/settings_ui.cpp): `src/settings_ui.cpp`
- [SSH sessions](https://github.com/parkhw328/wook-shell/blob/main/src/launch.cpp): `src/launch.cpp`
- [Terminal panes](https://github.com/parkhw328/wook-shell/blob/main/src/main.cpp): `src/main.cpp`
- [SFTP browser](https://github.com/parkhw328/wook-shell/blob/main/src/sftp_view.cpp): `src/sftp_view.cpp`
- [Settings backup](https://github.com/parkhw328/wook-shell/blob/main/src/backup.cpp): `src/backup.cpp`
- [Key management](https://github.com/parkhw328/wook-shell/blob/main/src/key_dialog.cpp): `src/key_dialog.cpp`
- [SSH launch relay](https://github.com/parkhw328/wook-shell/blob/main/src/launch_relay.cpp): `src/launch_relay.cpp`

### macOS workspace

- [macOS app](https://github.com/parkhw328/wook-shell/blob/main/mac/Sources/WShell/main.swift): `mac/Sources/WShell/main.swift`
- [Workspace](https://github.com/parkhw328/wook-shell/blob/main/mac/Sources/WShell/Workspace.swift): `mac/Sources/WShell/Workspace.swift`
- [Host settings](https://github.com/parkhw328/wook-shell/blob/main/mac/Sources/WShellCore/Settings.swift): `mac/Sources/WShellCore/Settings.swift`
- [Host trust](https://github.com/parkhw328/wook-shell/blob/main/mac/Sources/WShellCore/HostTrust.swift): `mac/Sources/WShellCore/HostTrust.swift`
- [Terminal sessions](https://github.com/parkhw328/wook-shell/blob/main/mac/Sources/WShell/Terminal.swift): `mac/Sources/WShell/Terminal.swift`
- [Split layout](https://github.com/parkhw328/wook-shell/blob/main/mac/Sources/WShellCore/SplitLayout.swift): `mac/Sources/WShellCore/SplitLayout.swift`
- [SFTP browser](https://github.com/parkhw328/wook-shell/blob/main/mac/Sources/WShell/SftpBrowser.swift): `mac/Sources/WShell/SftpBrowser.swift`
- [SFTP client](https://github.com/parkhw328/wook-shell/blob/main/mac/Sources/WShell/SftpClient.swift): `mac/Sources/WShell/SftpClient.swift`
- [Host editor](https://github.com/parkhw328/wook-shell/blob/main/mac/Sources/WShell/HostEditor.swift): `mac/Sources/WShell/HostEditor.swift`
- [Settings store](https://github.com/parkhw328/wook-shell/blob/main/mac/Sources/WShellCore/Settings.swift): `mac/Sources/WShellCore/Settings.swift`

### iPad preview

- [iPad app](https://github.com/parkhw328/wook-shell/blob/main/ios/App.swift): `ios/App.swift`
- [SSH connection](https://github.com/parkhw328/wook-shell/blob/main/ios/Connection.swift): `ios/Connection.swift`
- [File browser](https://github.com/parkhw328/wook-shell/blob/main/ios/Files.swift): `ios/Files.swift`
- [SFTP client](https://github.com/parkhw328/wook-shell/blob/main/ios/FileClient.swift): `ios/FileClient.swift`
- [Host store](https://github.com/parkhw328/wook-shell/blob/main/ios/Storage.swift): `ios/Storage.swift`

### Other components

- **User**
- **SSH server**
- **Remote shell**
- **Local files**

## Connections

- User → Windows app: starts and uses (evidence: `README.md`)
- Windows app → Host profiles: loads profiles
- Windows app → Host settings: opens settings (evidence: `src/main.cpp`)
- Windows app → SSH sessions: starts sessions (evidence: `src/main.cpp`)
- Windows app → Terminal panes: manages panes (evidence: `src/main.cpp`)
- Windows app → SFTP browser: opens SFTP (evidence: `src/main.cpp`)
- Windows app → Settings backup: imports and exports (evidence: `src/main.cpp`)
- Windows app → Key management: opens key manager (evidence: `src/main.cpp`)
- Windows app → SSH launch relay: routes launch
- Host settings → Host profiles: edits profiles (evidence: `src/settings_ui.cpp`)
- SSH sessions → SSH server: connects
- Terminal panes → Remote shell: renders session
- User → macOS app: starts and uses (evidence: `README.md`)
- macOS app → Workspace: opens workspace (evidence: `mac/Sources/WShell/main.swift`)
- Workspace → Host settings: loads host records (evidence: `mac/Sources/WShell/Workspace.swift`)
- Workspace → Split layout: lays out panes (evidence: `mac/Sources/WShell/Workspace.swift`)
- Workspace → Terminal sessions: manages sessions
- Workspace → SFTP browser: opens file browser (evidence: `mac/Sources/WShell/Workspace.swift`)
- Workspace → Host trust: checks host keys (evidence: `mac/Sources/WShell/Workspace.swift`)
- Workspace → Host editor: edits hosts
- SFTP browser → SFTP client: uses client (evidence: `mac/Sources/WShell/SftpBrowser.swift`)
- SFTP client → SSH server: transfers files
- Terminal sessions → SSH server: opens SSH
- User → iPad app: uses preview (evidence: `README.md`)
- iPad app → SSH connection: starts connection (evidence: `ios/App.swift`)
- iPad app → Host store: loads and backs up (evidence: `ios/App.swift`)
- iPad app → File browser: opens file browser (evidence: `ios/App.swift`)
- SSH connection → SSH server: authenticates
- File browser → SFTP client: lists and transfers (evidence: `ios/Files.swift`)
- SFTP client → SSH connection: uses connection (evidence: `ios/FileClient.swift`)
- SFTP client → SSH server: runs SFTP
- File browser → Local files: imports and exports (evidence: `ios/Files.swift`)
