# h3ma209/blitz architecture

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

- Interactive diagram: https://gitdiagram.com/h3ma209/blitz
- Repository: https://github.com/h3ma209/blitz

## Overview

Blitz is a local-first API client with a desktop workbench and headless CLI/MCP workflows. Users define requests in collections, configure environments and secrets, execute requests across supported protocols, then inspect responses or run collections and performance checks. Separate product stages cover import/export, scripting and assertions, and Git-backed team sync. The graph preserves major README capabilities; unsampled subsystem links are documented by the README rather than inferred from filenames.

Main entry points: [`src/ui/workbench/mod.rs`](https://github.com/h3ma209/blitz/blob/master/src/ui/workbench/mod.rs) (Workbench), [`src/runtime/pipeline.rs`](https://github.com/h3ma209/blitz/blob/master/src/runtime/pipeline.rs) (Request pipeline), [`src/ui/workbench/state.rs`](https://github.com/h3ma209/blitz/blob/master/src/ui/workbench/state.rs) (Workbench state), [`src/core/collection.rs`](https://github.com/h3ma209/blitz/blob/master/src/core/collection.rs) (Collections)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interaction["Client surfaces"]
  node_app["Application entry<br/>[main.rs]"]
  node_workbench["Workbench<br/>[mod.rs]"]
  node_request_ui["Request editor<br/>[request_builder.rs]"]
  node_response_ui["Response viewer<br/>[response_viewer.rs]"]
  node_collection_ui["Collection sidebar<br/>[sidebar.rs]"]
  node_settings_ui["Settings<br/>[settings_panel.rs]"]
end

subgraph group_domain["Request workspace"]
  node_state["Workbench state<br/>[state.rs]"]
  node_request["Request model<br/>[request.rs]"]
  node_collections["Collections<br/>[collection.rs]"]
  node_environment["Environments<br/>[environment.rs]"]
  node_scripts["Scripts and assertions<br/>[sandbox.rs]"]
  node_import_export["Import and export<br/>[impex.rs]"]
end

subgraph group_execution["Execution and automation"]
  node_pipeline["Request pipeline<br/>[pipeline.rs]"]
  node_runner["Collection runner<br/>[runner.rs]"]
  node_cli["CLI runner<br/>[cli_runner.rs]"]
  node_mcp["MCP server<br/>[mcp_server.rs]"]
  node_performance["Performance tests<br/>[perf_runner.rs]"]
end

subgraph group_collaboration["Local data and sync"]
  node_storage[("Local JSON storage<br/>[json_store.rs]")]
  node_git_sync["Git collaboration<br/>[mod.rs]"]
  node_vault["Secrets vault<br/>[vault.rs]"]
end

subgraph group_integrations["Protocol integrations"]
  node_protocols["Protocol handlers"]
end

node_user(("User"))
node_ai_agent(("AI agent"))
node_ci(("CI automation"))

node_user -->|"launches"| node_app
node_app -->|"opens"| node_workbench
node_workbench -->|"renders"| node_request_ui
node_workbench -->|"renders"| node_response_ui
node_workbench -->|"renders"| node_collection_ui
node_workbench -->|"uses"| node_state
node_workbench -->|"opens"| node_settings_ui
node_request_ui -->|"edits"| node_request
node_request_ui -->|"imports"| node_import_export
node_state -->|"persists"| node_storage
node_state -->|"resolves context"| node_environment
node_state -->|"reads"| node_collections
node_workbench -->|"sends requests"| node_pipeline
node_pipeline -->|"executes"| node_request
node_pipeline -->|"runs scripts"| node_scripts
node_pipeline -.->|"dispatches"| node_protocols
node_response_ui -->|"shows results"| node_user
node_collections -->|"contains"| node_request
node_cli -->|"runs collections"| node_runner
node_runner -->|"executes requests"| node_pipeline
node_ci -->|"runs headlessly"| node_cli
node_ai_agent -->|"connects locally"| node_mcp
node_mcp -.->|"sends requests"| node_pipeline
node_mcp -.->|"lists collections"| node_collections
node_performance -.->|"tests requests"| node_pipeline
node_workbench -->|"syncs workspace"| node_git_sync
node_git_sync -->|"syncs data"| node_collections
node_git_sync -->|"syncs data"| node_environment
node_user -->|"stores secrets"| node_vault
node_user -->|"uses protocols"| node_protocols
node_user -->|"imports formats"| node_import_export

click node_app "https://github.com/h3ma209/blitz/blob/master/src/main.rs"
click node_workbench "https://github.com/h3ma209/blitz/blob/master/src/ui/workbench/mod.rs"
click node_request_ui "https://github.com/h3ma209/blitz/blob/master/src/ui/request_builder.rs"
click node_response_ui "https://github.com/h3ma209/blitz/blob/master/src/ui/response_viewer.rs"
click node_collection_ui "https://github.com/h3ma209/blitz/blob/master/src/ui/sidebar.rs"
click node_settings_ui "https://github.com/h3ma209/blitz/blob/master/src/ui/settings_panel.rs"
click node_state "https://github.com/h3ma209/blitz/blob/master/src/ui/workbench/state.rs"
click node_request "https://github.com/h3ma209/blitz/blob/master/src/core/request.rs"
click node_collections "https://github.com/h3ma209/blitz/blob/master/src/core/collection.rs"
click node_environment "https://github.com/h3ma209/blitz/blob/master/src/core/environment.rs"
click node_scripts "https://github.com/h3ma209/blitz/blob/master/src/core/sandbox.rs"
click node_import_export "https://github.com/h3ma209/blitz/blob/master/src/core/impex.rs"
click node_pipeline "https://github.com/h3ma209/blitz/blob/master/src/runtime/pipeline.rs"
click node_runner "https://github.com/h3ma209/blitz/blob/master/src/runtime/runner.rs"
click node_cli "https://github.com/h3ma209/blitz/blob/master/src/core/cli_runner.rs"
click node_mcp "https://github.com/h3ma209/blitz/blob/master/src/core/mcp_server.rs"
click node_performance "https://github.com/h3ma209/blitz/blob/master/src/core/perf_runner.rs"
click node_storage "https://github.com/h3ma209/blitz/blob/master/src/storage/json_store.rs"
click node_git_sync "https://github.com/h3ma209/blitz/blob/master/src/core/cloud_sync/mod.rs"
click node_protocols "https://github.com/h3ma209/blitz/tree/master/src/core/protocols"
click node_vault "https://github.com/h3ma209/blitz/blob/master/src/core/vault.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_workbench,node_request_ui,node_response_ui,node_collection_ui,node_settings_ui,node_user toneBlue
class node_state,node_request,node_collections,node_environment,node_scripts,node_import_export toneAmber
class node_pipeline,node_runner,node_cli,node_mcp,node_performance toneMint
class node_storage,node_git_sync,node_vault toneRose
class node_protocols,node_ai_agent,node_ci toneIndigo
```

## Components

### Client surfaces

- [Application entry](https://github.com/h3ma209/blitz/blob/master/src/main.rs): `src/main.rs`
- [Workbench](https://github.com/h3ma209/blitz/blob/master/src/ui/workbench/mod.rs): `src/ui/workbench/mod.rs`
- [Request editor](https://github.com/h3ma209/blitz/blob/master/src/ui/request_builder.rs): `src/ui/request_builder.rs`
- [Response viewer](https://github.com/h3ma209/blitz/blob/master/src/ui/response_viewer.rs): `src/ui/response_viewer.rs`
- [Collection sidebar](https://github.com/h3ma209/blitz/blob/master/src/ui/sidebar.rs): `src/ui/sidebar.rs`
- [Settings](https://github.com/h3ma209/blitz/blob/master/src/ui/settings_panel.rs): `src/ui/settings_panel.rs`

### Request workspace

- [Workbench state](https://github.com/h3ma209/blitz/blob/master/src/ui/workbench/state.rs): `src/ui/workbench/state.rs`
- [Request model](https://github.com/h3ma209/blitz/blob/master/src/core/request.rs): `src/core/request.rs`
- [Collections](https://github.com/h3ma209/blitz/blob/master/src/core/collection.rs): `src/core/collection.rs`
- [Environments](https://github.com/h3ma209/blitz/blob/master/src/core/environment.rs): `src/core/environment.rs`
- [Scripts and assertions](https://github.com/h3ma209/blitz/blob/master/src/core/sandbox.rs): `src/core/sandbox.rs`
- [Import and export](https://github.com/h3ma209/blitz/blob/master/src/core/impex.rs): `src/core/impex.rs`

### Execution and automation

- [Request pipeline](https://github.com/h3ma209/blitz/blob/master/src/runtime/pipeline.rs): `src/runtime/pipeline.rs`
- [Collection runner](https://github.com/h3ma209/blitz/blob/master/src/runtime/runner.rs): `src/runtime/runner.rs`
- [CLI runner](https://github.com/h3ma209/blitz/blob/master/src/core/cli_runner.rs): `src/core/cli_runner.rs`
- [MCP server](https://github.com/h3ma209/blitz/blob/master/src/core/mcp_server.rs): `src/core/mcp_server.rs`
- [Performance tests](https://github.com/h3ma209/blitz/blob/master/src/core/perf_runner.rs): `src/core/perf_runner.rs`

### Local data and sync

- [Local JSON storage](https://github.com/h3ma209/blitz/blob/master/src/storage/json_store.rs): `src/storage/json_store.rs`
- [Git collaboration](https://github.com/h3ma209/blitz/blob/master/src/core/cloud_sync/mod.rs): `src/core/cloud_sync/mod.rs`
- [Secrets vault](https://github.com/h3ma209/blitz/blob/master/src/core/vault.rs): `src/core/vault.rs`

### Protocol integrations

- [Protocol handlers](https://github.com/h3ma209/blitz/tree/master/src/core/protocols): `src/core/protocols`

### Other components

- **User**
- **AI agent**
- **CI automation**

## Connections

- User → Application entry: launches (evidence: `src/main.rs`)
- Application entry → Workbench: opens (evidence: `src/main.rs`)
- Workbench → Request editor: renders (evidence: `src/ui/workbench/mod.rs`)
- Workbench → Response viewer: renders (evidence: `src/ui/workbench/mod.rs`)
- Workbench → Collection sidebar: renders (evidence: `src/ui/workbench/mod.rs`)
- Workbench → Workbench state: uses (evidence: `src/ui/workbench/mod.rs`)
- Workbench → Settings: opens (evidence: `src/ui/workbench/mod.rs`)
- Request editor → Request model: edits (evidence: `src/ui/request_builder.rs`)
- Request editor → Import and export: imports (evidence: `src/ui/request_builder.rs`)
- Workbench state → Local JSON storage: persists (evidence: `src/ui/workbench/state.rs`)
- Workbench state → Environments: resolves context (evidence: `src/ui/workbench/state.rs`)
- Workbench state → Collections: reads (evidence: `src/ui/workbench/state.rs`)
- Workbench → Request pipeline: sends requests (evidence: `src/ui/workbench/mod.rs`)
- Request pipeline → Request model: executes (evidence: `src/runtime/pipeline.rs`)
- Request pipeline → Scripts and assertions: runs scripts (evidence: `src/runtime/pipeline.rs`)
- Request pipeline → Protocol handlers: dispatches
- Response viewer → User: shows results
- Collections → Request model: contains (evidence: `src/core/collection.rs`)
- CLI runner → Collection runner: runs collections (evidence: `src/core/cli_runner.rs`)
- Collection runner → Request pipeline: executes requests (evidence: `src/runtime/runner.rs`)
- CI automation → CLI runner: runs headlessly (evidence: `README.md`)
- AI agent → MCP server: connects locally (evidence: `README.md`)
- MCP server → Request pipeline: sends requests
- MCP server → Collections: lists collections
- Performance tests → Request pipeline: tests requests
- Workbench → Git collaboration: syncs workspace
- Git collaboration → Collections: syncs data (evidence: `src/core/cloud_sync/mod.rs`)
- Git collaboration → Environments: syncs data (evidence: `src/core/cloud_sync/mod.rs`)
- User → Secrets vault: stores secrets (evidence: `README.md`)
- User → Protocol handlers: uses protocols (evidence: `README.md`)
- User → Import and export: imports formats (evidence: `README.md`)
