Skip to content

Commit ca60962

Browse files
JAORMXclaudejhrozek
authored
Add architecture documentation (#2165)
* Add comprehensive architecture documentation This commit introduces a new architectural documentation suite in docs/arch/ that provides in-depth coverage of ToolHive's design, components, and concepts. The documentation is organized into the following sections: - 00-overview.md: High-level architecture overview and introduction - 01-deployment-modes.md: Local CLI, UI, and Kubernetes deployment patterns - 02-core-concepts.md: Core terminology, abstractions, and design patterns - 03-transport-architecture.md: MCP transport protocols and proxy architecture - 04-secrets-management.md: Secret handling and backend integrations - 05-runconfig-and-permissions.md: Configuration schema and security profiles - 06-registry-system.md: Registry architecture and distribution - 07-groups.md: Group management and virtual MCP servers - 08-workloads-lifecycle.md: Workload state management and operations - 09-operator-architecture.md: Kubernetes operator design and patterns - README.md: Navigation guide and documentation index This documentation serves as the canonical reference for understanding ToolHive's architecture, making it easier for contributors to navigate the codebase and for users to understand deployment options. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]> Signed-off-by: Juan Antonio Osorio <[email protected]> * Address review feedback on architecture docs Made the following changes based on review comments: - Fix API version references: point to actual examples instead of inline YAML - Fix CRD names: ToolConfig → MCPToolConfig, add MCPExternalAuthConfig - Remove all line number references from code file paths - Fix CLI commands: registry show → info, group delete → rm - Remove non-existent CLI commands from documentation - Fix 1Password implementation details (uses SDK not CLI) - Point to cmd/thv-operator/ README instead of duplicating info - Add note that thv-registry-api is moving out of tree These changes make the documentation more maintainable by reducing references to implementation details that change frequently and ensuring all commands and APIs referenced actually exist. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]> * Address additional review feedback on architecture docs Reduces duplication and improves maintainability of architecture documentation: - Remove duplicated Core Concepts section from overview, replace with brief summary - Update stdio flow diagram to show independent stdin/stdout streams more clearly - Add context for when to use exported configs (sharing, migration, version control) - Remove Project Structure section to reduce maintenance burden - Simplify Registry API Server section with note about out-of-tree migration - Fix persistent volume statement in Kubernetes scaling section 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]> * Clarify concepts and add explanations per review feedback - Change "metrics" to "telemetry" for proxy endpoints clarity - Clarify stdio session limitations (single connection to container) - Explain why tool filter vs tool call filter (context optimization) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]> * Fix code formatting for WriteCloser and ReadCloser Use backticks for proper code formatting in attach process documentation. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]> * Fix incorrect group commands in documentation Remove non-existent commands and fix interactive command documentation: - Remove 'thv group move' (doesn't exist) - Fix 'thv client setup' description (is interactive, doesn't take client name) - Update group operations list to match actual CLI 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]> * Clarify scaling considerations and transport limitations - Soften HA scaling claim (not currently tested) - Add stdio transport limitation for proxy scaling - Clarify MCP server scaling applies to SSE/Streamable HTTP transports 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]> * Mark SSE transport as deprecated in MCP spec Add note that SSE transport is deprecated in the MCP specification, though ToolHive continues to support it with potential future transition. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]> * Replace embedded RunConfig struct with link to source Replace full struct definition with link to pkg/runner/config.go and categorized field summary to reduce maintenance burden. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]> * Fix commands and paths based on actual code verification Verified against source code and corrected: - Export command syntax (requires 2 args: workload and path, no stdout) - Cedar policy format (Client:: not User::, Action::call_tool not "tools/call") - Group operations (thv list --group, not thv group list <name>) - File locations (data files in ~/.local/share, state in ~/.local/state) - Complete socket paths including macOS locations (Podman Machine, Docker Desktop, Rancher) All changes verified against pkg/authz/cedar.go, cmd/thv/app/export.go, pkg/container/docker/sdk/client_unix.go, and pkg state/workloads code. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]> * Fix Scalar UI path and audit event types Verified against actual code: - Scalar UI path is /api/doc not /scalar (pkg/api/docs.go:13, server.go:234) - Fixed audit event types based on pkg/audit/mcp_events.go (15 total types) - Corrected mcp_list_operation to actual types: mcp_tools_list, mcp_resources_list, mcp_prompts_list 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]> * Remove outdated project structure reference from README Project structure section was removed from overview, update index to match. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]> * Address review comments on core concepts documentation - Clarify tool-filter and tool-call-filter middleware descriptions - Separate tool filtering from tool overriding in documentation - Rename "Filter" section to "Filter and Override" to reflect both operations - Change "metrics" to "telemetry" for consistency with middleware naming - Explain that both middlewares work together with shared configuration 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]> * Address review comments on core concepts documentation - Replace CRD examples with references to examples/operator/mcp-servers/ directory - Fix export command syntax (thv export requires output path) - Fix group commands documentation (thv list --group instead of thv group list) - Refocus groups documentation on architecture rather than CLI usage - Remove excessive CLI usage examples to reduce maintenance burden All changes verified against actual codebase implementation. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]> * Clarify security and Kubernetes secrets handling - Clarify token storage security in remote authentication (AES-256-GCM encryption) - Add Kubernetes Mode section to secrets documentation explaining native K8s Secret usage - Note that Kubernetes uses SecretKeyRef, not the provider system used in CLI mode 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]> * Add architecture documentation maintenance guidance Add a new section to CLAUDE.md instructing agents to update architecture documentation when making code changes. Includes a mapping table of code areas to documentation files and guidelines for keeping docs in sync with implementation. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]> * Address PR feedback on core concepts documentation Fix all 12 unresolved review comments by improving architectural focus: - Remove CLI command examples, focus on architectural concepts - Update file path references to actual implementation files - Fix middleware type name from 'authz' to 'authorization' - Organize RunConfig fields by architectural categories - Simplify audit events to categories instead of exhaustive list - Simplify request flow diagram and reference middleware.md - Correct file paths for registry, session, client, MCP, audit, monitor, healthcheck These changes align the documentation with architectural best practices: focusing on concepts, patterns, and system design rather than CLI usage or exhaustive implementation details. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]> * Fix transport architecture documentation inaccuracies Address PR feedback by removing CLI examples and correcting technical details: - Remove all CLI command examples (architecture docs should focus on design, not usage) - Fix container monitor path: pkg/container/docker/monitor.go (not pkg/container/monitor.go) - Correct OAuth token storage: tokens managed in-memory by TokenSource, not persisted - Clarify MCP_HOST: defaults to 127.0.0.1 locally, 0.0.0.0 in Kubernetes - Replace CLI examples with architectural descriptions of concepts - Update port management to describe architecture, not command flags - Document TokenSource pattern and client credential storage distinction These changes align documentation with actual implementation and follow architecture documentation best practices. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]> * Fix runconfig and secrets documentation inaccuracies Address final round of PR feedback by removing CLI examples and correcting technical details: - Remove all CLI command examples from architecture docs - Fix 1Password implementation: SDK not CLI (diagram and text) - Add missing secret providers: environment and none - Document Environment provider security: ListSecrets disabled for security - Correct environment variable merge order with architectural reasoning - Fix Windows path handling: allowed as host paths only, not container paths - Replace export/import CLI examples with architectural descriptions - Update permission auditing, network isolation, secrets management sections - Remove CLI flags from custom profiles section All changes verified by toolhive-expert agent. Documentation now focuses on architectural concepts and design patterns rather than CLI usage. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]> * Address all unresolved PR review comments Fix architecture documentation inaccuracies identified in code review: Registry System (06): - Update file references to actual provider implementation files - Remove reference to non-existent README - Fix annotation keys to use correct toolhive.stacklok.dev domain - Correct MCPRegistry phases (remove Degraded, add Terminating) - Fix YAML examples (apiVersion, Git repository field, sync policy) - Remove incomplete OAuth example - Update CLI flags to match actual implementation - Remove reference to non-existent converter command - Simplify architecture diagram to reflect actual implementation Groups (07): - Clarify group move functionality is internal only - Add note about empty default registry groups - Remove stale PR reference, use generic description Workloads Lifecycle (08): - Remove all line number references per documentation guidelines - Fix storage paths to match XDG directory structure - Correct label format to simple prefix style Operator Architecture (09): - Fix MCPExternalAuthConfig filename reference - Add missing controller reference - Remove incorrect StatusCollector example code - Fix sync trigger annotation key All changes verified against actual code implementation. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]> * remove backup file Signed-off-by: Juan Antonio Osorio <[email protected]> * Fix workloads lifecycle architecture documentation Remove CLI-focused content and maintain architecture focus: - Fix state transition: container exit goes to stopped (was already correct in diagram) - Remove non-existent update command section - Remove CLI examples from List section, describe architecture instead - Rename 'Async Operations' to 'Batch Operations' for clarity - Remove CLI flags from filtering, describe capability architecturally - Expand label descriptions with purpose/meaning Architecture docs should describe system design, not CLI usage. Verified against pkg/workloads/manager.go and pkg/container/runtime/types.go 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]> * Address PR review feedback on deployment modes documentation - Clarify that Rancher Desktop is Docker-compatible and detected as Docker runtime type - Convert CRD API documentation reference to clickable link - Convert operator DESIGN.md reference to clickable link Rancher Desktop is included in the Docker section because it's detected as runtime.TypeDocker in the code (pkg/container/docker/sdk/client_unix.go:188), not as a separate runtime type like Colima or Podman. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]> * Address PR review feedback on architecture documentation Fix all unresolved PR review comments from PR #2165: - Fix file paths and references to match actual codebase structure - Correct API endpoint paths to use /api/v1beta/ prefix - Update container runtime paths and support descriptions - Fix environment variable merge order and documentation - Correct secrets storage paths using XDG specification - Update MCP_HOST behavior documentation (always 127.0.0.1) - Fix permission profile selection priority and defaults - Update Sigstore verification status to implemented - Fix operator CRD status structures and phase names - Add MCPRemoteProxy CRD documentation - Complete operator-created resources list with RBAC details - Fix ConfigMap storage format and sync policy documentation - Clarify OIDC and authorization ConfigMap patterns - Update egress proxy implementation details - Fix state storage directory name to 'runconfigs' All changes verified against actual codebase implementation to ensure documentation accuracy. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]> * Update docs/arch/05-runconfig-and-permissions.md Co-authored-by: Jakub Hrozek <[email protected]> --------- Signed-off-by: Juan Antonio Osorio <[email protected]> Co-authored-by: Claude <[email protected]> Co-authored-by: Jakub Hrozek <[email protected]>
1 parent 89796e7 commit ca60962

