# goatty-dev/goatty architecture

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

- Interactive diagram: https://gitdiagram.com/goatty-dev/goatty
- Repository: https://github.com/goatty-dev/goatty

## Overview

goatty is a GPU-rendered desktop terminal with managed local or daemon-backed sessions, including SSH connections and session reattachment. The main user path is opening a window, connecting to or starting a session, then interacting with terminal panes; settings, host selection, and the command palette provide adjacent workflows. Separate product branches manage host shell configuration and plugins. The README and source index establish several crate-level relationships, but unsampled implementation details are not inferred beyond those references.

Main entry points: [`crates/goatty-app/src/app.rs`](https://github.com/goatty-dev/goatty/blob/main/crates/goatty-app/src/app.rs) (App bootstrap), [`crates/goatty-client/src/connection.rs`](https://github.com/goatty-dev/goatty/blob/main/crates/goatty-client/src/connection.rs) (Daemon client), [`crates/goatty-app/src/workspace/mod.rs`](https://github.com/goatty-dev/goatty/blob/main/crates/goatty-app/src/workspace/mod.rs) (Tabs and panes), [`crates/goatty-daemon/src/server.rs`](https://github.com/goatty-dev/goatty/blob/main/crates/goatty-daemon/src/server.rs) (Daemon server)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_desktop["Desktop terminal"]
  node_app["App bootstrap<br/>[app.rs]"]
  node_workspace["Tabs and panes<br/>[mod.rs]"]
  node_palette["Command palette<br/>[mod.rs]"]
  node_terminal_view["Terminal view<br/>[view.rs]"]
  node_term_engine["Terminal engine<br/>[terminal.rs]"]
end

subgraph group_connectivity["Session connectivity"]
  node_connect_view["Connect screen<br/>[connect.rs]"]
  node_hosts["Host selection<br/>[hosts.rs]"]
  node_session["Session backend<br/>[session.rs]"]
  node_client["Daemon client<br/>[connection.rs]"]
  node_daemon["Daemon server<br/>[server.rs]"]
  node_daemon_sessions["Daemon sessions<br/>[session.rs]"]
  node_protocol["Wire protocol<br/>[msg.rs]"]
end

subgraph group_settings["Configuration"]
  node_settings_window["Settings window<br/>[mod.rs]"]
  node_app_settings["Client settings<br/>[settings.rs]"]
  node_config_store[("Config storage<br/>[store.rs]")]
end

subgraph group_shell["Managed shell"]
  node_shell_service["Host shell service<br/>[service.rs]"]
  node_shell_commands["Shell commands<br/>[cmd.rs]"]
end

subgraph group_plugins["Plugin system"]
  node_shell_plugins["Plugin operations<br/>[mod.rs]"]
  node_plugin_manifest["Plugin manifests<br/>[manifest.rs]"]
  node_plugin_index["Plugin registry<br/>[index.rs]"]
end

node_user(("User"))
node_remote_host(("Remote host"))

node_user -->|"launches"| node_app
node_app -->|"opens"| node_workspace
node_app -->|"initializes"| node_app_settings
node_workspace -->|"shows panes"| node_terminal_view
node_workspace -->|"shows overlay"| node_palette
node_palette -->|"opens host"| node_hosts
node_app -->|"opens connect flow"| node_connect_view
node_connect_view -->|"hands off session"| node_session
node_session -->|"uses connection"| node_client
node_client -->|"exchanges protocol"| node_daemon
node_daemon -->|"manages sessions"| node_daemon_sessions
node_client -->|"encodes messages"| node_protocol
node_daemon -->|"uses messages"| node_protocol
node_remote_host -.->|"accepts connection"| node_client
node_terminal_view -->|"renders terminal"| node_term_engine
node_user -->|"edits settings"| node_settings_window
node_settings_window -->|"edits live"| node_app_settings
node_app_settings -->|"loads and saves"| node_config_store
node_shell_commands -->|"dispatches operations"| node_shell_service
node_shell_service -->|"handles plugin requests"| node_shell_plugins
node_shell_plugins -->|"validates metadata"| node_plugin_manifest
node_plugin_index -->|"indexes manifests"| node_plugin_manifest

click node_app "https://github.com/goatty-dev/goatty/blob/main/crates/goatty-app/src/app.rs"
click node_workspace "https://github.com/goatty-dev/goatty/blob/main/crates/goatty-app/src/workspace/mod.rs"
click node_palette "https://github.com/goatty-dev/goatty/blob/main/crates/goatty-app/src/command_palette/mod.rs"
click node_terminal_view "https://github.com/goatty-dev/goatty/blob/main/crates/goatty-app/src/terminal/view.rs"
click node_connect_view "https://github.com/goatty-dev/goatty/blob/main/crates/goatty-app/src/connect.rs"
click node_hosts "https://github.com/goatty-dev/goatty/blob/main/crates/goatty-app/src/hosts.rs"
click node_session "https://github.com/goatty-dev/goatty/blob/main/crates/goatty-app/src/session.rs"
click node_client "https://github.com/goatty-dev/goatty/blob/main/crates/goatty-client/src/connection.rs"
click node_daemon "https://github.com/goatty-dev/goatty/blob/main/crates/goatty-daemon/src/server.rs"
click node_daemon_sessions "https://github.com/goatty-dev/goatty/blob/main/crates/goatty-daemon/src/session.rs"
click node_protocol "https://github.com/goatty-dev/goatty/blob/main/crates/goatty-proto/src/msg.rs"
click node_term_engine "https://github.com/goatty-dev/goatty/blob/main/crates/goatty-term/src/terminal.rs"
click node_settings_window "https://github.com/goatty-dev/goatty/blob/main/crates/goatty-app/src/settings_window/mod.rs"
click node_app_settings "https://github.com/goatty-dev/goatty/blob/main/crates/goatty-app/src/settings.rs"
click node_config_store "https://github.com/goatty-dev/goatty/blob/main/crates/goatty-config/src/store.rs"
click node_shell_service "https://github.com/goatty-dev/goatty/blob/main/crates/goatty-shell/src/service.rs"
click node_shell_commands "https://github.com/goatty-dev/goatty/blob/main/crates/goatty-shell/src/cmd.rs"
click node_shell_plugins "https://github.com/goatty-dev/goatty/blob/main/crates/goatty-shell/src/plugins/mod.rs"
click node_plugin_manifest "https://github.com/goatty-dev/goatty/blob/main/crates/goatty-plugin/src/manifest.rs"
click node_plugin_index "https://github.com/goatty-dev/goatty/blob/main/crates/goatty-plugin/src/index.rs"

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_workspace,node_palette,node_terminal_view,node_term_engine,node_user toneBlue
class node_connect_view,node_hosts,node_session,node_client,node_daemon,node_daemon_sessions,node_protocol toneAmber
class node_settings_window,node_app_settings,node_config_store toneMint
class node_shell_service,node_shell_commands toneRose
class node_shell_plugins,node_plugin_manifest,node_plugin_index,node_remote_host toneIndigo
```

## Components

### Desktop terminal

- [App bootstrap](https://github.com/goatty-dev/goatty/blob/main/crates/goatty-app/src/app.rs): `crates/goatty-app/src/app.rs`
- [Tabs and panes](https://github.com/goatty-dev/goatty/blob/main/crates/goatty-app/src/workspace/mod.rs): `crates/goatty-app/src/workspace/mod.rs`
- [Command palette](https://github.com/goatty-dev/goatty/blob/main/crates/goatty-app/src/command_palette/mod.rs): `crates/goatty-app/src/command_palette/mod.rs`
- [Terminal view](https://github.com/goatty-dev/goatty/blob/main/crates/goatty-app/src/terminal/view.rs): `crates/goatty-app/src/terminal/view.rs`
- [Terminal engine](https://github.com/goatty-dev/goatty/blob/main/crates/goatty-term/src/terminal.rs): `crates/goatty-term/src/terminal.rs`

### Session connectivity

- [Connect screen](https://github.com/goatty-dev/goatty/blob/main/crates/goatty-app/src/connect.rs): `crates/goatty-app/src/connect.rs`
- [Host selection](https://github.com/goatty-dev/goatty/blob/main/crates/goatty-app/src/hosts.rs): `crates/goatty-app/src/hosts.rs`
- [Session backend](https://github.com/goatty-dev/goatty/blob/main/crates/goatty-app/src/session.rs): `crates/goatty-app/src/session.rs`
- [Daemon client](https://github.com/goatty-dev/goatty/blob/main/crates/goatty-client/src/connection.rs): `crates/goatty-client/src/connection.rs`
- [Daemon server](https://github.com/goatty-dev/goatty/blob/main/crates/goatty-daemon/src/server.rs): `crates/goatty-daemon/src/server.rs`
- [Daemon sessions](https://github.com/goatty-dev/goatty/blob/main/crates/goatty-daemon/src/session.rs): `crates/goatty-daemon/src/session.rs`
- [Wire protocol](https://github.com/goatty-dev/goatty/blob/main/crates/goatty-proto/src/msg.rs): `crates/goatty-proto/src/msg.rs`

### Configuration

- [Settings window](https://github.com/goatty-dev/goatty/blob/main/crates/goatty-app/src/settings_window/mod.rs): `crates/goatty-app/src/settings_window/mod.rs`
- [Client settings](https://github.com/goatty-dev/goatty/blob/main/crates/goatty-app/src/settings.rs): `crates/goatty-app/src/settings.rs`
- [Config storage](https://github.com/goatty-dev/goatty/blob/main/crates/goatty-config/src/store.rs): `crates/goatty-config/src/store.rs`

### Managed shell

- [Host shell service](https://github.com/goatty-dev/goatty/blob/main/crates/goatty-shell/src/service.rs): `crates/goatty-shell/src/service.rs`
- [Shell commands](https://github.com/goatty-dev/goatty/blob/main/crates/goatty-shell/src/cmd.rs): `crates/goatty-shell/src/cmd.rs`

### Plugin system

- [Plugin operations](https://github.com/goatty-dev/goatty/blob/main/crates/goatty-shell/src/plugins/mod.rs): `crates/goatty-shell/src/plugins/mod.rs`
- [Plugin manifests](https://github.com/goatty-dev/goatty/blob/main/crates/goatty-plugin/src/manifest.rs): `crates/goatty-plugin/src/manifest.rs`
- [Plugin registry](https://github.com/goatty-dev/goatty/blob/main/crates/goatty-plugin/src/index.rs): `crates/goatty-plugin/src/index.rs`

### Other components

- **User**
- **Remote host**

## Connections

- User → App bootstrap: launches (evidence: `README.md`)
- App bootstrap → Tabs and panes: opens (evidence: `crates/goatty-app/src/app.rs`)
- App bootstrap → Client settings: initializes (evidence: `crates/goatty-app/src/app.rs`)
- Tabs and panes → Terminal view: shows panes (evidence: `crates/goatty-app/src/workspace/mod.rs`)
- Tabs and panes → Command palette: shows overlay (evidence: `crates/goatty-app/src/workspace/mod.rs`)
- Command palette → Host selection: opens host (evidence: `crates/goatty-app/src/command_palette/mod.rs`)
- App bootstrap → Connect screen: opens connect flow (evidence: `README.md`)
- Connect screen → Session backend: hands off session (evidence: `crates/goatty-app/src/connect.rs`)
- Session backend → Daemon client: uses connection (evidence: `crates/goatty-app/src/session.rs`)
- Daemon client → Daemon server: exchanges protocol (evidence: `README.md`)
- Daemon server → Daemon sessions: manages sessions (evidence: `crates/goatty-daemon/src/server.rs`)
- Daemon client → Wire protocol: encodes messages (evidence: `README.md`)
- Daemon server → Wire protocol: uses messages (evidence: `README.md`)
- Remote host → Daemon client: accepts connection
- Terminal view → Terminal engine: renders terminal (evidence: `README.md`)
- User → Settings window: edits settings (evidence: `README.md`)
- Settings window → Client settings: edits live (evidence: `crates/goatty-app/src/settings_window/mod.rs`)
- Client settings → Config storage: loads and saves (evidence: `crates/goatty-app/src/settings.rs`)
- Shell commands → Host shell service: dispatches operations (evidence: `crates/goatty-shell/src/cmd.rs`)
- Host shell service → Plugin operations: handles plugin requests (evidence: `crates/goatty-shell/src/service.rs`)
- Plugin operations → Plugin manifests: validates metadata (evidence: `crates/goatty-plugin/src/manifest.rs`)
- Plugin registry → Plugin manifests: indexes manifests (evidence: `crates/goatty-plugin/src/index.rs`)
