# unshoppable/hunt architecture

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

- Interactive diagram: https://gitdiagram.com/unshoppable/hunt
- Repository: https://github.com/unshoppable/hunt

## Overview

Hunt is a macOS desktop client for Claude Code, combining isolated coding sessions with tools for reviewing and understanding their changes. The main workflow is to create or select a session, chat with the agent, then inspect, edit, commit, or review the resulting work. Remote sessions add a gateway-managed VM and session relay; the client also supports an IDE, pull-request reviews, architecture diagrams, and guardrails. Edges are limited to README statements, excerpts, and SOURCE INDEX references; some unsampled subsystem links are therefore omitted.

Main entry points: [`apps/client/src/app/App.tsx`](https://github.com/unshoppable/hunt/blob/master/apps/client/src/app/App.tsx) (Main app), [`apps/gateway/src/orchestrator.ts`](https://github.com/unshoppable/hunt/blob/master/apps/gateway/src/orchestrator.ts) (Gateway control plane), [`apps/client/src/state/store.ts`](https://github.com/unshoppable/hunt/blob/master/apps/client/src/state/store.ts) (Session state), [`apps/client/src/chat/ChatPanel.tsx`](https://github.com/unshoppable/hunt/blob/master/apps/client/src/chat/ChatPanel.tsx) (Agent chat)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_desktop["Desktop workflow"]
  node_app["Main app<br/>[App.tsx]"]
  node_session_ui["Session views"]
end

subgraph group_session["Agent sessions"]
  node_chat["Agent chat<br/>[ChatPanel.tsx]"]
  node_store["Session state<br/>[store.ts]"]
  node_workspace["Worktree sessions"]
end

subgraph group_review["Change inspection"]
  node_diff["Change diffs<br/>[DiffPanel.tsx]"]
  node_git["Git operations<br/>[GitPanel.tsx]"]
  node_ide["Built-in IDE<br/>[IdePanel.tsx]"]
  node_language["Language services<br/>[languageService.ts]"]
  node_pr["PR reviews"]
  node_architecture["Architecture diagrams"]
  node_guardrails["Guardrails editor"]
end

subgraph group_remote["Remote execution"]
  node_remote_client["Remote session client<br/>[remoteSession.ts]"]
  node_gateway["Gateway control plane<br/>[orchestrator.ts]"]
  node_gateway_api["Gateway API contract<br/>[gatewayApi.ts]"]
  node_vm["Session VM<br/>[sessionVm.ts]"]
  node_relay["ACP relay<br/>[relay.ts]"]
  node_sync["Worktree sync<br/>[helper.ts]"]
end

subgraph group_runtime["Native runtime"]
  node_tauri["Tauri commands<br/>[commands.ts]"]
  node_rust["Native services<br/>[lib.rs]"]
end

node_user(("Developer"))
node_claude(("Claude Code"))
node_github(("GitHub / gh"))
node_cloud(("Cloud VM services"))

node_user -->|"uses"| node_app
node_app -->|"reads state"| node_store
node_app -->|"shows"| node_session_ui
node_app -->|"shows"| node_chat
node_app -->|"shows"| node_diff
node_app -->|"shows"| node_git
node_app -->|"shows"| node_ide
node_app -->|"shows"| node_pr
node_chat -->|"reads state"| node_store
node_store -->|"invokes commands"| node_tauri
node_tauri -.->|"bridges to"| node_rust
node_chat -->|"prompts"| node_claude
node_workspace -->|"runs agent"| node_claude
node_ide -.->|"uses services"| node_language
node_language -->|"uses IPC"| node_tauri
node_user -->|"inspects changes"| node_diff
node_user -->|"edits files"| node_ide
node_user -->|"reviews pull requests"| node_pr
node_user -->|"views diagrams"| node_architecture
node_user -->|"edits rules"| node_guardrails
node_store -->|"shares state"| node_remote_client
node_remote_client -.->|"requests remote sessions"| node_gateway
node_gateway -->|"implements contract"| node_gateway_api
node_gateway -->|"manages VM"| node_vm
node_gateway -.->|"provisions instances"| node_cloud
node_vm -.->|"hosts relay"| node_relay
node_relay -->|"serves ACP"| node_claude
node_vm -.->|"syncs worktree"| node_sync
node_github -->|"provides reviews"| node_pr

click node_app "https://github.com/unshoppable/hunt/blob/master/apps/client/src/app/App.tsx"
click node_session_ui "https://github.com/unshoppable/hunt/tree/master/apps/client/src/sessions"
click node_chat "https://github.com/unshoppable/hunt/blob/master/apps/client/src/chat/ChatPanel.tsx"
click node_store "https://github.com/unshoppable/hunt/blob/master/apps/client/src/state/store.ts"
click node_workspace "https://github.com/unshoppable/hunt/tree/master/apps/client/src-tauri/src/session"
click node_diff "https://github.com/unshoppable/hunt/blob/master/apps/client/src/diff/DiffPanel.tsx"
click node_git "https://github.com/unshoppable/hunt/blob/master/apps/client/src/git/GitPanel.tsx"
click node_ide "https://github.com/unshoppable/hunt/blob/master/apps/client/src/ide/IdePanel.tsx"
click node_language "https://github.com/unshoppable/hunt/blob/master/apps/client/src/ide/languageService.ts"
click node_pr "https://github.com/unshoppable/hunt/blob/master/apps/client/src/review/PullRequestPanel.tsx"
click node_architecture "https://github.com/unshoppable/hunt/tree/master/apps/client/src/graph"
click node_guardrails "https://github.com/unshoppable/hunt/tree/master/apps/client/src/guardrails"
click node_remote_client "https://github.com/unshoppable/hunt/blob/master/apps/client/src/chat/remoteSession.ts"
click node_gateway "https://github.com/unshoppable/hunt/blob/master/apps/gateway/src/orchestrator.ts"
click node_gateway_api "https://github.com/unshoppable/hunt/blob/master/libs/domain/src/gatewayApi.ts"
click node_vm "https://github.com/unshoppable/hunt/blob/master/apps/gateway/src/sessionVm.ts"
click node_relay "https://github.com/unshoppable/hunt/blob/master/apps/session/src/relay/relay.ts"
click node_sync "https://github.com/unshoppable/hunt/blob/master/apps/session/src/sync/helper.ts"
click node_tauri "https://github.com/unshoppable/hunt/blob/master/apps/client/src/ipc/commands.ts"
click node_rust "https://github.com/unshoppable/hunt/blob/master/apps/client/src-tauri/src/lib.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_session_ui toneBlue
class node_chat,node_store,node_workspace toneAmber
class node_diff,node_git,node_ide,node_language,node_pr,node_architecture,node_guardrails toneMint
class node_remote_client,node_gateway,node_gateway_api,node_vm,node_relay,node_sync toneRose
class node_tauri,node_rust,node_user,node_claude,node_github,node_cloud toneIndigo
```

## Components

### Desktop workflow

- [Main app](https://github.com/unshoppable/hunt/blob/master/apps/client/src/app/App.tsx): `apps/client/src/app/App.tsx`
- [Session views](https://github.com/unshoppable/hunt/tree/master/apps/client/src/sessions): `apps/client/src/sessions`

### Agent sessions

- [Agent chat](https://github.com/unshoppable/hunt/blob/master/apps/client/src/chat/ChatPanel.tsx): `apps/client/src/chat/ChatPanel.tsx`
- [Session state](https://github.com/unshoppable/hunt/blob/master/apps/client/src/state/store.ts): `apps/client/src/state/store.ts`
- [Worktree sessions](https://github.com/unshoppable/hunt/tree/master/apps/client/src-tauri/src/session): `apps/client/src-tauri/src/session`

### Change inspection

- [Change diffs](https://github.com/unshoppable/hunt/blob/master/apps/client/src/diff/DiffPanel.tsx): `apps/client/src/diff/DiffPanel.tsx`
- [Git operations](https://github.com/unshoppable/hunt/blob/master/apps/client/src/git/GitPanel.tsx): `apps/client/src/git/GitPanel.tsx`
- [Built-in IDE](https://github.com/unshoppable/hunt/blob/master/apps/client/src/ide/IdePanel.tsx): `apps/client/src/ide/IdePanel.tsx`
- [Language services](https://github.com/unshoppable/hunt/blob/master/apps/client/src/ide/languageService.ts): `apps/client/src/ide/languageService.ts`
- [PR reviews](https://github.com/unshoppable/hunt/blob/master/apps/client/src/review/PullRequestPanel.tsx): `apps/client/src/review/PullRequestPanel.tsx`
- [Architecture diagrams](https://github.com/unshoppable/hunt/tree/master/apps/client/src/graph): `apps/client/src/graph`
- [Guardrails editor](https://github.com/unshoppable/hunt/tree/master/apps/client/src/guardrails): `apps/client/src/guardrails`

### Remote execution

- [Remote session client](https://github.com/unshoppable/hunt/blob/master/apps/client/src/chat/remoteSession.ts): `apps/client/src/chat/remoteSession.ts`
- [Gateway control plane](https://github.com/unshoppable/hunt/blob/master/apps/gateway/src/orchestrator.ts): `apps/gateway/src/orchestrator.ts`
- [Gateway API contract](https://github.com/unshoppable/hunt/blob/master/libs/domain/src/gatewayApi.ts): `libs/domain/src/gatewayApi.ts`
- [Session VM](https://github.com/unshoppable/hunt/blob/master/apps/gateway/src/sessionVm.ts): `apps/gateway/src/sessionVm.ts`
- [ACP relay](https://github.com/unshoppable/hunt/blob/master/apps/session/src/relay/relay.ts): `apps/session/src/relay/relay.ts`
- [Worktree sync](https://github.com/unshoppable/hunt/blob/master/apps/session/src/sync/helper.ts): `apps/session/src/sync/helper.ts`

### Native runtime

- [Tauri commands](https://github.com/unshoppable/hunt/blob/master/apps/client/src/ipc/commands.ts): `apps/client/src/ipc/commands.ts`
- [Native services](https://github.com/unshoppable/hunt/blob/master/apps/client/src-tauri/src/lib.rs): `apps/client/src-tauri/src/lib.rs`

### Other components

- **Developer**
- **Claude Code**
- **GitHub / gh**
- **Cloud VM services**

## Connections

- Developer → Main app: uses (evidence: `README.md`)
- Main app → Session state: reads state (evidence: `apps/client/src/app/App.tsx`)
- Main app → Session views: shows (evidence: `apps/client/src/app/App.tsx`)
- Main app → Agent chat: shows (evidence: `apps/client/src/app/App.tsx`)
- Main app → Change diffs: shows (evidence: `apps/client/src/app/App.tsx`)
- Main app → Git operations: shows (evidence: `apps/client/src/app/App.tsx`)
- Main app → Built-in IDE: shows (evidence: `apps/client/src/app/App.tsx`)
- Main app → PR reviews: shows (evidence: `apps/client/src/app/App.tsx`)
- Agent chat → Session state: reads state (evidence: `apps/client/src/chat/ChatPanel.tsx`)
- Session state → Tauri commands: invokes commands (evidence: `apps/client/src/state/store.ts`)
- Tauri commands → Native services: bridges to
- Agent chat → Claude Code: prompts (evidence: `README.md`)
- Worktree sessions → Claude Code: runs agent (evidence: `README.md`)
- Built-in IDE → Language services: uses services
- Language services → Tauri commands: uses IPC
- Developer → Change diffs: inspects changes (evidence: `README.md`)
- Developer → Built-in IDE: edits files (evidence: `README.md`)
- Developer → PR reviews: reviews pull requests (evidence: `README.md`)
- Developer → Architecture diagrams: views diagrams (evidence: `README.md`)
- Developer → Guardrails editor: edits rules (evidence: `README.md`)
- Session state → Remote session client: shares state (evidence: `apps/client/src/chat/remoteSession.ts`)
- Remote session client → Gateway control plane: requests remote sessions
- Gateway control plane → Gateway API contract: implements contract (evidence: `apps/gateway/src/orchestrator.ts`)
- Gateway control plane → Session VM: manages VM (evidence: `apps/gateway/src/orchestrator.ts`)
- Gateway control plane → Cloud VM services: provisions instances
- Session VM → ACP relay: hosts relay
- ACP relay → Claude Code: serves ACP
- Session VM → Worktree sync: syncs worktree
- GitHub / gh → PR reviews: provides reviews (evidence: `README.md`)
