# wolfarkane/istir-iris-gui architecture

> Architecture diagram of the GitHub repository wolfarkane/istir-iris-gui, 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/wolfarkane/istir-iris-gui
- Repository: https://github.com/wolfarkane/istir-iris-gui

## Overview

ISTIR-IRIS is a desktop interface for reaching ISTIC/ESIR workstations. The user selects a room and computer, enters SSH credentials, then uses an interactive terminal and an SFTP file browser in the same window; a background watcher reports VPN availability. The graph also preserves the documented theme and responsive-layout capabilities. The README and sampled files support the main launch, SSH, SFTP, and VPN relationships; wiring for unsampled frontend modules and the CombinedAPI implementation is shown only where documented or directly evidenced.

Main entry points: [`api/api.py`](https://github.com/wolfarkane/istir-iris-gui/blob/main/api/api.py) (Combined API bridge), [`frontend/js/ui/salles-form.js`](https://github.com/wolfarkane/istir-iris-gui/blob/main/frontend/js/ui/salles-form.js) (Room and host selection), [`frontend/js/api/sshApi.js`](https://github.com/wolfarkane/istir-iris-gui/blob/main/frontend/js/api/sshApi.js) (SSH API client), [`main.py`](https://github.com/wolfarkane/istir-iris-gui/blob/main/main.py) (Desktop launcher)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_desktop["Desktop shell"]
  node_main["Desktop launcher<br/>[main.py]"]
  node_window["Webview window"]
  node_ui["Application UI<br/>[index.html]"]
  node_bridge["Combined API bridge<br/>[api.py]"]
end

subgraph group_connection["Connection setup"]
  node_roomform["Room and host selection<br/>[salles-form.js]"]
  node_roomdata["Room configuration<br/>[salles.json]"]
  node_roomapi["Room API<br/>[sallesApi.js]"]
  node_vpn["VPN watcher<br/>[vpnApi.py]"]
  node_vpnstatus["VPN status UI<br/>[vpn-status.js]"]
end

subgraph group_remote["Remote access"]
  node_sshui["SSH API client<br/>[sshApi.js]"]
  node_ssh["SSH and PTY<br/>[sshAPI.py]"]
  node_terminal["Interactive terminal<br/>[terminal.js]"]
  node_sftpui["SFTP API client<br/>[sftpApi.js]"]
  node_sftp["SFTP operations<br/>[sftpApi.py]"]
  node_browser["SFTP file browser<br/>[sftp-panel.js]"]
end

subgraph group_interface["Interface features"]
  node_theme["Theme toggle<br/>[theme.js]"]
  node_layout["Responsive layout<br/>[layout.js]"]
  node_state["UI state<br/>[state.js]"]
end

node_user(("User"))
node_host(("Remote workstation"))
node_localfiles[("Local files")]

node_user -->|"selects target"| node_roomform
node_main -->|"creates API"| node_bridge
node_main -->|"opens window"| node_window
node_main -->|"starts watcher"| node_vpn
node_window -->|"loads interface"| node_ui
node_window -->|"exposes API"| node_bridge
node_ui -->|"hosts form"| node_roomform
node_roomform -->|"loads rooms"| node_roomapi
node_roomapi -->|"calls API"| node_bridge
node_roomdata -->|"room source"| node_roomapi
node_vpn -->|"pushes status"| node_vpnstatus
node_user -->|"submits credentials"| node_sshui
node_roomform -->|"requests connection"| node_sshui
node_sshui -->|"calls API"| node_bridge
node_bridge -->|"dispatches SSH"| node_ssh
node_ssh -->|"opens SSH and PTY"| node_host
node_ssh -->|"streams terminal output"| node_terminal
node_terminal -->|"sends input and resize"| node_sshui
node_user -->|"browses files"| node_browser
node_browser -->|"lists and transfers"| node_sftpui
node_sftpui -->|"calls API"| node_bridge
node_bridge -->|"dispatches SFTP"| node_sftp
node_sftp -->|"reads and writes"| node_host
node_sftp -->|"downloads and uploads"| node_localfiles
node_user -->|"changes theme"| node_theme
node_user -->|"toggles navigation"| node_layout
node_ui -->|"uses state"| node_state

click node_main "https://github.com/wolfarkane/istir-iris-gui/blob/main/main.py"
click node_ui "https://github.com/wolfarkane/istir-iris-gui/blob/main/frontend/index.html"
click node_bridge "https://github.com/wolfarkane/istir-iris-gui/blob/main/api/api.py"
click node_roomform "https://github.com/wolfarkane/istir-iris-gui/blob/main/frontend/js/ui/salles-form.js"
click node_roomdata "https://github.com/wolfarkane/istir-iris-gui/blob/main/data/salles.json"
click node_roomapi "https://github.com/wolfarkane/istir-iris-gui/blob/main/frontend/js/api/sallesApi.js"
click node_vpn "https://github.com/wolfarkane/istir-iris-gui/blob/main/api/vpnApi.py"
click node_vpnstatus "https://github.com/wolfarkane/istir-iris-gui/blob/main/frontend/js/ui/vpn-status.js"
click node_sshui "https://github.com/wolfarkane/istir-iris-gui/blob/main/frontend/js/api/sshApi.js"
click node_ssh "https://github.com/wolfarkane/istir-iris-gui/blob/main/api/sshAPI.py"
click node_terminal "https://github.com/wolfarkane/istir-iris-gui/blob/main/frontend/js/ui/terminal.js"
click node_sftpui "https://github.com/wolfarkane/istir-iris-gui/blob/main/frontend/js/api/sftpApi.js"
click node_sftp "https://github.com/wolfarkane/istir-iris-gui/blob/main/api/sftpApi.py"
click node_browser "https://github.com/wolfarkane/istir-iris-gui/blob/main/frontend/js/ui/sftp-panel.js"
click node_theme "https://github.com/wolfarkane/istir-iris-gui/blob/main/frontend/js/theme.js"
click node_layout "https://github.com/wolfarkane/istir-iris-gui/blob/main/frontend/js/layout.js"
click node_state "https://github.com/wolfarkane/istir-iris-gui/blob/main/frontend/js/state.js"

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_main,node_window,node_ui,node_bridge,node_user toneBlue
class node_roomform,node_roomdata,node_roomapi,node_vpn,node_vpnstatus,node_localfiles toneAmber
class node_sshui,node_ssh,node_terminal,node_sftpui,node_sftp,node_browser toneMint
class node_theme,node_layout,node_state toneRose
class node_host toneIndigo
```

## Components

### Desktop shell

- [Desktop launcher](https://github.com/wolfarkane/istir-iris-gui/blob/main/main.py): `main.py`
- **Webview window**
- [Application UI](https://github.com/wolfarkane/istir-iris-gui/blob/main/frontend/index.html): `frontend/index.html`
- [Combined API bridge](https://github.com/wolfarkane/istir-iris-gui/blob/main/api/api.py): `api/api.py`

### Connection setup

- [Room and host selection](https://github.com/wolfarkane/istir-iris-gui/blob/main/frontend/js/ui/salles-form.js): `frontend/js/ui/salles-form.js`
- [Room configuration](https://github.com/wolfarkane/istir-iris-gui/blob/main/data/salles.json): `data/salles.json`
- [Room API](https://github.com/wolfarkane/istir-iris-gui/blob/main/frontend/js/api/sallesApi.js): `frontend/js/api/sallesApi.js`
- [VPN watcher](https://github.com/wolfarkane/istir-iris-gui/blob/main/api/vpnApi.py): `api/vpnApi.py`
- [VPN status UI](https://github.com/wolfarkane/istir-iris-gui/blob/main/frontend/js/ui/vpn-status.js): `frontend/js/ui/vpn-status.js`

### Remote access

- [SSH API client](https://github.com/wolfarkane/istir-iris-gui/blob/main/frontend/js/api/sshApi.js): `frontend/js/api/sshApi.js`
- [SSH and PTY](https://github.com/wolfarkane/istir-iris-gui/blob/main/api/sshAPI.py): `api/sshAPI.py`
- [Interactive terminal](https://github.com/wolfarkane/istir-iris-gui/blob/main/frontend/js/ui/terminal.js): `frontend/js/ui/terminal.js`
- [SFTP API client](https://github.com/wolfarkane/istir-iris-gui/blob/main/frontend/js/api/sftpApi.js): `frontend/js/api/sftpApi.js`
- [SFTP operations](https://github.com/wolfarkane/istir-iris-gui/blob/main/api/sftpApi.py): `api/sftpApi.py`
- [SFTP file browser](https://github.com/wolfarkane/istir-iris-gui/blob/main/frontend/js/ui/sftp-panel.js): `frontend/js/ui/sftp-panel.js`

### Interface features

- [Theme toggle](https://github.com/wolfarkane/istir-iris-gui/blob/main/frontend/js/theme.js): `frontend/js/theme.js`
- [Responsive layout](https://github.com/wolfarkane/istir-iris-gui/blob/main/frontend/js/layout.js): `frontend/js/layout.js`
- [UI state](https://github.com/wolfarkane/istir-iris-gui/blob/main/frontend/js/state.js): `frontend/js/state.js`

### Other components

- **User**
- **Remote workstation**
- **Local files**

## Connections

- User → Room and host selection: selects target
- Desktop launcher → Combined API bridge: creates API
- Desktop launcher → Webview window: opens window
- Desktop launcher → VPN watcher: starts watcher
- Webview window → Application UI: loads interface
- Webview window → Combined API bridge: exposes API
- Application UI → Room and host selection: hosts form
- Room and host selection → Room API: loads rooms
- Room API → Combined API bridge: calls API
- Room configuration → Room API: room source
- VPN watcher → VPN status UI: pushes status
- User → SSH API client: submits credentials
- Room and host selection → SSH API client: requests connection
- SSH API client → Combined API bridge: calls API
- Combined API bridge → SSH and PTY: dispatches SSH
- SSH and PTY → Remote workstation: opens SSH and PTY
- SSH and PTY → Interactive terminal: streams terminal output
- Interactive terminal → SSH API client: sends input and resize
- User → SFTP file browser: browses files
- SFTP file browser → SFTP API client: lists and transfers
- SFTP API client → Combined API bridge: calls API
- Combined API bridge → SFTP operations: dispatches SFTP
- SFTP operations → Remote workstation: reads and writes
- SFTP operations → Local files: downloads and uploads
- User → Theme toggle: changes theme
- User → Responsive layout: toggles navigation
- Application UI → UI state: uses state
