# roketskiy/fintwind architecture

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

- Interactive diagram: https://gitdiagram.com/roketskiy/fintwind
- Repository: https://github.com/roketskiy/fintwind

## Overview

Fintwind is a native Windows desktop client for OpenCode 2. The main workflow is a user managing project sessions, composing a prompt, and following the agent’s streamed activity; the desktop delegates provider execution to a separate authenticated daemon. The README documents this process boundary and the major product features. Source excerpts are partial, so feature branches are included where README capabilities and tree paths support them, while unverified internal call chains are omitted.

Main entry points: [`src/app.rs`](https://github.com/roketskiy/fintwind/blob/main/src/app.rs) (GPUI application), [`crates/fintwind-core/src/server.rs`](https://github.com/roketskiy/fintwind/blob/main/crates/fintwind-core/src/server.rs) (Daemon request server), [`crates/fintwind-core/src/driver/opencode.rs`](https://github.com/roketskiy/fintwind/blob/main/crates/fintwind-core/src/driver/opencode.rs) (OpenCode integration), [`crates/fintwind-client/src/client.rs`](https://github.com/roketskiy/fintwind/blob/main/crates/fintwind-client/src/client.rs) (Daemon client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_desktop["Desktop experience"]
  node_app["GPUI application<br/>[app.rs]"]
  node_sessions["Session tabs<br/>[sessions.rs]"]
  node_composer["Prompt composer<br/>[composer.rs]"]
  node_transcript["Activity transcript<br/>[transcript_view.rs]"]
  node_markdown["Markdown rendering<br/>[render.rs]"]
  node_settings["Appearance settings<br/>[settings.rs]"]
  node_theme["Theme system<br/>[theme.rs]"]
  node_browser["Browser panel<br/>[browser.rs]"]
  node_terminal["Built-in terminal<br/>[terminal.rs]"]
  node_usage_ui["Usage statistics UI<br/>[usage_page.rs]"]
  node_mcp_ui["MCP management UI<br/>[mcp_page.rs]"]
end

subgraph group_agent["Agent runtime"]
  node_client["Daemon client<br/>[client.rs]"]
  node_driver_proxy["Desktop driver proxy<br/>[mod.rs]"]
  node_daemon["Daemon process<br/>[main.rs]"]
  node_server["Daemon request server<br/>[server.rs]"]
  node_protocol["WebSocket contract<br/>[protocol.rs]"]
  node_opencode["OpenCode integration<br/>[opencode.rs]"]
  node_opencode_session["OpenCode sessions"]
end

subgraph group_workspace["Workspace tools"]
  node_workspace_ui["Files and Git UI<br/>[file_search.rs]"]
  node_git_history["Git history<br/>[git_history.rs]"]
  node_workspace_core["Workspace and Git<br/>[workspace.rs]"]
end

subgraph group_support["Local services"]
  node_persistence[("Local persistence<br/>[persistence.rs]")]
  node_attachments["Attachment handling<br/>[attachments.rs]"]
end

node_user(("Desktop user"))
node_external_opencode["OpenCode CLI"]
node_model_provider["Configured model provider"]

node_user -->|"uses"| node_app
node_app -->|"manages sessions"| node_sessions
node_app -->|"composes prompts"| node_composer
node_app -->|"shows activity"| node_transcript
node_transcript -.->|"renders replies"| node_markdown
node_app -->|"configures appearance"| node_settings
node_settings -.->|"selects themes"| node_theme
node_app -->|"opens optional panel"| node_browser
node_app -->|"opens terminal"| node_terminal
node_app -->|"browses files"| node_workspace_ui
node_app -->|"views history"| node_git_history
node_app -->|"explores usage"| node_usage_ui
node_app -->|"manages MCP"| node_mcp_ui
node_app -->|"communicates through"| node_client
node_client -->|"sends authenticated requests"| node_daemon
node_daemon -->|"serves requests"| node_server
node_server -->|"uses contract"| node_protocol
node_driver_proxy -->|"forwards commands"| node_client
node_server -.->|"dispatches agent work"| node_opencode
node_opencode -->|"integrates with"| node_external_opencode
node_external_opencode -->|"uses configured providers"| node_model_provider
node_opencode -->|"uses session helpers"| node_opencode_session
node_server -.->|"handles workspace operations"| node_workspace_core
node_server -->|"uses local storage"| node_persistence
node_composer -->|"attaches files"| node_attachments

click node_app "https://github.com/roketskiy/fintwind/blob/main/src/app.rs"
click node_sessions "https://github.com/roketskiy/fintwind/blob/main/src/app/sessions.rs"
click node_composer "https://github.com/roketskiy/fintwind/blob/main/src/app/composer.rs"
click node_transcript "https://github.com/roketskiy/fintwind/blob/main/src/app/transcript_view.rs"
click node_markdown "https://github.com/roketskiy/fintwind/blob/main/src/md/render.rs"
click node_settings "https://github.com/roketskiy/fintwind/blob/main/src/app/settings.rs"
click node_theme "https://github.com/roketskiy/fintwind/blob/main/src/theme.rs"
click node_browser "https://github.com/roketskiy/fintwind/blob/main/src/browser.rs"
click node_terminal "https://github.com/roketskiy/fintwind/blob/main/src/terminal.rs"
click node_workspace_ui "https://github.com/roketskiy/fintwind/blob/main/src/app/file_search.rs"
click node_git_history "https://github.com/roketskiy/fintwind/blob/main/src/app/git_history.rs"
click node_usage_ui "https://github.com/roketskiy/fintwind/blob/main/src/app/usage_page.rs"
click node_mcp_ui "https://github.com/roketskiy/fintwind/blob/main/src/app/mcp_page.rs"
click node_client "https://github.com/roketskiy/fintwind/blob/main/crates/fintwind-client/src/client.rs"
click node_driver_proxy "https://github.com/roketskiy/fintwind/blob/main/src/driver/mod.rs"
click node_daemon "https://github.com/roketskiy/fintwind/blob/main/crates/fintwind-daemon/src/main.rs"
click node_server "https://github.com/roketskiy/fintwind/blob/main/crates/fintwind-core/src/server.rs"
click node_protocol "https://github.com/roketskiy/fintwind/blob/main/crates/fintwind-protocol/src/protocol.rs"
click node_opencode "https://github.com/roketskiy/fintwind/blob/main/crates/fintwind-core/src/driver/opencode.rs"
click node_opencode_session "https://github.com/roketskiy/fintwind/blob/main/crates/fintwind-core/src/opencode_session.rs"
click node_workspace_core "https://github.com/roketskiy/fintwind/blob/main/crates/fintwind-core/src/workspace.rs"
click node_persistence "https://github.com/roketskiy/fintwind/blob/main/crates/fintwind-core/src/persistence.rs"
click node_attachments "https://github.com/roketskiy/fintwind/blob/main/crates/fintwind-core/src/attachments.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_sessions,node_composer,node_transcript,node_markdown,node_settings,node_theme,node_browser,node_terminal,node_usage_ui,node_mcp_ui,node_user toneBlue
class node_client,node_driver_proxy,node_daemon,node_server,node_protocol,node_opencode,node_opencode_session toneAmber
class node_workspace_ui,node_git_history,node_workspace_core toneMint
class node_persistence,node_attachments toneRose
class node_external_opencode,node_model_provider toneIndigo
```

## Components

### Desktop experience

- [GPUI application](https://github.com/roketskiy/fintwind/blob/main/src/app.rs): `src/app.rs`
- [Session tabs](https://github.com/roketskiy/fintwind/blob/main/src/app/sessions.rs): `src/app/sessions.rs`
- [Prompt composer](https://github.com/roketskiy/fintwind/blob/main/src/app/composer.rs): `src/app/composer.rs`
- [Activity transcript](https://github.com/roketskiy/fintwind/blob/main/src/app/transcript_view.rs): `src/app/transcript_view.rs`
- [Markdown rendering](https://github.com/roketskiy/fintwind/blob/main/src/md/render.rs): `src/md/render.rs`
- [Appearance settings](https://github.com/roketskiy/fintwind/blob/main/src/app/settings.rs): `src/app/settings.rs`
- [Theme system](https://github.com/roketskiy/fintwind/blob/main/src/theme.rs): `src/theme.rs`
- [Browser panel](https://github.com/roketskiy/fintwind/blob/main/src/browser.rs): `src/browser.rs`
- [Built-in terminal](https://github.com/roketskiy/fintwind/blob/main/src/terminal.rs): `src/terminal.rs`
- [Usage statistics UI](https://github.com/roketskiy/fintwind/blob/main/src/app/usage_page.rs): `src/app/usage_page.rs`
- [MCP management UI](https://github.com/roketskiy/fintwind/blob/main/src/app/mcp_page.rs): `src/app/mcp_page.rs`

### Agent runtime

- [Daemon client](https://github.com/roketskiy/fintwind/blob/main/crates/fintwind-client/src/client.rs): `crates/fintwind-client/src/client.rs`
- [Desktop driver proxy](https://github.com/roketskiy/fintwind/blob/main/src/driver/mod.rs): `src/driver/mod.rs`
- [Daemon process](https://github.com/roketskiy/fintwind/blob/main/crates/fintwind-daemon/src/main.rs): `crates/fintwind-daemon/src/main.rs`
- [Daemon request server](https://github.com/roketskiy/fintwind/blob/main/crates/fintwind-core/src/server.rs): `crates/fintwind-core/src/server.rs`
- [WebSocket contract](https://github.com/roketskiy/fintwind/blob/main/crates/fintwind-protocol/src/protocol.rs): `crates/fintwind-protocol/src/protocol.rs`
- [OpenCode integration](https://github.com/roketskiy/fintwind/blob/main/crates/fintwind-core/src/driver/opencode.rs): `crates/fintwind-core/src/driver/opencode.rs`
- [OpenCode sessions](https://github.com/roketskiy/fintwind/blob/main/crates/fintwind-core/src/opencode_session.rs): `crates/fintwind-core/src/opencode_session.rs`

### Workspace tools

- [Files and Git UI](https://github.com/roketskiy/fintwind/blob/main/src/app/file_search.rs): `src/app/file_search.rs`
- [Git history](https://github.com/roketskiy/fintwind/blob/main/src/app/git_history.rs): `src/app/git_history.rs`
- [Workspace and Git](https://github.com/roketskiy/fintwind/blob/main/crates/fintwind-core/src/workspace.rs): `crates/fintwind-core/src/workspace.rs`

### Local services

- [Local persistence](https://github.com/roketskiy/fintwind/blob/main/crates/fintwind-core/src/persistence.rs): `crates/fintwind-core/src/persistence.rs`
- [Attachment handling](https://github.com/roketskiy/fintwind/blob/main/crates/fintwind-core/src/attachments.rs): `crates/fintwind-core/src/attachments.rs`

### Other components

- **Desktop user**
- **OpenCode CLI**
- **Configured model provider**

## Connections

- Desktop user → GPUI application: uses (evidence: `README.md`)
- GPUI application → Session tabs: manages sessions (evidence: `README.md`)
- GPUI application → Prompt composer: composes prompts (evidence: `README.md`)
- GPUI application → Activity transcript: shows activity (evidence: `README.md`)
- Activity transcript → Markdown rendering: renders replies
- GPUI application → Appearance settings: configures appearance (evidence: `README.md`)
- Appearance settings → Theme system: selects themes
- GPUI application → Browser panel: opens optional panel (evidence: `README.md`)
- GPUI application → Built-in terminal: opens terminal (evidence: `README.md`)
- GPUI application → Files and Git UI: browses files (evidence: `README.md`)
- GPUI application → Git history: views history (evidence: `README.md`)
- GPUI application → Usage statistics UI: explores usage (evidence: `README.md`)
- GPUI application → MCP management UI: manages MCP (evidence: `README.md`)
- GPUI application → Daemon client: communicates through (evidence: `README.md`)
- Daemon client → Daemon process: sends authenticated requests (evidence: `README.md`)
- Daemon process → Daemon request server: serves requests (evidence: `README.md`)
- Daemon request server → WebSocket contract: uses contract (evidence: `README.md`)
- Desktop driver proxy → Daemon client: forwards commands (evidence: `src/driver/mod.rs`)
- Daemon request server → OpenCode integration: dispatches agent work
- OpenCode integration → OpenCode CLI: integrates with (evidence: `README.md`)
- OpenCode CLI → Configured model provider: uses configured providers (evidence: `README.md`)
- OpenCode integration → OpenCode sessions: uses session helpers (evidence: `crates/fintwind-core/src/driver/opencode.rs`)
- Daemon request server → Workspace and Git: handles workspace operations
- Daemon request server → Local persistence: uses local storage (evidence: `README.md`)
- Prompt composer → Attachment handling: attaches files (evidence: `README.md`)