12 files changed

+4685
-0
lines changed

CLAUDE.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,39 @@ Follow conventional commit format:
201201
- Do not end subject line with period
202202
- Use body to explain what and why vs. how
203203

204+
## Architecture Documentation
205+
206+
ToolHive maintains comprehensive architecture documentation in `docs/arch/`. When making changes that affect architecture, you MUST update the relevant documentation to keep it in sync with the code.
207+
208+
### When to Update Documentation
209+
210+
Update architecture docs when you:
211+
- Add or modify core components (workloads, transports, middleware, permissions, registry, groups)
212+
- Change system design patterns, abstractions, or interfaces
213+
- Modify the RunConfig schema or permission profiles
214+
- Update the Kubernetes operator or CRDs
215+
- Add new architectural concepts or change how components interact
216+
217+
### Which Documentation to Update
218+
219+
| Code Changes | Documentation Files |
220+
|--------------|---------------------|
221+
| Core packages (`pkg/workloads/`, `pkg/transport/`, `pkg/permissions/`, `pkg/registry/`, `pkg/groups/`) | `docs/arch/02-core-concepts.md` + topic-specific doc (e.g., `08-workloads-lifecycle.md`, `06-registry-system.md`) |
222+
| RunConfig schema (`pkg/runner/config.go`) | `docs/arch/05-runconfig-and-permissions.md` |
223+
| Middleware (`pkg/*/middleware.go`) | `docs/middleware.md` and `docs/arch/02-core-concepts.md` |
224+
| Operator or CRDs (`cmd/thv-operator/`, `api/`) | `docs/arch/09-operator-architecture.md` |
225+
| Major architectural changes | `docs/arch/00-overview.md` and `docs/arch/02-core-concepts.md` |
226+
227+
### Documentation Guidelines
228+
229+
- Include code references using `file_path` format (without line numbers since they change frequently)
230+
- Update Mermaid diagrams when component interactions change
231+
- Keep terminology consistent with definitions in `docs/arch/02-core-concepts.md`
232+
- Cross-reference related documentation
233+
- Explain design decisions and the "why" behind changes
234+
235+
For the complete documentation structure and navigation, see `docs/arch/README.md`.
236+
204237
## Development Best Practices
205238

