# purr-app/purr architecture

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

- Interactive diagram: https://gitdiagram.com/purr-app/purr
- Repository: https://github.com/purr-app/purr

## Overview

Purr is a local-first HTTP and GraphQL client for macOS. The main workflow is to edit a request in a workspace, resolve variables and authentication, send it through the platform transport, and inspect or save the response; users can then follow correlated traces. Workspaces also support imports, request chaining, history, and Jaeger integration. The graph combines sampled source relationships with capabilities and relationships documented in the README; unsampled implementation details are not inferred.

Main entry points: [`src/features/workspaces/workspace-workbench.tsx`](https://github.com/purr-app/purr/blob/main/src/features/workspaces/workspace-workbench.tsx) (Workspace workbench), [`src/features/request-workbench/services/http-client.ts`](https://github.com/purr-app/purr/blob/main/src/features/request-workbench/services/http-client.ts) (HTTP client), [`src/features/request-workbench/services/execute-request.ts`](https://github.com/purr-app/purr/blob/main/src/features/request-workbench/services/execute-request.ts) (Request execution), [`src-tauri/src/observability/service.rs`](https://github.com/purr-app/purr/blob/main/src-tauri/src/observability/service.rs) (Trace service)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workspace["Workspaces and data"]
  node_workbench["Workspace workbench"]
  node_workspace_model["Workspace model<br/>[workspace.ts]"]
  node_workspace_persistence["Workspace persistence"]
  node_workspace_storage["Workspace storage adapter"]
  node_project_files["Project file codec<br/>[file-codec.ts]"]
  node_import_ui["Import workflow<br/>[import-project.ts]"]
  node_postman_import["Postman importer<br/>[postman.rs]"]
end

subgraph group_requests["Request workflow"]
  node_request_composer["Request composer"]
  node_request_model["Request model<br/>[request.ts]"]
  node_request_execution["Request execution<br/>[execute-request.ts]"]
  node_http_client["HTTP client<br/>[http-client.ts]"]
  node_oauth["OAuth client<br/>[oauth-client.ts]"]
  node_tauri_services["Desktop adapters"]
  node_native_http["Native HTTP transport<br/>[transport.rs]"]
end

subgraph group_extensions["GraphQL and imports"]
  node_graphql["GraphQL workflow"]
  node_variables["Dynamic variables"]
end

subgraph group_results["Responses and history"]
  node_response_viewer["Response viewer"]
  node_response_content["Response content service"]
  node_native_content[("Native content store<br/>[store.rs]")]
  node_history["Request history<br/>[request-history.ts]"]
end

subgraph group_tracing["Tracing and integrations"]
  node_trace_panel["Trace panel<br/>[trace-panel.tsx]"]
  node_observability["Trace service<br/>[service.rs]"]
  node_jaeger["Jaeger integration<br/>[jaeger.rs]"]
end

node_user(("User"))

node_user -->|"opens"| node_workbench
node_workbench -->|"loads and saves"| node_workspace_storage
node_workspace_storage -->|"delegates to"| node_workspace_persistence
node_workspace_persistence -->|"uses codec"| node_project_files
node_workbench -.->|"edits requests"| node_request_composer
node_request_composer -->|"edits"| node_request_model
node_request_execution -.->|"executes via"| node_http_client
node_http_client -->|"uses transport"| node_tauri_services
node_tauri_services -.->|"dispatches to"| node_native_http
node_request_execution -.->|"authorizes with"| node_oauth
node_oauth -->|"sends token request"| node_http_client
node_workbench -.->|"resolves variables"| node_variables
node_user -->|"imports projects"| node_import_ui
node_import_ui -.->|"normalizes collections"| node_postman_import
node_user -->|"edits GraphQL"| node_graphql
node_http_client -.->|"returns response"| node_response_viewer
node_response_viewer -->|"reads content"| node_response_content
node_response_content -.->|"accesses native content"| node_native_content
node_workbench -->|"browses history"| node_history
node_request_execution -->|"propagates trace"| node_observability
node_user -->|"inspects trace"| node_trace_panel
node_trace_panel -.->|"loads trace"| node_observability
node_observability -.->|"queries provider"| node_jaeger

click node_workbench "https://github.com/purr-app/purr/blob/main/src/features/workspaces/workspace-workbench.tsx"
click node_workspace_model "https://github.com/purr-app/purr/blob/main/src/features/workspaces/model/workspace.ts"
click node_workspace_persistence "https://github.com/purr-app/purr/blob/main/src/application/workspace-persistence.ts"
click node_workspace_storage "https://github.com/purr-app/purr/blob/main/src/features/workspaces/services/workspace-storage.ts"
click node_project_files "https://github.com/purr-app/purr/blob/main/src/storage/file-codec.ts"
click node_import_ui "https://github.com/purr-app/purr/blob/main/src/application/import-project.ts"
click node_postman_import "https://github.com/purr-app/purr/blob/main/src-tauri/src/importing/postman.rs"
click node_request_composer "https://github.com/purr-app/purr/blob/main/src/features/request-workbench/components/request-composer.tsx"
click node_request_model "https://github.com/purr-app/purr/blob/main/src/features/request-workbench/model/request.ts"
click node_request_execution "https://github.com/purr-app/purr/blob/main/src/features/request-workbench/services/execute-request.ts"
click node_http_client "https://github.com/purr-app/purr/blob/main/src/features/request-workbench/services/http-client.ts"
click node_oauth "https://github.com/purr-app/purr/blob/main/src/features/request-workbench/services/oauth-client.ts"
click node_tauri_services "https://github.com/purr-app/purr/blob/main/src/platform/tauri/application-services.ts"
click node_native_http "https://github.com/purr-app/purr/blob/main/src-tauri/src/http/transport.rs"
click node_graphql "https://github.com/purr-app/purr/blob/main/src/features/graphql/components/graphql-query-editor.tsx"
click node_variables "https://github.com/purr-app/purr/blob/main/src/features/workspaces/services/dynamic-variable-resolver.ts"
click node_response_viewer "https://github.com/purr-app/purr/blob/main/src/features/request-workbench/components/response-viewer.tsx"
click node_response_content "https://github.com/purr-app/purr/blob/main/src/application/ports/response-content.ts"
click node_native_content "https://github.com/purr-app/purr/blob/main/src-tauri/src/content/store.rs"
click node_history "https://github.com/purr-app/purr/blob/main/src/application/request-history.ts"
click node_trace_panel "https://github.com/purr-app/purr/blob/main/src/features/observability/trace-panel.tsx"
click node_observability "https://github.com/purr-app/purr/blob/main/src-tauri/src/observability/service.rs"
click node_jaeger "https://github.com/purr-app/purr/blob/main/src-tauri/src/observability/providers/jaeger.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_workbench,node_workspace_model,node_workspace_persistence,node_workspace_storage,node_project_files,node_import_ui,node_postman_import,node_user toneBlue
class node_request_composer,node_request_model,node_request_execution,node_http_client,node_oauth,node_tauri_services,node_native_http toneAmber
class node_graphql,node_variables toneMint
class node_response_viewer,node_response_content,node_native_content,node_history toneRose
class node_trace_panel,node_observability,node_jaeger toneIndigo
```

## Components

### Workspaces and data

- [Workspace workbench](https://github.com/purr-app/purr/blob/main/src/features/workspaces/workspace-workbench.tsx): `src/features/workspaces/workspace-workbench.tsx`
- [Workspace model](https://github.com/purr-app/purr/blob/main/src/features/workspaces/model/workspace.ts): `src/features/workspaces/model/workspace.ts`
- [Workspace persistence](https://github.com/purr-app/purr/blob/main/src/application/workspace-persistence.ts): `src/application/workspace-persistence.ts`
- [Workspace storage adapter](https://github.com/purr-app/purr/blob/main/src/features/workspaces/services/workspace-storage.ts): `src/features/workspaces/services/workspace-storage.ts`
- [Project file codec](https://github.com/purr-app/purr/blob/main/src/storage/file-codec.ts): `src/storage/file-codec.ts`
- [Import workflow](https://github.com/purr-app/purr/blob/main/src/application/import-project.ts): `src/application/import-project.ts`
- [Postman importer](https://github.com/purr-app/purr/blob/main/src-tauri/src/importing/postman.rs): `src-tauri/src/importing/postman.rs`

### Request workflow

- [Request composer](https://github.com/purr-app/purr/blob/main/src/features/request-workbench/components/request-composer.tsx): `src/features/request-workbench/components/request-composer.tsx`
- [Request model](https://github.com/purr-app/purr/blob/main/src/features/request-workbench/model/request.ts): `src/features/request-workbench/model/request.ts`
- [Request execution](https://github.com/purr-app/purr/blob/main/src/features/request-workbench/services/execute-request.ts): `src/features/request-workbench/services/execute-request.ts`
- [HTTP client](https://github.com/purr-app/purr/blob/main/src/features/request-workbench/services/http-client.ts): `src/features/request-workbench/services/http-client.ts`
- [OAuth client](https://github.com/purr-app/purr/blob/main/src/features/request-workbench/services/oauth-client.ts): `src/features/request-workbench/services/oauth-client.ts`
- [Desktop adapters](https://github.com/purr-app/purr/blob/main/src/platform/tauri/application-services.ts): `src/platform/tauri/application-services.ts`
- [Native HTTP transport](https://github.com/purr-app/purr/blob/main/src-tauri/src/http/transport.rs): `src-tauri/src/http/transport.rs`

### GraphQL and imports

- [GraphQL workflow](https://github.com/purr-app/purr/blob/main/src/features/graphql/components/graphql-query-editor.tsx): `src/features/graphql/components/graphql-query-editor.tsx`
- [Dynamic variables](https://github.com/purr-app/purr/blob/main/src/features/workspaces/services/dynamic-variable-resolver.ts): `src/features/workspaces/services/dynamic-variable-resolver.ts`

### Responses and history

- [Response viewer](https://github.com/purr-app/purr/blob/main/src/features/request-workbench/components/response-viewer.tsx): `src/features/request-workbench/components/response-viewer.tsx`
- [Response content service](https://github.com/purr-app/purr/blob/main/src/application/ports/response-content.ts): `src/application/ports/response-content.ts`
- [Native content store](https://github.com/purr-app/purr/blob/main/src-tauri/src/content/store.rs): `src-tauri/src/content/store.rs`
- [Request history](https://github.com/purr-app/purr/blob/main/src/application/request-history.ts): `src/application/request-history.ts`

### Tracing and integrations

- [Trace panel](https://github.com/purr-app/purr/blob/main/src/features/observability/trace-panel.tsx): `src/features/observability/trace-panel.tsx`
- [Trace service](https://github.com/purr-app/purr/blob/main/src-tauri/src/observability/service.rs): `src-tauri/src/observability/service.rs`
- [Jaeger integration](https://github.com/purr-app/purr/blob/main/src-tauri/src/observability/providers/jaeger.rs): `src-tauri/src/observability/providers/jaeger.rs`

### Other components

- **User**

## Connections

- User → Workspace workbench: opens (evidence: `README.md`)
- Workspace workbench → Workspace storage adapter: loads and saves (evidence: `src/features/workspaces/services/workspace-storage.ts`)
- Workspace storage adapter → Workspace persistence: delegates to (evidence: `src/features/workspaces/services/workspace-storage.ts`)
- Workspace persistence → Project file codec: uses codec (evidence: `src/application/workspace-persistence.ts`)
- Workspace workbench → Request composer: edits requests
- Request composer → Request model: edits (evidence: `src/features/request-workbench/model/request.ts`)
- Request execution → HTTP client: executes via
- HTTP client → Desktop adapters: uses transport (evidence: `src/features/request-workbench/services/http-client.ts`)
- Desktop adapters → Native HTTP transport: dispatches to
- Request execution → OAuth client: authorizes with
- OAuth client → HTTP client: sends token request (evidence: `src/features/request-workbench/services/oauth-client.ts`)
- Workspace workbench → Dynamic variables: resolves variables
- User → Import workflow: imports projects (evidence: `README.md`)
- Import workflow → Postman importer: normalizes collections
- User → GraphQL workflow: edits GraphQL (evidence: `README.md`)
- HTTP client → Response viewer: returns response
- Response viewer → Response content service: reads content (evidence: `README.md`)
- Response content service → Native content store: accesses native content
- Workspace workbench → Request history: browses history (evidence: `README.md`)
- Request execution → Trace service: propagates trace (evidence: `README.md`)
- User → Trace panel: inspects trace (evidence: `README.md`)
- Trace panel → Trace service: loads trace
- Trace service → Jaeger integration: queries provider
