# vladutt/hobstack architecture

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

- Interactive diagram: https://gitdiagram.com/vladutt/hobstack
- Repository: https://github.com/vladutt/hobstack

## Overview

HobStack is a local desktop/tray app for coordinating Claude Code agent teams through a browser UI. A user creates a project and team, assigns goals, tracks task work and review on a live board, responds to permission requests, and inspects saved results. The main product branches are project setup and administration, team/task orchestration, agent execution and MCP tools, and the browser/API plus persistent state. README capabilities guide the workflow links; sampled source is partial, so some internal handoffs are not verified.

Main entry points: [`internal/web/static/js/app.js`](https://github.com/vladutt/hobstack/blob/main/internal/web/static/js/app.js) (Browser UI), [`internal/web/static/js/api.js`](https://github.com/vladutt/hobstack/blob/main/internal/web/static/js/api.js) (JSON client), [`internal/web/server.go`](https://github.com/vladutt/hobstack/blob/main/internal/web/server.go) (HTTP API), [`internal/team/team.go`](https://github.com/vladutt/hobstack/blob/main/internal/team/team.go) (Team management)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Browser interface"]
  node_browser["Browser UI<br/>[app.js]"]
  node_webapi["HTTP API<br/>[server.go]"]
  node_jsapi["JSON client<br/>[api.js]"]
  node_projectsview["Project workspace<br/>[projects.js]"]
  node_workspace["Workspace views<br/>[workspace.js]"]
  node_codeview["Code viewer<br/>[code-explorer.js]"]
  node_libraryview["Library UI<br/>[library.js]"]
  node_setupview["Setup wizard<br/>[setup.js]"]
  node_settingsview["Settings UI<br/>[settings.js]"]
  node_navigation["Project navigation"]
  node_tabs["Project tabs<br/>[project-tabs.js]"]
  node_omnibox["Search and message<br/>[omnibox.js]"]
  node_onboarding["Onboarding<br/>[onboarding.js]"]
  node_category["Categories<br/>[category.js]"]
  node_commands["Command rules UI<br/>[commands.js]"]
end

subgraph group_projects["Projects and setup"]
  node_newproject["Project creation<br/>[new-project.js]"]
  node_projectcache["Project cache<br/>[project-cache.js]"]
  node_setup["Project analysis<br/>[manager.go]"]
  node_library["Shared library<br/>[library.go]"]
  node_mcpregistry["MCP registry<br/>[registry.go]"]
end

subgraph group_teams["Team orchestration"]
  node_team["Team management<br/>[team.go]"]
  node_taskapi["Task endpoints<br/>[api_tasks.go]"]
end

subgraph group_agents["Agent runtime"]
  node_runner["Agent runner<br/>[runner.go]"]
  node_teamrun["Team execution<br/>[run.go]"]
  node_mcp["MCP tools<br/>[server.go]"]
  node_claude["Claude Code CLI<br/>[claudecli.go]"]
end

subgraph group_state["State and platform"]
  node_taskstore[("Task records<br/>[tasks.go]")]
  node_sqlite[("SQLite state<br/>[store.go]")]
  node_events["Live events<br/>[hub.go]"]
  node_tray["Tray application<br/>[main.go]"]
end

node_user(("User"))

node_user -->|"uses"| node_browser
node_browser -->|"makes requests"| node_jsapi
node_jsapi -->|"calls HTTP API"| node_webapi
node_browser -->|"routes to"| node_projectsview
node_browser -->|"routes to"| node_workspace
node_browser -->|"routes to"| node_setupview
node_browser -->|"updates recents"| node_navigation
node_browser -->|"updates tabs"| node_tabs
node_browser -.->|"shows tips"| node_onboarding
node_projectsview -->|"loads projects"| node_jsapi
node_newproject -->|"creates project"| node_jsapi
node_setupview -->|"submits setup"| node_webapi
node_codeview -->|"loads project files"| node_jsapi
node_libraryview -->|"manages library"| node_jsapi
node_settingsview -->|"renders rules"| node_commands
node_omnibox -->|"reads recents"| node_navigation
node_webapi -.->|"routes task calls"| node_taskapi
node_user -->|"defines project goals"| node_setup
node_setup -.->|"configures team"| node_team
node_user -->|"assigns goals"| node_team
node_team -->|"coordinates work"| node_teamrun
node_teamrun -.->|"runs agents"| node_runner
node_runner -->|"starts headless CLI"| node_claude
node_runner -->|"uses role tools"| node_mcp
node_mcp -->|"changes task state"| node_team
node_team -->|"saves tasks"| node_taskstore
node_taskstore -.->|"persists records"| node_sqlite
node_webapi -.->|"manages shared items"| node_library
node_webapi -.->|"manages MCP servers"| node_mcpregistry
node_teamrun -.->|"publishes live state"| node_events
node_user -->|"opens app"| node_tray

click node_browser "https://github.com/vladutt/hobstack/blob/main/internal/web/static/js/app.js"
click node_webapi "https://github.com/vladutt/hobstack/blob/main/internal/web/server.go"
click node_jsapi "https://github.com/vladutt/hobstack/blob/main/internal/web/static/js/api.js"
click node_projectsview "https://github.com/vladutt/hobstack/blob/main/internal/web/static/js/projects.js"
click node_workspace "https://github.com/vladutt/hobstack/blob/main/internal/web/static/js/workspace.js"
click node_codeview "https://github.com/vladutt/hobstack/blob/main/internal/web/static/js/code-explorer.js"
click node_libraryview "https://github.com/vladutt/hobstack/blob/main/internal/web/static/js/library.js"
click node_setupview "https://github.com/vladutt/hobstack/blob/main/internal/web/static/js/setup.js"
click node_settingsview "https://github.com/vladutt/hobstack/blob/main/internal/web/static/js/settings.js"
click node_navigation "https://github.com/vladutt/hobstack/blob/main/internal/web/static/js/project-switcher.js"
click node_tabs "https://github.com/vladutt/hobstack/blob/main/internal/web/static/js/project-tabs.js"
click node_omnibox "https://github.com/vladutt/hobstack/blob/main/internal/web/static/js/omnibox.js"
click node_onboarding "https://github.com/vladutt/hobstack/blob/main/internal/web/static/js/onboarding.js"
click node_category "https://github.com/vladutt/hobstack/blob/main/internal/web/static/js/category.js"
click node_commands "https://github.com/vladutt/hobstack/blob/main/internal/web/static/js/commands.js"
click node_newproject "https://github.com/vladutt/hobstack/blob/main/internal/web/static/js/new-project.js"
click node_projectcache "https://github.com/vladutt/hobstack/blob/main/internal/web/static/js/project-cache.js"
click node_setup "https://github.com/vladutt/hobstack/blob/main/internal/setup/manager.go"
click node_team "https://github.com/vladutt/hobstack/blob/main/internal/team/team.go"
click node_taskapi "https://github.com/vladutt/hobstack/blob/main/internal/web/api_tasks.go"
click node_taskstore "https://github.com/vladutt/hobstack/blob/main/internal/store/tasks.go"
click node_runner "https://github.com/vladutt/hobstack/blob/main/internal/runner/runner.go"
click node_teamrun "https://github.com/vladutt/hobstack/blob/main/internal/team/run.go"
click node_mcp "https://github.com/vladutt/hobstack/blob/main/internal/mcp/server.go"
click node_claude "https://github.com/vladutt/hobstack/blob/main/internal/claudecli/claudecli.go"
click node_library "https://github.com/vladutt/hobstack/blob/main/internal/library/library.go"
click node_mcpregistry "https://github.com/vladutt/hobstack/blob/main/internal/mcpregistry/registry.go"
click node_sqlite "https://github.com/vladutt/hobstack/blob/main/internal/store/store.go"
click node_events "https://github.com/vladutt/hobstack/blob/main/internal/events/hub.go"
click node_tray "https://github.com/vladutt/hobstack/blob/main/cmd/hobstack/main.go"

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_browser,node_webapi,node_jsapi,node_projectsview,node_workspace,node_codeview,node_libraryview,node_setupview,node_settingsview,node_navigation,node_tabs,node_omnibox,node_onboarding,node_category,node_commands,node_user toneBlue
class node_newproject,node_projectcache,node_setup,node_library,node_mcpregistry toneAmber
class node_team,node_taskapi toneMint
class node_runner,node_teamrun,node_mcp,node_claude toneRose
class node_taskstore,node_sqlite,node_events,node_tray toneIndigo
```

## Components

### Browser interface

- [Browser UI](https://github.com/vladutt/hobstack/blob/main/internal/web/static/js/app.js): `internal/web/static/js/app.js`
- [HTTP API](https://github.com/vladutt/hobstack/blob/main/internal/web/server.go): `internal/web/server.go`
- [JSON client](https://github.com/vladutt/hobstack/blob/main/internal/web/static/js/api.js): `internal/web/static/js/api.js`
- [Project workspace](https://github.com/vladutt/hobstack/blob/main/internal/web/static/js/projects.js): `internal/web/static/js/projects.js`
- [Workspace views](https://github.com/vladutt/hobstack/blob/main/internal/web/static/js/workspace.js): `internal/web/static/js/workspace.js`
- [Code viewer](https://github.com/vladutt/hobstack/blob/main/internal/web/static/js/code-explorer.js): `internal/web/static/js/code-explorer.js`
- [Library UI](https://github.com/vladutt/hobstack/blob/main/internal/web/static/js/library.js): `internal/web/static/js/library.js`
- [Setup wizard](https://github.com/vladutt/hobstack/blob/main/internal/web/static/js/setup.js): `internal/web/static/js/setup.js`
- [Settings UI](https://github.com/vladutt/hobstack/blob/main/internal/web/static/js/settings.js): `internal/web/static/js/settings.js`
- [Project navigation](https://github.com/vladutt/hobstack/blob/main/internal/web/static/js/project-switcher.js): `internal/web/static/js/project-switcher.js`
- [Project tabs](https://github.com/vladutt/hobstack/blob/main/internal/web/static/js/project-tabs.js): `internal/web/static/js/project-tabs.js`
- [Search and message](https://github.com/vladutt/hobstack/blob/main/internal/web/static/js/omnibox.js): `internal/web/static/js/omnibox.js`
- [Onboarding](https://github.com/vladutt/hobstack/blob/main/internal/web/static/js/onboarding.js): `internal/web/static/js/onboarding.js`
- [Categories](https://github.com/vladutt/hobstack/blob/main/internal/web/static/js/category.js): `internal/web/static/js/category.js`
- [Command rules UI](https://github.com/vladutt/hobstack/blob/main/internal/web/static/js/commands.js): `internal/web/static/js/commands.js`

### Projects and setup

- [Project creation](https://github.com/vladutt/hobstack/blob/main/internal/web/static/js/new-project.js): `internal/web/static/js/new-project.js`
- [Project cache](https://github.com/vladutt/hobstack/blob/main/internal/web/static/js/project-cache.js): `internal/web/static/js/project-cache.js`
- [Project analysis](https://github.com/vladutt/hobstack/blob/main/internal/setup/manager.go): `internal/setup/manager.go`
- [Shared library](https://github.com/vladutt/hobstack/blob/main/internal/library/library.go): `internal/library/library.go`
- [MCP registry](https://github.com/vladutt/hobstack/blob/main/internal/mcpregistry/registry.go): `internal/mcpregistry/registry.go`

### Team orchestration

- [Team management](https://github.com/vladutt/hobstack/blob/main/internal/team/team.go): `internal/team/team.go`
- [Task endpoints](https://github.com/vladutt/hobstack/blob/main/internal/web/api_tasks.go): `internal/web/api_tasks.go`

### Agent runtime

- [Agent runner](https://github.com/vladutt/hobstack/blob/main/internal/runner/runner.go): `internal/runner/runner.go`
- [Team execution](https://github.com/vladutt/hobstack/blob/main/internal/team/run.go): `internal/team/run.go`
- [MCP tools](https://github.com/vladutt/hobstack/blob/main/internal/mcp/server.go): `internal/mcp/server.go`
- [Claude Code CLI](https://github.com/vladutt/hobstack/blob/main/internal/claudecli/claudecli.go): `internal/claudecli/claudecli.go`

### State and platform

- [Task records](https://github.com/vladutt/hobstack/blob/main/internal/store/tasks.go): `internal/store/tasks.go`
- [SQLite state](https://github.com/vladutt/hobstack/blob/main/internal/store/store.go): `internal/store/store.go`
- [Live events](https://github.com/vladutt/hobstack/blob/main/internal/events/hub.go): `internal/events/hub.go`
- [Tray application](https://github.com/vladutt/hobstack/blob/main/cmd/hobstack/main.go): `cmd/hobstack/main.go`

### Other components

- **User**

## Connections

- User → Browser UI: uses
- Browser UI → JSON client: makes requests (evidence: `internal/web/static/js/app.js`)
- JSON client → HTTP API: calls HTTP API
- Browser UI → Project workspace: routes to (evidence: `internal/web/static/js/app.js`)
- Browser UI → Workspace views: routes to (evidence: `internal/web/static/js/app.js`)
- Browser UI → Setup wizard: routes to (evidence: `internal/web/static/js/app.js`)
- Browser UI → Project navigation: updates recents (evidence: `internal/web/static/js/app.js`)
- Browser UI → Project tabs: updates tabs (evidence: `internal/web/static/js/app.js`)
- Browser UI → Onboarding: shows tips (evidence: `internal/web/static/js/app.js`)
- Project workspace → JSON client: loads projects (evidence: `internal/web/static/js/projects.js`)
- Project creation → JSON client: creates project (evidence: `internal/web/static/js/new-project.js`)
- Setup wizard → HTTP API: submits setup (evidence: `internal/web/static/js/setup.js`)
- Code viewer → JSON client: loads project files (evidence: `internal/web/static/js/code-explorer.js`)
- Library UI → JSON client: manages library (evidence: `internal/web/static/js/library.js`)
- Settings UI → Command rules UI: renders rules (evidence: `internal/web/static/js/settings.js`)
- Search and message → Project navigation: reads recents (evidence: `internal/web/static/js/omnibox.js`)
- HTTP API → Task endpoints: routes task calls
- User → Project analysis: defines project goals
- Project analysis → Team management: configures team
- User → Team management: assigns goals
- Team management → Team execution: coordinates work
- Team execution → Agent runner: runs agents
- Agent runner → Claude Code CLI: starts headless CLI
- Agent runner → MCP tools: uses role tools
- MCP tools → Team management: changes task state
- Team management → Task records: saves tasks
- Task records → SQLite state: persists records
- HTTP API → Shared library: manages shared items
- HTTP API → MCP registry: manages MCP servers
- Team execution → Live events: publishes live state
- User → Tray application: opens app
