# sufyandahalan/vsworkbench architecture

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

- Interactive diagram: https://gitdiagram.com/sufyandahalan/vsworkbench
- Repository: https://github.com/sufyandahalan/vsworkbench

## Overview

VSWorkbench is a VS Code extension that brings GitLab group/project browsing, issues, and CI pipelines into the editor. The main flow is sign-in, browse groups and projects, select a project, then inspect its issues or pipelines and jobs. The groups view also exposes project operations such as cloning. The excerpts show API calls and key view behavior; some wiring and webview details are only identified by the source index, so those connections are limited to documented or indexed references.

Main entry points: [`src/api/index.ts`](https://github.com/sufyandahalan/vsworkbench/blob/main/src/api/index.ts) (API client), [`src/views/groups.ts`](https://github.com/sufyandahalan/vsworkbench/blob/main/src/views/groups.ts) (Groups and projects), [`src/extension.ts`](https://github.com/sufyandahalan/vsworkbench/blob/main/src/extension.ts) (Extension activation), [`src/globals/functions.ts`](https://github.com/sufyandahalan/vsworkbench/blob/main/src/globals/functions.ts) (Authentication settings)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Extension entry"]
  node_extension["Extension activation<br/>[extension.ts]"]
  node_auth["Authentication settings<br/>[functions.ts]"]
  node_events["Extension events<br/>[event.ts]"]
  node_commands["Command registration<br/>[index.ts]"]
end

subgraph group_browse["GitLab browsing"]
  node_api["API client<br/>[index.ts]"]
  node_groups["Groups and projects<br/>[groups.ts]"]
  node_tree_node["Tree item model<br/>[node.ts]"]
  node_project_commands["Project commands<br/>[project.ts]"]
  node_editor_webview["Project detail webview<br/>[index.ts]"]
end

subgraph group_issues["Issue workflows"]
  node_issue_tree["Issue tree view<br/>[issues.ts]"]
  node_issue_commands["Issue commands<br/>[issue.ts]"]
  node_issue_webview["Issue webview<br/>[App.ts]"]
  node_issue_host["Issue webview host<br/>[index.ts]"]
  node_issue_queries["Issue queries<br/>[Queries.ts]"]
end

subgraph group_ci["CI workflows"]
  node_pipeline_commands["Pipeline commands<br/>[pipeline.ts]"]
  node_pipeline_tree["Pipeline and jobs<br/>[pipelines.ts]"]
  node_pipeline_webview["Pipeline webview<br/>[App.ts]"]
  node_pipeline_host["Pipeline webview host<br/>[index.ts]"]
end

node_developer(("Developer"))
node_gitlab{{"GitLab API"}}

node_developer -->|"activates"| node_extension
node_extension -->|"configures auth"| node_auth
node_extension -->|"registers commands"| node_commands
node_extension -->|"registers views"| node_groups
node_auth -->|"sets credentials"| node_api
node_auth -->|"signals sign-in"| node_events
node_api -->|"sends requests"| node_gitlab
node_groups -->|"loads groups"| node_api
node_groups -->|"creates items"| node_tree_node
node_groups -->|"opens issues"| node_issue_tree
node_groups -->|"opens pipelines"| node_pipeline_tree
node_groups -->|"opens details"| node_editor_webview
node_groups -->|"calls clone command"| node_project_commands
node_project_commands -->|"manages projects"| node_api
node_issue_tree -->|"loads issues"| node_api
node_issue_commands -.->|"uses API"| node_api
node_issue_host -->|"hosts UI"| node_issue_webview
node_issue_webview -->|"fetches and updates"| node_api
node_issue_webview -->|"uses query"| node_issue_queries
node_pipeline_tree -->|"loads pipelines and jobs"| node_api
node_pipeline_commands -->|"loads pipelines"| node_api
node_pipeline_host -.->|"hosts UI"| node_pipeline_webview
node_pipeline_webview -.->|"uses API"| node_api
node_commands -->|"exports commands"| node_issue_commands
node_commands -->|"exports commands"| node_pipeline_commands

click node_extension "https://github.com/sufyandahalan/vsworkbench/blob/main/src/extension.ts"
click node_auth "https://github.com/sufyandahalan/vsworkbench/blob/main/src/globals/functions.ts"
click node_events "https://github.com/sufyandahalan/vsworkbench/blob/main/src/globals/event.ts"
click node_commands "https://github.com/sufyandahalan/vsworkbench/blob/main/src/commands/index.ts"
click node_api "https://github.com/sufyandahalan/vsworkbench/blob/main/src/api/index.ts"
click node_groups "https://github.com/sufyandahalan/vsworkbench/blob/main/src/views/groups.ts"
click node_tree_node "https://github.com/sufyandahalan/vsworkbench/blob/main/src/views/node.ts"
click node_project_commands "https://github.com/sufyandahalan/vsworkbench/blob/main/src/commands/project.ts"
click node_issue_tree "https://github.com/sufyandahalan/vsworkbench/blob/main/src/views/issues.ts"
click node_issue_commands "https://github.com/sufyandahalan/vsworkbench/blob/main/src/commands/issue.ts"
click node_issue_webview "https://github.com/sufyandahalan/vsworkbench/blob/main/src/webviews/issues/App.ts"
click node_issue_host "https://github.com/sufyandahalan/vsworkbench/blob/main/src/webviews/issues/index.ts"
click node_issue_queries "https://github.com/sufyandahalan/vsworkbench/blob/main/src/api/Queries.ts"
click node_pipeline_commands "https://github.com/sufyandahalan/vsworkbench/blob/main/src/commands/pipeline.ts"
click node_pipeline_tree "https://github.com/sufyandahalan/vsworkbench/blob/main/src/views/pipelines.ts"
click node_pipeline_webview "https://github.com/sufyandahalan/vsworkbench/blob/main/src/webviews/pipelines/App.ts"
click node_pipeline_host "https://github.com/sufyandahalan/vsworkbench/blob/main/src/webviews/pipelines/index.ts"
click node_editor_webview "https://github.com/sufyandahalan/vsworkbench/blob/main/src/webviews/editor/index.ts"

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_extension,node_auth,node_events,node_commands toneBlue
class node_api,node_groups,node_tree_node,node_project_commands,node_editor_webview toneAmber
class node_issue_tree,node_issue_commands,node_issue_webview,node_issue_host,node_issue_queries,node_gitlab toneMint
class node_pipeline_commands,node_pipeline_tree,node_pipeline_webview,node_pipeline_host toneRose
class node_developer toneIndigo
```

## Components

### Extension entry

- [Extension activation](https://github.com/sufyandahalan/vsworkbench/blob/main/src/extension.ts): `src/extension.ts`
- [Authentication settings](https://github.com/sufyandahalan/vsworkbench/blob/main/src/globals/functions.ts): `src/globals/functions.ts`
- [Extension events](https://github.com/sufyandahalan/vsworkbench/blob/main/src/globals/event.ts): `src/globals/event.ts`
- [Command registration](https://github.com/sufyandahalan/vsworkbench/blob/main/src/commands/index.ts): `src/commands/index.ts`

### GitLab browsing

- [API client](https://github.com/sufyandahalan/vsworkbench/blob/main/src/api/index.ts): `src/api/index.ts`
- [Groups and projects](https://github.com/sufyandahalan/vsworkbench/blob/main/src/views/groups.ts): `src/views/groups.ts`
- [Tree item model](https://github.com/sufyandahalan/vsworkbench/blob/main/src/views/node.ts): `src/views/node.ts`
- [Project commands](https://github.com/sufyandahalan/vsworkbench/blob/main/src/commands/project.ts): `src/commands/project.ts`
- [Project detail webview](https://github.com/sufyandahalan/vsworkbench/blob/main/src/webviews/editor/index.ts): `src/webviews/editor/index.ts`

### Issue workflows

- [Issue tree view](https://github.com/sufyandahalan/vsworkbench/blob/main/src/views/issues.ts): `src/views/issues.ts`
- [Issue commands](https://github.com/sufyandahalan/vsworkbench/blob/main/src/commands/issue.ts): `src/commands/issue.ts`
- [Issue webview](https://github.com/sufyandahalan/vsworkbench/blob/main/src/webviews/issues/App.ts): `src/webviews/issues/App.ts`
- [Issue webview host](https://github.com/sufyandahalan/vsworkbench/blob/main/src/webviews/issues/index.ts): `src/webviews/issues/index.ts`
- [Issue queries](https://github.com/sufyandahalan/vsworkbench/blob/main/src/api/Queries.ts): `src/api/Queries.ts`

### CI workflows

- [Pipeline commands](https://github.com/sufyandahalan/vsworkbench/blob/main/src/commands/pipeline.ts): `src/commands/pipeline.ts`
- [Pipeline and jobs](https://github.com/sufyandahalan/vsworkbench/blob/main/src/views/pipelines.ts): `src/views/pipelines.ts`
- [Pipeline webview](https://github.com/sufyandahalan/vsworkbench/blob/main/src/webviews/pipelines/App.ts): `src/webviews/pipelines/App.ts`
- [Pipeline webview host](https://github.com/sufyandahalan/vsworkbench/blob/main/src/webviews/pipelines/index.ts): `src/webviews/pipelines/index.ts`

### Other components

- **Developer**
- **GitLab API**

## Connections

- Developer → Extension activation: activates (evidence: `src/extension.ts`)
- Extension activation → Authentication settings: configures auth (evidence: `src/extension.ts`)
- Extension activation → Command registration: registers commands (evidence: `src/extension.ts`)
- Extension activation → Groups and projects: registers views (evidence: `src/extension.ts`)
- Authentication settings → API client: sets credentials (evidence: `src/globals/functions.ts`)
- Authentication settings → Extension events: signals sign-in (evidence: `src/globals/functions.ts`)
- API client → GitLab API: sends requests (evidence: `src/api/index.ts`)
- Groups and projects → API client: loads groups (evidence: `src/views/groups.ts`)
- Groups and projects → Tree item model: creates items (evidence: `src/views/groups.ts`)
- Groups and projects → Issue tree view: opens issues (evidence: `src/views/groups.ts`)
- Groups and projects → Pipeline and jobs: opens pipelines (evidence: `src/views/groups.ts`)
- Groups and projects → Project detail webview: opens details (evidence: `src/views/groups.ts`)
- Groups and projects → Project commands: calls clone command (evidence: `src/views/groups.ts`)
- Project commands → API client: manages projects (evidence: `src/commands/project.ts`)
- Issue tree view → API client: loads issues (evidence: `src/views/issues.ts`)
- Issue commands → API client: uses API
- Issue webview host → Issue webview: hosts UI (evidence: `src/webviews/issues/index.ts`)
- Issue webview → API client: fetches and updates (evidence: `src/webviews/issues/App.ts`)
- Issue webview → Issue queries: uses query (evidence: `src/webviews/issues/App.ts`)
- Pipeline and jobs → API client: loads pipelines and jobs (evidence: `src/views/pipelines.ts`)
- Pipeline commands → API client: loads pipelines (evidence: `src/commands/pipeline.ts`)
- Pipeline webview host → Pipeline webview: hosts UI
- Pipeline webview → API client: uses API (evidence: `src/webviews/pipelines/App.ts`)
- Command registration → Issue commands: exports commands (evidence: `src/commands/index.ts`)
- Command registration → Pipeline commands: exports commands (evidence: `src/commands/index.ts`)