206239
- **Linting**:

docs/arch/00-overview.md

Lines changed: 267 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,267 @@
1+
# ToolHive Architecture Overview
2+
3+
## Introduction
4+
5+
ToolHive is a lightweight, secure platform for managing MCP (Model Context Protocol) servers. It provides a comprehensive infrastructure that goes beyond simple container orchestration, offering rich middleware capabilities, security features, and flexible deployment options.
6+
7+
## What is ToolHive?
8+
9+
ToolHive is a **platform** - not just a container runner. It provides the building blocks needed to:
10+
11+
- **Securely deploy** MCP servers with network isolation and permission profiles
12+
- **Proxy and enhance** MCP server communications with middleware
13+
- **Aggregate and compose** multiple MCP servers into unified interfaces
14+
- **Manage at scale** using Kubernetes operators or local deployments
15+
- **Curate and distribute** trusted MCP server registries
16+
17+
The platform is designed to be extensible, allowing developers to build on top of its proxy and middleware capabilities.
18+
19+
## High-Level Architecture
20+
21+
```mermaid
22+
graph TB
23+
subgraph "Client Layer"
24+
Client[MCP Client<br/>Claude Desktop, IDEs, etc.]
25+
end
26+
27+
subgraph "ToolHive Platform"
28+
Proxy[Proxy Layer<br/>Transport Handlers]
29+
Middleware[Middleware Chain<br/>Auth, Authz, Audit, etc.]
30+
Workloads[Workloads Manager<br/>Lifecycle Management]
31+
Registry[Registry<br/>Curated MCP Servers]
32+
end
33+
34+
subgraph "Runtime Layer"
35+
Docker[Docker/Podman<br/>Local Runtime]
36+
K8s[Kubernetes<br/>Cluster Runtime]
37+
end
38+
39+
subgraph "MCP Servers"
40+
MCPS1[MCP Server 1]
41+
MCPS2[MCP Server 2]
42+
MCPS3[MCP Server N]
43+
end
44+
45+
Client --> Proxy
46+
Proxy --> Middleware
47+
Middleware --> Workloads
48+
Workloads --> Registry
49+
Workloads --> Docker
50+
Workloads --> K8s
51+
Docker --> MCPS1
52+
Docker --> MCPS2
53+
K8s --> MCPS3
54+
55+
style ToolHive Platform fill:#e1f5fe
56+
style Runtime Layer fill:#fff3e0
57+
style MCP Servers fill:#f3e5f5
58+
```
59+
60+
## Key Components
61+
62+
### 1. Command-Line Interface (thv)
63+
64+
The primary CLI tool for managing MCP servers locally. Located in `cmd/thv/`.
65+
66+
**Key responsibilities:**
67+
- Start, stop, restart, and manage MCP server workloads
68+
- Configure middleware, authentication, and authorization
69+
- Export and import workload configurations
70+
- Manage groups and client configurations
71+
72+
**Usage patterns:**
73+
```bash
74+
# Run from registry
75+
thv run server-name
76+
77+
# Run from container image
78+
thv run ghcr.io/example/mcp-server:latest
79+
80+
# Run using protocol schemes
81+
thv run uvx://package-name
82+
thv run npx://package-name
83+
thv run go://package-name
84+
```
85+
86+
### 2. Kubernetes Operator (thv-operator)
87+
88+
Manages MCP servers in Kubernetes clusters using custom resources.
89+
90+
The operator watches for `MCPServer`, `MCPRegistry`, `MCPToolConfig`, and `MCPExternalAuthConfig` CRDs, reconciling them into Kubernetes resources (Deployments, StatefulSets, Services).
91+
92+
**For details**, see:
93+
- [`cmd/thv-operator/README.md`](../../cmd/thv-operator/README.md) - Operator overview and usage
94+
- [`cmd/thv-operator/DESIGN.md`](../../cmd/thv-operator/DESIGN.md) - Design decisions and patterns
95+
- [`docs/operator/crd-api.md`](../operator/crd-api.md) - Complete CRD API reference
96+
- [Operator Architecture](09-operator-architecture.md) - Architecture documentation
97+
98+
### 3. Proxy Runner (thv-proxyrunner)
99+
100+
A specialized binary used by the Kubernetes operator. Located in `cmd/thv-proxyrunner/`.
101+
102+
**Key responsibilities:**
103+
- Run as proxy container in Kubernetes Deployments
104+
- Dynamically create and manage MCP server StatefulSets via the Kubernetes API
105+
- Handle transport-specific proxying (SSE, streamable-http, stdio)
106+
- Apply middleware chain to incoming requests
107+
108+
**Deployment pattern:**
109+
```
110+
Deployment (proxy-runner) -> StatefulSet (MCP server)
111+
```
112+
113+
### 4. Registry API Server (thv-registry-api)
114+
115+
A registry API server for hosting custom MCP server registries. Located in `cmd/thv-registry-api/`.
116+
117+
> **Note**: The registry API server is being moved out of the main ToolHive repository into its own project.
118+
119+
**Key responsibilities:**
120+
- Serve MCP server registry data
121+
- Support ToolHive's registry format
122+
- Future support for upstream MCP registry format
123+
- Provide file-based and Kubernetes ConfigMap storage
124+
125+
## Core Concepts
126+
127+
For detailed definitions and relationships, see [Core Concepts](02-core-concepts.md).
128+
129+
**Key concepts:**
130+
- **Workloads** - Complete deployment units (container + proxy + config)
131+
- **Transports** - Communication protocols (stdio, SSE, streamable-http)
132+
- **Middleware** - Composable request processing layers
133+
- **RunConfig** - Portable configuration format
134+
- **Permission Profiles** - Security policies
135+
- **Groups** - Logical server collections
136+
- **Registry** - Catalog of trusted MCP servers
137+
138+
## Deployment Modes
139+
140+
### Local Mode
141+
142+
ToolHive can run locally in two ways:
143+
144+
#### 1. CLI Mode
145+
146+
Direct command-line usage via `thv` binary:
147+
- Spawns MCP servers as detached processes
148+
- Uses Docker/Podman/Colima/Rancher Desktop for container runtime
149+
- Stores state using XDG Base Directory Specification (typically `~/.config/toolhive/`, `~/.local/state/toolhive/`)
150+
151+
#### 2. UI Mode
152+
153+
Via [ToolHive Studio](https://github.com/stacklok/toolhive-studio):
154+
- Spawns a ToolHive API server (`thv serve`)
155+
- Exposes RESTful API for UI operations
156+
- Uses Docker/Podman/Colima/Rancher Desktop for containers
157+
- Provides web-based management interface
158+
159+
### Kubernetes Mode
160+
161+
Everything is driven by `thv-operator`:
162+
- Listens for Kubernetes custom resources
163+
- Creates Kubernetes-native resources (Deployments, StatefulSets, Services)
164+
- Uses `thv-proxyrunner` binary (not `thv`)
165+
- Provides cluster-scale management
166+
167+
**Deployment pattern:**
168+
```
169+
Deployment (thv-proxyrunner) -> StatefulSet (MCP server container)
170+
```
171+
172+
## How ToolHive Proxies MCP Traffic
173+
174+
### For Stdio Transport
175+
176+
```mermaid
177+
sequenceDiagram
178+
participant Client
179+
participant Middleware
180+
participant Proxy as Stdio Proxy
181+
participant Stdin as Container<br/>stdin
182+
participant Stdout as Container<br/>stdout
183+
184+
Note over Client,Stdout: Middleware at HTTP Boundary
185+
186+
rect rgb(230, 240, 255)
187+
Note over Client,Stdin: Independent Flow: Client → Container
188+
Client->>Middleware: HTTP Request (SSE or Streamable)
189+
Middleware->>Proxy: After auth/authz/audit
190+
Note over Proxy: HTTP → JSON-RPC
191+
Proxy->>Stdin: Write to stdin
192+
end
193+
194+
rect rgb(255, 240, 230)
195+
Note over Stdout,Client: Independent Flow: Container → Client (async)
196+
Stdout->>Proxy: Read from stdout
197+
Note over Proxy: JSON-RPC → HTTP
198+
Proxy->>Client: SSE (broadcast) or Streamable (correlated)
199+
end
200+
201+
Note over Client,Stdout: stdin and stdout are independent streams
202+
```
203+
204+
### For SSE/Streamable HTTP Transports
205+
206+
```mermaid
207+
sequenceDiagram
208+
participant Client
209+
participant Proxy as Transparent Proxy
210+
participant Container as MCP Server
211+
212+
Client->>Proxy: HTTP Request
213+
Proxy->>Proxy: Apply Middleware
214+
Proxy->>Container: Forward Request
215+
Container->>Proxy: HTTP Response
216+
Proxy->>Client: Forward Response
217+
```
218+
219+
## Protocol Builds
220+
221+
ToolHive supports automatic containerization of packages using protocol schemes:
222+
223+
- `uvx://package-name` - Python packages via `uv`
224+
- `npx://package-name` - Node.js packages via `npx`
225+
- `go://package-name` - Go packages
226+
- `go://./local-path` - Local Go projects
227+
228+
These are automatically converted to container images at runtime.
229+
230+
## Five Ways to Run an MCP Server
231+
232+
1. **From Registry**: `thv run server-name`
233+
2. **From Container Image**: `thv run ghcr.io/example/mcp:latest`
234+
3. **Using Protocol Scheme**: `thv run uvx://package-name`
235+
4. **From Exported Config**: `thv run --from-config path/to/config.json` - Useful for sharing configurations, migrating workloads, or version-controlling server setups
236+
5. **Remote MCP Server**: `thv run <URL>`
237+
238+
## Related Documentation
239+
240+
- [Deployment Modes](01-deployment-modes.md) - Detailed deployment patterns
241+
- [Core Concepts](02-core-concepts.md) - Deep dive into nouns and verbs
242+
- [Transport Architecture](03-transport-architecture.md) - Transport handlers and proxies
243+
- [Middleware](../middleware.md) - Middleware chain and extensibility
244+
- [RunConfig and Permissions](05-runconfig-and-permissions.md) - Configuration schema
245+
- [Registry System](06-registry-system.md) - Registry architecture
246+
- [Groups](07-groups.md) - Groups and organization
247+
- [Workloads Lifecycle](08-workloads-lifecycle.md) - Workload management
248+
- [Operator Architecture](09-operator-architecture.md) - Kubernetes operator design
249+
250+
## Getting Started
251+
252+
For developers building on ToolHive, start with:
253+
254+
1. Read [Core Concepts](02-core-concepts.md) to understand terminology
255+
2. Review [Middleware](../middleware.md) to extend functionality
256+
3. Explore [RunConfig and Permissions](05-runconfig-and-permissions.md) for configuration
257+
4. Check [Deployment Modes](01-deployment-modes.md) for platform-specific implementations
258+
259+
## Contributing
260+
261+
When contributing to ToolHive's architecture:
262+
263+
1. Ensure changes maintain the platform abstraction
264+
2. Add middleware as composable components
265+
3. Keep RunConfig as part of the API contract (versioned schema)
266+
4. Follow the factory pattern for runtime-specific implementations
267+
5. Update architecture documentation when adding new concepts

0 commit comments

Comments
 (0)