# gnmyt/nexterm architecture

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

- Interactive diagram: https://gitdiagram.com/gnmyt/nexterm
- Repository: https://github.com/gnmyt/nexterm
- Video tour (about a minute): https://gitdiagram.com/gnmyt/nexterm/video

## Overview

Nexterm is a server-management platform: users organize server connections, launch remote sessions, and operate on remote hosts through terminal, desktop, and SFTP interfaces. The web client communicates with the server API; the server registers engines and relays engine operations, while the engine provides remote execution and connection capabilities. The README also documents Docker deployment and Proxmox management, but the supplied tree and excerpts do not expose their implementation details. Edges are limited to relationships supported by the supplied source or README; many backend runtime paths were not sampled.

Main entry points: [`server/routes/engine.js`](https://github.com/gnmyt/nexterm/blob/main/server/routes/engine.js) (HTTP API), [`engine/src/main.c`](https://github.com/gnmyt/nexterm/blob/main/engine/src/main.c) (Nexterm engine), [`client/src/App.jsx`](https://github.com/gnmyt/nexterm/blob/main/client/src/App.jsx) (Application shell), [`client/src/pages/Servers/Servers.jsx`](https://github.com/gnmyt/nexterm/blob/main/client/src/pages/Servers/Servers.jsx) (Server workspace)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Web client"]
  node_app["Application shell<br/>[App.jsx]"]
  node_servers["Server workspace<br/>[Servers.jsx]"]
  node_sessions["Session views<br/>[ViewContainer.jsx]"]
  node_terminal["Terminal renderer<br/>[XtermRenderer.jsx]"]
  node_desktop["Desktop renderer"]
  node_files["SFTP file manager<br/>[FileRenderer.jsx]"]
  node_monitoring["Monitoring<br/>[Monitoring.jsx]"]
  node_audit["Audit and recordings<br/>[Audit.jsx]"]
  node_snippets["Scripts and snippets<br/>[Snippets.jsx]"]
  node_settings["Administration<br/>[Engines.jsx]"]
end

subgraph group_server["Server control plane"]
  node_api["HTTP API<br/>[engine.js]"]
  node_engine_ops["Engine management<br/>[engine.js]"]
  node_engine_store[("Engine registrations<br/>[Engine.js]")]
  node_permissions["Access control<br/>[engine.js]"]
  node_control["Control plane"]
  node_sftp_client["Engine SFTP client"]
  node_fetch["Engine HTTP relay<br/>[engineFetch.js]"]
end

subgraph group_engine["Remote engine"]
  node_engine["Nexterm engine<br/>[main.c]"]
  node_engine_session["Session manager<br/>[session.c]"]
  node_engine_connection["Remote connection<br/>[connection.c]"]
  node_engine_sftp["SFTP protocol<br/>[sftp.c]"]
  node_engine_ftp["FTP protocol<br/>[ftp.c]"]
  node_engine_file["File protocol<br/>[file_proto.c]"]
end

subgraph group_remote["Remote operations"]
  node_host(("Managed servers"))
  node_proxmox(("Proxmox hosts"))
end

node_user(("User"))

node_user -->|"uses"| node_app
node_app -->|"opens"| node_servers
node_servers -->|"opens sessions"| node_sessions
node_user -->|"views"| node_monitoring
node_user -->|"reviews"| node_audit
node_user -->|"manages"| node_snippets
node_user -->|"administers"| node_settings
node_settings -->|"requests engines"| node_api
node_api -->|"invokes"| node_engine_ops
node_engine_ops -->|"reads and writes"| node_engine_store
node_api -->|"queries status"| node_control
node_control -->|"communicates"| node_engine
node_engine -->|"manages sessions"| node_engine_session
node_sessions -->|"remote session"| node_control
node_terminal -->|"terminal traffic"| node_control
node_desktop -->|"desktop traffic"| node_control
node_files -->|"file requests"| node_sftp_client
node_sftp_client -->|"uses relay"| node_control
node_control -->|"dispatches requests"| node_engine
node_engine_session -->|"opens connections"| node_engine_connection
node_engine_connection -->|"connects remotely"| node_host
node_engine_sftp -->|"transfers files"| node_host
node_engine_ftp -->|"transfers files"| node_host
node_engine_file -->|"handles file protocol"| node_host
node_fetch -->|"relays HTTP"| node_control
node_control -.->|"Proxmox management"| node_proxmox

click node_app "https://github.com/gnmyt/nexterm/blob/main/client/src/App.jsx"
click node_servers "https://github.com/gnmyt/nexterm/blob/main/client/src/pages/Servers/Servers.jsx"
click node_sessions "https://github.com/gnmyt/nexterm/blob/main/client/src/pages/Servers/components/ViewContainer/ViewContainer.jsx"
click node_terminal "https://github.com/gnmyt/nexterm/blob/main/client/src/pages/Servers/components/ViewContainer/renderer/XtermRenderer.jsx"
click node_desktop "https://github.com/gnmyt/nexterm/blob/main/client/src/pages/Servers/components/ViewContainer/renderer/GuacamoleRenderer.jsx"
click node_files "https://github.com/gnmyt/nexterm/blob/main/client/src/pages/Servers/components/ViewContainer/renderer/FileRenderer/FileRenderer.jsx"
click node_monitoring "https://github.com/gnmyt/nexterm/blob/main/client/src/pages/Monitoring/Monitoring.jsx"
click node_audit "https://github.com/gnmyt/nexterm/blob/main/client/src/pages/Audit/Audit.jsx"
click node_snippets "https://github.com/gnmyt/nexterm/blob/main/client/src/pages/Snippets/Snippets.jsx"
click node_settings "https://github.com/gnmyt/nexterm/blob/main/client/src/pages/Settings/pages/Engines/Engines.jsx"
click node_api "https://github.com/gnmyt/nexterm/blob/main/server/routes/engine.js"
click node_engine_ops "https://github.com/gnmyt/nexterm/blob/main/server/controllers/engine.js"
click node_engine_store "https://github.com/gnmyt/nexterm/blob/main/server/models/Engine.js"
click node_permissions "https://github.com/gnmyt/nexterm/blob/main/server/permissions/engine.js"
click node_sftp_client "https://github.com/gnmyt/nexterm/blob/main/server/lib/EngineSftpClient.js"
click node_fetch "https://github.com/gnmyt/nexterm/blob/main/server/lib/engineFetch.js"
click node_engine "https://github.com/gnmyt/nexterm/blob/main/engine/src/main.c"
click node_engine_session "https://github.com/gnmyt/nexterm/blob/main/engine/src/core/session.c"
click node_engine_connection "https://github.com/gnmyt/nexterm/blob/main/engine/src/net/connection.c"
click node_engine_sftp "https://github.com/gnmyt/nexterm/blob/main/engine/src/net/sftp.c"
click node_engine_ftp "https://github.com/gnmyt/nexterm/blob/main/engine/src/net/ftp.c"
click node_engine_file "https://github.com/gnmyt/nexterm/blob/main/engine/src/net/file_proto.c"

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_servers,node_sessions,node_terminal,node_desktop,node_files,node_monitoring,node_audit,node_snippets,node_settings,node_user toneBlue
class node_api,node_engine_ops,node_engine_store,node_permissions,node_control,node_sftp_client,node_fetch toneAmber
class node_engine,node_engine_session,node_engine_connection,node_engine_sftp,node_engine_ftp,node_engine_file toneMint
class node_host,node_proxmox toneRose
```

## Components

### Web client

- [Application shell](https://github.com/gnmyt/nexterm/blob/main/client/src/App.jsx): `client/src/App.jsx`
- [Server workspace](https://github.com/gnmyt/nexterm/blob/main/client/src/pages/Servers/Servers.jsx): `client/src/pages/Servers/Servers.jsx`
- [Session views](https://github.com/gnmyt/nexterm/blob/main/client/src/pages/Servers/components/ViewContainer/ViewContainer.jsx): `client/src/pages/Servers/components/ViewContainer/ViewContainer.jsx`
- [Terminal renderer](https://github.com/gnmyt/nexterm/blob/main/client/src/pages/Servers/components/ViewContainer/renderer/XtermRenderer.jsx): `client/src/pages/Servers/components/ViewContainer/renderer/XtermRenderer.jsx`
- [Desktop renderer](https://github.com/gnmyt/nexterm/blob/main/client/src/pages/Servers/components/ViewContainer/renderer/GuacamoleRenderer.jsx): `client/src/pages/Servers/components/ViewContainer/renderer/GuacamoleRenderer.jsx`
- [SFTP file manager](https://github.com/gnmyt/nexterm/blob/main/client/src/pages/Servers/components/ViewContainer/renderer/FileRenderer/FileRenderer.jsx): `client/src/pages/Servers/components/ViewContainer/renderer/FileRenderer/FileRenderer.jsx`
- [Monitoring](https://github.com/gnmyt/nexterm/blob/main/client/src/pages/Monitoring/Monitoring.jsx): `client/src/pages/Monitoring/Monitoring.jsx`
- [Audit and recordings](https://github.com/gnmyt/nexterm/blob/main/client/src/pages/Audit/Audit.jsx): `client/src/pages/Audit/Audit.jsx`
- [Scripts and snippets](https://github.com/gnmyt/nexterm/blob/main/client/src/pages/Snippets/Snippets.jsx): `client/src/pages/Snippets/Snippets.jsx`
- [Administration](https://github.com/gnmyt/nexterm/blob/main/client/src/pages/Settings/pages/Engines/Engines.jsx): `client/src/pages/Settings/pages/Engines/Engines.jsx`

### Server control plane

- [HTTP API](https://github.com/gnmyt/nexterm/blob/main/server/routes/engine.js): `server/routes/engine.js`
- [Engine management](https://github.com/gnmyt/nexterm/blob/main/server/controllers/engine.js): `server/controllers/engine.js`
- [Engine registrations](https://github.com/gnmyt/nexterm/blob/main/server/models/Engine.js): `server/models/Engine.js`
- [Access control](https://github.com/gnmyt/nexterm/blob/main/server/permissions/engine.js): `server/permissions/engine.js`
- **Control plane**
- [Engine SFTP client](https://github.com/gnmyt/nexterm/blob/main/server/lib/EngineSftpClient.js): `server/lib/EngineSftpClient.js`
- [Engine HTTP relay](https://github.com/gnmyt/nexterm/blob/main/server/lib/engineFetch.js): `server/lib/engineFetch.js`

### Remote engine

- [Nexterm engine](https://github.com/gnmyt/nexterm/blob/main/engine/src/main.c): `engine/src/main.c`
- [Session manager](https://github.com/gnmyt/nexterm/blob/main/engine/src/core/session.c): `engine/src/core/session.c`
- [Remote connection](https://github.com/gnmyt/nexterm/blob/main/engine/src/net/connection.c): `engine/src/net/connection.c`
- [SFTP protocol](https://github.com/gnmyt/nexterm/blob/main/engine/src/net/sftp.c): `engine/src/net/sftp.c`
- [FTP protocol](https://github.com/gnmyt/nexterm/blob/main/engine/src/net/ftp.c): `engine/src/net/ftp.c`
- [File protocol](https://github.com/gnmyt/nexterm/blob/main/engine/src/net/file_proto.c): `engine/src/net/file_proto.c`

### Remote operations

- **Managed servers**
- **Proxmox hosts**

### Other components

- **User**

## Connections

- User → Application shell: uses
- Application shell → Server workspace: opens
- Server workspace → Session views: opens sessions
- User → Monitoring: views
- User → Audit and recordings: reviews
- User → Scripts and snippets: manages
- User → Administration: administers
- Administration → HTTP API: requests engines
- HTTP API → Engine management: invokes
- Engine management → Engine registrations: reads and writes
- HTTP API → Control plane: queries status
- Control plane → Nexterm engine: communicates
- Nexterm engine → Session manager: manages sessions
- Session views → Control plane: remote session
- Terminal renderer → Control plane: terminal traffic
- Desktop renderer → Control plane: desktop traffic
- SFTP file manager → Engine SFTP client: file requests
- Engine SFTP client → Control plane: uses relay
- Control plane → Nexterm engine: dispatches requests
- Session manager → Remote connection: opens connections
- Remote connection → Managed servers: connects remotely
- SFTP protocol → Managed servers: transfers files
- FTP protocol → Managed servers: transfers files
- File protocol → Managed servers: handles file protocol
- Engine HTTP relay → Control plane: relays HTTP
- Control plane → Proxmox hosts: Proxmox management
