# alun-hub/sshs3 architecture

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

- Interactive diagram: https://gitdiagram.com/alun-hub/sshs3
- Repository: https://github.com/alun-hub/sshs3

## Overview

sshs3 is an Electron desktop client for SSH, SFTP, S3, and Kubernetes. Users choose or manage a connection, then work in terminal panes or the dual-pane file manager; file operations use storage providers and can include transfers, search, editing, and sync. Other major capabilities include smartcards and FIDO2, SSH certificates and tunnels, profiles, encrypted sync, and Team Vault. The graph emphasizes workflows supported by the README or source index; unsampled subsystems are represented without speculative call edges.

Main entry points: [`src/main/ssh/SSHPtyManager.ts`](https://github.com/alun-hub/sshs3/blob/master/src/main/ssh/SSHPtyManager.ts) (SSH sessions), [`src/renderer/src/components/FileManager/DualPaneExplorer.tsx`](https://github.com/alun-hub/sshs3/blob/master/src/renderer/src/components/FileManager/DualPaneExplorer.tsx) (Dual-pane manager), [`src/renderer/src/App.tsx`](https://github.com/alun-hub/sshs3/blob/master/src/renderer/src/App.tsx) (Application shell), [`src/main/ipc/storageHandlers.ts`](https://github.com/alun-hub/sshs3/blob/master/src/main/ipc/storageHandlers.ts) (Storage handlers)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Desktop experience"]
  node_app["Application shell<br/>[App.tsx]"]
  node_connections["Connection manager"]
  node_filemanager["Dual-pane manager"]
  node_terminal["Terminal panes<br/>[TerminalView.tsx]"]
  node_sessiontypes["Session model<br/>[session.ts]"]
end

subgraph group_bridge["IPC boundary"]
  node_preload["Preload API<br/>[index.ts]"]
  node_ipc["IPC bridge<br/>[IpcBridge.ts]"]
  node_storagehandlers["Storage handlers<br/>[storageHandlers.ts]"]
  node_ipctypes["IPC contracts<br/>[ipc.ts]"]
end

subgraph group_connect["Connections and security"]
  node_pty["SSH sessions<br/>[SSHPtyManager.ts]"]
  node_agentlife["Agent lifecycle"]
  node_agentregistry["Agent registry<br/>[AgentRegistry.ts]"]
  node_smartcard["Smartcard coordination"]
  node_askpass["Askpass service<br/>[AskpassServer.ts]"]
  node_fido["FIDO2 keys<br/>[Fido2KeyManager.ts]"]
  node_tunnels["SSH tunnels"]
  node_sshtypes["SSH profile model<br/>[ssh.ts]"]
end

subgraph group_files["Files and collaboration"]
  node_storageapi["Storage contract<br/>[StorageProvider.ts]"]
  node_s3["S3 provider"]
  node_sftp["SFTP provider"]
  node_transfer["Transfer pipeline"]
  node_search["Content search"]
  node_k8s["Kubernetes services"]
  node_sync["Profile sync"]
  node_teamvault["Team Vault"]
  node_storagetypes["Storage model<br/>[storage.ts]"]
end

node_user(("User"))

node_user -->|"uses"| node_app
node_app -->|"opens"| node_connections
node_connections -->|"saves profiles"| node_preload
node_preload -.->|"invokes"| node_ipc
node_ipc -.->|"routes storage"| node_storagehandlers
node_storagehandlers -->|"uses provider"| node_s3
node_storagehandlers -->|"uses contract"| node_storagetypes
node_storageapi -->|"defines"| node_storagetypes
node_s3 -->|"implements"| node_storageapi
node_sftp -->|"implements"| node_storageapi
node_filemanager -.->|"requests files"| node_preload
node_filemanager -.->|"transfers files"| node_transfer
node_filemanager -.->|"searches content"| node_search
node_terminal -.->|"starts sessions"| node_pty
node_pty -->|"manages agent"| node_agentlife
node_agentlife -->|"registers agents"| node_agentregistry
node_pty -->|"uses prompts"| node_askpass
node_tunnels -->|"uses prompts"| node_askpass
node_fido -->|"uses PIN prompts"| node_askpass
node_pty -->|"uses profiles"| node_sshtypes
node_app -->|"persists sessions"| node_sessiontypes
node_user -.->|"uses cluster tools"| node_k8s
node_user -.->|"opts into sync"| node_sync
node_user -.->|"manages vaults"| node_teamvault

click node_app "https://github.com/alun-hub/sshs3/blob/master/src/renderer/src/App.tsx"
click node_connections "https://github.com/alun-hub/sshs3/blob/master/src/renderer/src/components/ConnectionModal/ConnectionManagerModal.tsx"
click node_filemanager "https://github.com/alun-hub/sshs3/blob/master/src/renderer/src/components/FileManager/DualPaneExplorer.tsx"
click node_terminal "https://github.com/alun-hub/sshs3/blob/master/src/renderer/src/components/TerminalView.tsx"
click node_preload "https://github.com/alun-hub/sshs3/blob/master/src/preload/index.ts"
click node_ipc "https://github.com/alun-hub/sshs3/blob/master/src/main/IpcBridge.ts"
click node_storagehandlers "https://github.com/alun-hub/sshs3/blob/master/src/main/ipc/storageHandlers.ts"
click node_pty "https://github.com/alun-hub/sshs3/blob/master/src/main/ssh/SSHPtyManager.ts"
click node_agentlife "https://github.com/alun-hub/sshs3/blob/master/src/main/ssh/AgentLifecycleManager.ts"
click node_agentregistry "https://github.com/alun-hub/sshs3/blob/master/src/main/ssh/AgentRegistry.ts"
click node_smartcard "https://github.com/alun-hub/sshs3/blob/master/src/main/smartcard/SmartcardCoordinator.ts"
click node_askpass "https://github.com/alun-hub/sshs3/blob/master/src/main/smartcard/AskpassServer.ts"
click node_fido "https://github.com/alun-hub/sshs3/blob/master/src/main/smartcard/Fido2KeyManager.ts"
click node_tunnels "https://github.com/alun-hub/sshs3/blob/master/src/main/services/SSHTunnelManager.ts"
click node_storageapi "https://github.com/alun-hub/sshs3/blob/master/src/main/storage/StorageProvider.ts"
click node_s3 "https://github.com/alun-hub/sshs3/blob/master/src/main/storage/S3StorageProvider.ts"
click node_sftp "https://github.com/alun-hub/sshs3/blob/master/src/main/storage/SFTPStorageProvider.ts"
click node_transfer "https://github.com/alun-hub/sshs3/blob/master/src/main/transfer/TransferPipeline.ts"
click node_search "https://github.com/alun-hub/sshs3/blob/master/src/main/search/LocalContentSearchService.ts"
click node_k8s "https://github.com/alun-hub/sshs3/tree/master/src/main/services"
click node_sync "https://github.com/alun-hub/sshs3/blob/master/src/main/services/ProfileSyncService.ts"
click node_teamvault "https://github.com/alun-hub/sshs3/blob/master/src/main/services/TeamVaultService.ts"
click node_sessiontypes "https://github.com/alun-hub/sshs3/blob/master/src/shared/types/session.ts"
click node_sshtypes "https://github.com/alun-hub/sshs3/blob/master/src/shared/types/ssh.ts"
click node_storagetypes "https://github.com/alun-hub/sshs3/blob/master/src/shared/types/storage.ts"
click node_ipctypes "https://github.com/alun-hub/sshs3/blob/master/src/shared/types/ipc.ts"

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_connections,node_filemanager,node_terminal,node_sessiontypes,node_user toneBlue
class node_preload,node_ipc,node_storagehandlers,node_ipctypes toneAmber
class node_pty,node_agentlife,node_agentregistry,node_smartcard,node_askpass,node_fido,node_tunnels,node_sshtypes toneMint
class node_storageapi,node_s3,node_sftp,node_transfer,node_search,node_k8s,node_sync,node_teamvault,node_storagetypes toneRose
```

## Components

### Desktop experience

- [Application shell](https://github.com/alun-hub/sshs3/blob/master/src/renderer/src/App.tsx): `src/renderer/src/App.tsx`
- [Connection manager](https://github.com/alun-hub/sshs3/blob/master/src/renderer/src/components/ConnectionModal/ConnectionManagerModal.tsx): `src/renderer/src/components/ConnectionModal/ConnectionManagerModal.tsx`
- [Dual-pane manager](https://github.com/alun-hub/sshs3/blob/master/src/renderer/src/components/FileManager/DualPaneExplorer.tsx): `src/renderer/src/components/FileManager/DualPaneExplorer.tsx`
- [Terminal panes](https://github.com/alun-hub/sshs3/blob/master/src/renderer/src/components/TerminalView.tsx): `src/renderer/src/components/TerminalView.tsx`
- [Session model](https://github.com/alun-hub/sshs3/blob/master/src/shared/types/session.ts): `src/shared/types/session.ts`

### IPC boundary

- [Preload API](https://github.com/alun-hub/sshs3/blob/master/src/preload/index.ts): `src/preload/index.ts`
- [IPC bridge](https://github.com/alun-hub/sshs3/blob/master/src/main/IpcBridge.ts): `src/main/IpcBridge.ts`
- [Storage handlers](https://github.com/alun-hub/sshs3/blob/master/src/main/ipc/storageHandlers.ts): `src/main/ipc/storageHandlers.ts`
- [IPC contracts](https://github.com/alun-hub/sshs3/blob/master/src/shared/types/ipc.ts): `src/shared/types/ipc.ts`

### Connections and security

- [SSH sessions](https://github.com/alun-hub/sshs3/blob/master/src/main/ssh/SSHPtyManager.ts): `src/main/ssh/SSHPtyManager.ts`
- [Agent lifecycle](https://github.com/alun-hub/sshs3/blob/master/src/main/ssh/AgentLifecycleManager.ts): `src/main/ssh/AgentLifecycleManager.ts`
- [Agent registry](https://github.com/alun-hub/sshs3/blob/master/src/main/ssh/AgentRegistry.ts): `src/main/ssh/AgentRegistry.ts`
- [Smartcard coordination](https://github.com/alun-hub/sshs3/blob/master/src/main/smartcard/SmartcardCoordinator.ts): `src/main/smartcard/SmartcardCoordinator.ts`
- [Askpass service](https://github.com/alun-hub/sshs3/blob/master/src/main/smartcard/AskpassServer.ts): `src/main/smartcard/AskpassServer.ts`
- [FIDO2 keys](https://github.com/alun-hub/sshs3/blob/master/src/main/smartcard/Fido2KeyManager.ts): `src/main/smartcard/Fido2KeyManager.ts`
- [SSH tunnels](https://github.com/alun-hub/sshs3/blob/master/src/main/services/SSHTunnelManager.ts): `src/main/services/SSHTunnelManager.ts`
- [SSH profile model](https://github.com/alun-hub/sshs3/blob/master/src/shared/types/ssh.ts): `src/shared/types/ssh.ts`

### Files and collaboration

- [Storage contract](https://github.com/alun-hub/sshs3/blob/master/src/main/storage/StorageProvider.ts): `src/main/storage/StorageProvider.ts`
- [S3 provider](https://github.com/alun-hub/sshs3/blob/master/src/main/storage/S3StorageProvider.ts): `src/main/storage/S3StorageProvider.ts`
- [SFTP provider](https://github.com/alun-hub/sshs3/blob/master/src/main/storage/SFTPStorageProvider.ts): `src/main/storage/SFTPStorageProvider.ts`
- [Transfer pipeline](https://github.com/alun-hub/sshs3/blob/master/src/main/transfer/TransferPipeline.ts): `src/main/transfer/TransferPipeline.ts`
- [Content search](https://github.com/alun-hub/sshs3/blob/master/src/main/search/LocalContentSearchService.ts): `src/main/search/LocalContentSearchService.ts`
- [Kubernetes services](https://github.com/alun-hub/sshs3/tree/master/src/main/services): `src/main/services`
- [Profile sync](https://github.com/alun-hub/sshs3/blob/master/src/main/services/ProfileSyncService.ts): `src/main/services/ProfileSyncService.ts`
- [Team Vault](https://github.com/alun-hub/sshs3/blob/master/src/main/services/TeamVaultService.ts): `src/main/services/TeamVaultService.ts`
- [Storage model](https://github.com/alun-hub/sshs3/blob/master/src/shared/types/storage.ts): `src/shared/types/storage.ts`

### Other components

- **User**

## Connections

- User → Application shell: uses (evidence: `README.md`)
- Application shell → Connection manager: opens (evidence: `src/renderer/src/App.tsx`)
- Connection manager → Preload API: saves profiles (evidence: `src/renderer/src/components/ConnectionModal/ConnectionManagerModal.tsx`)
- Preload API → IPC bridge: invokes
- IPC bridge → Storage handlers: routes storage (evidence: `src/main/ipc/storageHandlers.ts`)
- Storage handlers → S3 provider: uses provider (evidence: `src/main/ipc/storageHandlers.ts`)
- Storage handlers → Storage model: uses contract (evidence: `src/main/ipc/storageHandlers.ts`)
- Storage contract → Storage model: defines (evidence: `src/main/storage/StorageProvider.ts`)
- S3 provider → Storage contract: implements (evidence: `src/main/storage/S3StorageProvider.ts`)
- SFTP provider → Storage contract: implements (evidence: `src/main/storage/SFTPStorageProvider.ts`)
- Dual-pane manager → Preload API: requests files
- Dual-pane manager → Transfer pipeline: transfers files
- Dual-pane manager → Content search: searches content
- Terminal panes → SSH sessions: starts sessions
- SSH sessions → Agent lifecycle: manages agent (evidence: `src/main/ssh/SSHPtyManager.ts`)
- Agent lifecycle → Agent registry: registers agents (evidence: `src/main/ssh/AgentLifecycleManager.ts`)
- SSH sessions → Askpass service: uses prompts (evidence: `src/main/ssh/SSHPtyManager.ts`)
- SSH tunnels → Askpass service: uses prompts (evidence: `src/main/services/SSHTunnelManager.ts`)
- FIDO2 keys → Askpass service: uses PIN prompts (evidence: `src/main/smartcard/Fido2KeyManager.ts`)
- SSH sessions → SSH profile model: uses profiles (evidence: `src/main/ssh/SSHPtyManager.ts`)
- Application shell → Session model: persists sessions (evidence: `src/renderer/src/App.tsx`)
- User → Kubernetes services: uses cluster tools (evidence: `README.md`)
- User → Profile sync: opts into sync (evidence: `README.md`)
- User → Team Vault: manages vaults (evidence: `README.md`)
