# diegobarreramilla/restlab architecture

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

- Interactive diagram: https://gitdiagram.com/diegobarreramilla/restlab
- Repository: https://github.com/diegobarreramilla/restlab

## Overview

Bruno is an offline API client whose collections are filesystem-backed plain-text Bru data intended for version-control collaboration. The principal workflow is to open a collection, configure a request and its environment, execute it, and inspect the result; the repository also provides a CLI runner and protocol-specific clients. The graph includes documented product capabilities and sampled integration points. Some UI-to-runtime and unsampled subsystem wiring is not shown, so those relationships are omitted rather than inferred.

Main entry points: [`packages/bruno-electron/src/app/collection-watcher.js`](https://github.com/diegobarreramilla/restlab/blob/main/packages/bruno-electron/src/app/collection-watcher.js) (Collection watcher), [`packages/bruno-app/src/pages/Main.js`](https://github.com/diegobarreramilla/restlab/blob/main/packages/bruno-app/src/pages/Main.js) (Bruno desktop), [`packages/bruno-app/src/components/RequestPane`](https://github.com/diegobarreramilla/restlab/tree/main/packages/bruno-app/src/components/RequestPane) (Request editor), [`packages/bruno-electron/src/ipc/network/prepare-request.js`](https://github.com/diegobarreramilla/restlab/blob/main/packages/bruno-electron/src/ipc/network/prepare-request.js) (HTTP request execution)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_authoring["Collection authoring"]
  node_request_editor["Request editor"]
  node_environment["Environment settings"]
  node_collection_settings["Collection settings"]
end

subgraph group_execution["Request execution"]
  node_electron["Electron runtime"]
  node_http_request["HTTP request execution<br/>[prepare-request.js]"]
  node_grpc_handlers["gRPC event handlers"]
  node_grpc_client["gRPC client<br/>[grpc-client.js]"]
  node_ws_handlers["WebSocket handlers"]
  node_ws_client["WebSocket client<br/>[ws-client.js]"]
  node_mock_server["Mock server"]
end

subgraph group_persistence["Local collection data"]
  node_collection_watcher["Collection watcher"]
  node_bru_store["Bru file parsing<br/>[worker-script.ts]"]
  node_filesystem["Filesystem utilities<br/>[filesystem.js]"]
  node_collection_files[("Local collection files")]
end

subgraph group_interfaces["Product interfaces"]
  node_desktop["Bruno desktop<br/>[Main.js]"]
  node_tabs["Request tabs<br/>[tabs.js]"]
  node_cli["CLI runner<br/>[run.js]"]
end

node_user(("API developer"))
node_api_server(("API endpoint"))
node_git(("Git or VCS"))

node_user -->|"uses"| node_desktop
node_user -->|"runs collections"| node_cli
node_user -->|"authors requests"| node_request_editor
node_request_editor -.->|"manages request tabs"| node_tabs
node_desktop -.->|"opens collections"| node_collection_watcher
node_collection_watcher -->|"uses"| node_filesystem
node_collection_watcher -->|"parses collection data"| node_bru_store
node_collection_files -->|"stores Bru data"| node_bru_store
node_user -->|"collaborates through"| node_git
node_desktop -.->|"executes requests"| node_http_request
node_http_request -.->|"sends HTTP"| node_api_server
node_grpc_handlers -->|"calls"| node_grpc_client
node_ws_handlers -->|"uses"| node_ws_client
node_mock_server -.->|"loads mock data"| node_collection_files
node_environment -.->|"configures collection variables"| node_collection_files
node_collection_settings -.->|"configures collection"| node_collection_files

click node_desktop "https://github.com/diegobarreramilla/restlab/blob/main/packages/bruno-app/src/pages/Main.js"
click node_tabs "https://github.com/diegobarreramilla/restlab/blob/main/packages/bruno-app/src/providers/ReduxStore/slices/tabs.js"
click node_request_editor "https://github.com/diegobarreramilla/restlab/tree/main/packages/bruno-app/src/components/RequestPane"
click node_environment "https://github.com/diegobarreramilla/restlab/tree/main/packages/bruno-app/src/components/Environments"
click node_collection_settings "https://github.com/diegobarreramilla/restlab/tree/main/packages/bruno-app/src/components/CollectionSettings"
click node_cli "https://github.com/diegobarreramilla/restlab/blob/main/packages/bruno-cli/src/commands/run.js"
click node_electron "https://github.com/diegobarreramilla/restlab/tree/main/packages/bruno-electron/src"
click node_collection_watcher "https://github.com/diegobarreramilla/restlab/blob/main/packages/bruno-electron/src/app/collection-watcher.js"
click node_bru_store "https://github.com/diegobarreramilla/restlab/blob/main/packages/bruno-filestore/src/workers/worker-script.ts"
click node_filesystem "https://github.com/diegobarreramilla/restlab/blob/main/packages/bruno-electron/src/utils/filesystem.js"
click node_http_request "https://github.com/diegobarreramilla/restlab/blob/main/packages/bruno-electron/src/ipc/network/prepare-request.js"
click node_grpc_handlers "https://github.com/diegobarreramilla/restlab/blob/main/packages/bruno-electron/src/ipc/network/grpc-event-handlers.js"
click node_grpc_client "https://github.com/diegobarreramilla/restlab/blob/main/packages/bruno-requests/src/grpc/grpc-client.js"
click node_ws_handlers "https://github.com/diegobarreramilla/restlab/blob/main/packages/bruno-electron/src/ipc/network/ws-event-handlers.js"
click node_ws_client "https://github.com/diegobarreramilla/restlab/blob/main/packages/bruno-requests/src/ws/ws-client.js"
click node_mock_server "https://github.com/diegobarreramilla/restlab/blob/main/packages/bruno-electron/src/app/mock-server/mock-response-routes.js"

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_request_editor,node_environment,node_collection_settings toneBlue
class node_electron,node_http_request,node_grpc_handlers,node_grpc_client,node_ws_handlers,node_ws_client,node_mock_server toneAmber
class node_collection_watcher,node_bru_store,node_filesystem,node_collection_files,node_user,node_api_server toneMint
class node_desktop,node_tabs,node_cli toneRose
class node_git toneIndigo
```

## Components

### Collection authoring

- [Request editor](https://github.com/diegobarreramilla/restlab/tree/main/packages/bruno-app/src/components/RequestPane): `packages/bruno-app/src/components/RequestPane`
- [Environment settings](https://github.com/diegobarreramilla/restlab/tree/main/packages/bruno-app/src/components/Environments): `packages/bruno-app/src/components/Environments`
- [Collection settings](https://github.com/diegobarreramilla/restlab/tree/main/packages/bruno-app/src/components/CollectionSettings): `packages/bruno-app/src/components/CollectionSettings`

### Request execution

- [Electron runtime](https://github.com/diegobarreramilla/restlab/tree/main/packages/bruno-electron/src): `packages/bruno-electron/src`
- [HTTP request execution](https://github.com/diegobarreramilla/restlab/blob/main/packages/bruno-electron/src/ipc/network/prepare-request.js): `packages/bruno-electron/src/ipc/network/prepare-request.js`
- [gRPC event handlers](https://github.com/diegobarreramilla/restlab/blob/main/packages/bruno-electron/src/ipc/network/grpc-event-handlers.js): `packages/bruno-electron/src/ipc/network/grpc-event-handlers.js`
- [gRPC client](https://github.com/diegobarreramilla/restlab/blob/main/packages/bruno-requests/src/grpc/grpc-client.js): `packages/bruno-requests/src/grpc/grpc-client.js`
- [WebSocket handlers](https://github.com/diegobarreramilla/restlab/blob/main/packages/bruno-electron/src/ipc/network/ws-event-handlers.js): `packages/bruno-electron/src/ipc/network/ws-event-handlers.js`
- [WebSocket client](https://github.com/diegobarreramilla/restlab/blob/main/packages/bruno-requests/src/ws/ws-client.js): `packages/bruno-requests/src/ws/ws-client.js`
- [Mock server](https://github.com/diegobarreramilla/restlab/blob/main/packages/bruno-electron/src/app/mock-server/mock-response-routes.js): `packages/bruno-electron/src/app/mock-server/mock-response-routes.js`

### Local collection data

- [Collection watcher](https://github.com/diegobarreramilla/restlab/blob/main/packages/bruno-electron/src/app/collection-watcher.js): `packages/bruno-electron/src/app/collection-watcher.js`
- [Bru file parsing](https://github.com/diegobarreramilla/restlab/blob/main/packages/bruno-filestore/src/workers/worker-script.ts): `packages/bruno-filestore/src/workers/worker-script.ts`
- [Filesystem utilities](https://github.com/diegobarreramilla/restlab/blob/main/packages/bruno-electron/src/utils/filesystem.js): `packages/bruno-electron/src/utils/filesystem.js`
- **Local collection files**

### Product interfaces

- [Bruno desktop](https://github.com/diegobarreramilla/restlab/blob/main/packages/bruno-app/src/pages/Main.js): `packages/bruno-app/src/pages/Main.js`
- [Request tabs](https://github.com/diegobarreramilla/restlab/blob/main/packages/bruno-app/src/providers/ReduxStore/slices/tabs.js): `packages/bruno-app/src/providers/ReduxStore/slices/tabs.js`
- [CLI runner](https://github.com/diegobarreramilla/restlab/blob/main/packages/bruno-cli/src/commands/run.js): `packages/bruno-cli/src/commands/run.js`

### Other components

- **API developer**
- **API endpoint**
- **Git or VCS**

## Connections

- API developer → Bruno desktop: uses
- API developer → CLI runner: runs collections
- API developer → Request editor: authors requests
- Request editor → Request tabs: manages request tabs
- Bruno desktop → Collection watcher: opens collections
- Collection watcher → Filesystem utilities: uses (evidence: `packages/bruno-electron/src/app/collection-watcher.js`)
- Collection watcher → Bru file parsing: parses collection data (evidence: `packages/bruno-electron/src/app/collection-watcher.js`)
- Local collection files → Bru file parsing: stores Bru data
- API developer → Git or VCS: collaborates through
- Bruno desktop → HTTP request execution: executes requests
- HTTP request execution → API endpoint: sends HTTP
- gRPC event handlers → gRPC client: calls (evidence: `packages/bruno-electron/src/ipc/network/grpc-event-handlers.js`)
- WebSocket handlers → WebSocket client: uses (evidence: `packages/bruno-electron/src/ipc/network/ws-event-handlers.js`)
- Mock server → Local collection files: loads mock data
- Environment settings → Local collection files: configures collection variables
- Collection settings → Local collection files: configures collection
