# eneskirca/nodeterm architecture

> Architecture diagram of the GitHub repository eneskirca/nodeterm, 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/eneskirca/nodeterm
- Repository: https://github.com/eneskirca/nodeterm

## Overview

nodeterm is an Electron terminal-and-agent workspace: users arrange persistent sessions and project context on a canvas, operate the same sessions through a kanban view, and can attach remotely. The README also documents SSH projects, Git/GitHub integration, agent status and approvals, dictation, and a self-hosted server. The graph emphasizes those product areas and the renderer/preload/main boundary; sampled implementation excerpts are limited, so uncertain internal call paths are omitted.

Main entry points: [`src/main/index.ts`](https://github.com/eneskirca/nodeterm/blob/main/src/main/index.ts) (Electron main), [`src/renderer/App.tsx`](https://github.com/eneskirca/nodeterm/blob/main/src/renderer/App.tsx) (Canvas UI), [`src/core/pty-manager.ts`](https://github.com/eneskirca/nodeterm/blob/main/src/core/pty-manager.ts) (PTY manager), [`src/renderer/canvas/Canvas.tsx`](https://github.com/eneskirca/nodeterm/blob/main/src/renderer/canvas/Canvas.tsx) (Canvas nodes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workspace["Canvas workspace"]
  node_canvas["Canvas UI<br/>[App.tsx]"]
  node_canvas_nodes["Canvas nodes<br/>[Canvas.tsx]"]
  node_kanban["Kanban board<br/>[KanbanView.tsx]"]
  node_workspace_store[("Workspace state<br/>[workspace-store.ts]")]
  node_preload["IPC bridge<br/>[index.ts]"]
  node_main["Electron main<br/>[index.ts]"]
end

subgraph group_runtime["Session runtime"]
  node_pty["PTY manager<br/>[pty-manager.ts]"]
  node_tmux["tmux sessions"]
  node_session_host["Session host"]
end

subgraph group_agents["Agent workflow"]
  node_agent_hooks["Agent hooks<br/>[index.ts]"]
  node_hook_server["Hook server<br/>[hook-server.ts]"]
  node_agent_status["Agent status"]
  node_context_links["Context links"]
  node_hud["Agent HUD<br/>[main.ts]"]
end

subgraph group_integrations["Project integrations"]
  node_git["Git service<br/>[git-service.ts]"]
  node_github["GitHub integration<br/>[integration.ts]"]
  node_ssh["SSH projects<br/>[ssh-project.ts]"]
  node_speech["Dictation<br/>[speech-service.ts]"]
end

subgraph group_remote["Remote access"]
  node_remote["Phone pairing<br/>[pairing-service.ts]"]
  node_relay["Encrypted relay<br/>[relay-client.ts]"]
  node_server["Self-hosted server<br/>[main.ts]"]
end

node_user(("User"))
node_phone(("Phone companion"))
node_github_service{{"GitHub service"}}

node_user -->|"arranges sessions"| node_canvas
node_canvas -->|"renders nodes"| node_canvas_nodes
node_canvas -->|"switches view"| node_kanban
node_canvas -->|"invokes API"| node_preload
node_preload -->|"IPC requests"| node_main
node_main -->|"loads and saves"| node_workspace_store
node_main -->|"manages terminals"| node_pty
node_pty -->|"controls sessions"| node_tmux
node_pty -.->|"captures sessions"| node_session_host
node_agent_hooks -->|"posts events"| node_hook_server
node_hook_server -->|"updates status"| node_agent_status
node_canvas_nodes -->|"publishes links"| node_context_links
node_agent_status -->|"supplies status"| node_hud
node_main -->|"routes Git requests"| node_git
node_main -->|"routes issue requests"| node_github
node_github -->|"calls API"| node_github_service
node_main -->|"manages remote projects"| node_ssh
node_canvas -->|"dictation requests"| node_speech
node_user -->|"pairs phone"| node_remote
node_remote -->|"uses transport"| node_relay
node_phone -->|"connects securely"| node_relay
node_user -.->|"opens browser app"| node_server

click node_canvas "https://github.com/eneskirca/nodeterm/blob/main/src/renderer/App.tsx"
click node_canvas_nodes "https://github.com/eneskirca/nodeterm/blob/main/src/renderer/canvas/Canvas.tsx"
click node_kanban "https://github.com/eneskirca/nodeterm/blob/main/src/renderer/components/kanban/KanbanView.tsx"
click node_workspace_store "https://github.com/eneskirca/nodeterm/blob/main/src/core/workspace-store.ts"
click node_preload "https://github.com/eneskirca/nodeterm/blob/main/src/preload/index.ts"
click node_main "https://github.com/eneskirca/nodeterm/blob/main/src/main/index.ts"
click node_pty "https://github.com/eneskirca/nodeterm/blob/main/src/core/pty-manager.ts"
click node_tmux "https://github.com/eneskirca/nodeterm/blob/main/src/core/tmux-control-client.ts"
click node_session_host "https://github.com/eneskirca/nodeterm/blob/main/src/core/session-host-client.ts"
click node_agent_hooks "https://github.com/eneskirca/nodeterm/blob/main/src/core/agents/hooks/index.ts"
click node_hook_server "https://github.com/eneskirca/nodeterm/blob/main/src/core/agents/hook-server.ts"
click node_agent_status "https://github.com/eneskirca/nodeterm/blob/main/src/core/agent-status-mirror.ts"
click node_context_links "https://github.com/eneskirca/nodeterm/blob/main/src/renderer/canvas/useContextLinkSync.ts"
click node_hud "https://github.com/eneskirca/nodeterm/blob/main/src/renderer/hud/main.ts"
click node_git "https://github.com/eneskirca/nodeterm/blob/main/src/core/git-service.ts"
click node_github "https://github.com/eneskirca/nodeterm/blob/main/src/core/github/integration.ts"
click node_ssh "https://github.com/eneskirca/nodeterm/blob/main/src/main/remote-ssh/ssh-project.ts"
click node_speech "https://github.com/eneskirca/nodeterm/blob/main/src/core/speech/speech-service.ts"
click node_remote "https://github.com/eneskirca/nodeterm/blob/main/src/main/pairing-service.ts"
click node_relay "https://github.com/eneskirca/nodeterm/blob/main/src/main/remote/relay-client.ts"
click node_server "https://github.com/eneskirca/nodeterm/blob/main/src/server/main.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_canvas,node_canvas_nodes,node_kanban,node_workspace_store,node_preload,node_main,node_user toneBlue
class node_pty,node_tmux,node_session_host toneAmber
class node_agent_hooks,node_hook_server,node_agent_status,node_context_links,node_hud toneMint
class node_git,node_github,node_ssh,node_speech toneRose
class node_remote,node_relay,node_server,node_phone,node_github_service toneIndigo
```

## Components

### Canvas workspace

- [Canvas UI](https://github.com/eneskirca/nodeterm/blob/main/src/renderer/App.tsx): `src/renderer/App.tsx`
- [Canvas nodes](https://github.com/eneskirca/nodeterm/blob/main/src/renderer/canvas/Canvas.tsx): `src/renderer/canvas/Canvas.tsx`
- [Kanban board](https://github.com/eneskirca/nodeterm/blob/main/src/renderer/components/kanban/KanbanView.tsx): `src/renderer/components/kanban/KanbanView.tsx`
- [Workspace state](https://github.com/eneskirca/nodeterm/blob/main/src/core/workspace-store.ts): `src/core/workspace-store.ts`
- [IPC bridge](https://github.com/eneskirca/nodeterm/blob/main/src/preload/index.ts): `src/preload/index.ts`
- [Electron main](https://github.com/eneskirca/nodeterm/blob/main/src/main/index.ts): `src/main/index.ts`

### Session runtime

- [PTY manager](https://github.com/eneskirca/nodeterm/blob/main/src/core/pty-manager.ts): `src/core/pty-manager.ts`
- [tmux sessions](https://github.com/eneskirca/nodeterm/blob/main/src/core/tmux-control-client.ts): `src/core/tmux-control-client.ts`
- [Session host](https://github.com/eneskirca/nodeterm/blob/main/src/core/session-host-client.ts): `src/core/session-host-client.ts`

### Agent workflow

- [Agent hooks](https://github.com/eneskirca/nodeterm/blob/main/src/core/agents/hooks/index.ts): `src/core/agents/hooks/index.ts`
- [Hook server](https://github.com/eneskirca/nodeterm/blob/main/src/core/agents/hook-server.ts): `src/core/agents/hook-server.ts`
- [Agent status](https://github.com/eneskirca/nodeterm/blob/main/src/core/agent-status-mirror.ts): `src/core/agent-status-mirror.ts`
- [Context links](https://github.com/eneskirca/nodeterm/blob/main/src/renderer/canvas/useContextLinkSync.ts): `src/renderer/canvas/useContextLinkSync.ts`
- [Agent HUD](https://github.com/eneskirca/nodeterm/blob/main/src/renderer/hud/main.ts): `src/renderer/hud/main.ts`

### Project integrations

- [Git service](https://github.com/eneskirca/nodeterm/blob/main/src/core/git-service.ts): `src/core/git-service.ts`
- [GitHub integration](https://github.com/eneskirca/nodeterm/blob/main/src/core/github/integration.ts): `src/core/github/integration.ts`
- [SSH projects](https://github.com/eneskirca/nodeterm/blob/main/src/main/remote-ssh/ssh-project.ts): `src/main/remote-ssh/ssh-project.ts`
- [Dictation](https://github.com/eneskirca/nodeterm/blob/main/src/core/speech/speech-service.ts): `src/core/speech/speech-service.ts`

### Remote access

- [Phone pairing](https://github.com/eneskirca/nodeterm/blob/main/src/main/pairing-service.ts): `src/main/pairing-service.ts`
- [Encrypted relay](https://github.com/eneskirca/nodeterm/blob/main/src/main/remote/relay-client.ts): `src/main/remote/relay-client.ts`
- [Self-hosted server](https://github.com/eneskirca/nodeterm/blob/main/src/server/main.ts): `src/server/main.ts`

### Other components

- **User**
- **Phone companion**
- **GitHub service**

## Connections

- User → Canvas UI: arranges sessions
- Canvas UI → Canvas nodes: renders nodes
- Canvas UI → Kanban board: switches view
- Canvas UI → IPC bridge: invokes API
- IPC bridge → Electron main: IPC requests
- Electron main → Workspace state: loads and saves
- Electron main → PTY manager: manages terminals
- PTY manager → tmux sessions: controls sessions
- PTY manager → Session host: captures sessions
- Agent hooks → Hook server: posts events
- Hook server → Agent status: updates status
- Canvas nodes → Context links: publishes links
- Agent status → Agent HUD: supplies status
- Electron main → Git service: routes Git requests
- Electron main → GitHub integration: routes issue requests
- GitHub integration → GitHub service: calls API
- Electron main → SSH projects: manages remote projects
- Canvas UI → Dictation: dictation requests
- User → Phone pairing: pairs phone
- Phone pairing → Encrypted relay: uses transport
- Phone companion → Encrypted relay: connects securely
- User → Self-hosted server: opens browser app
