# auryngji/depviz-dependency-visualizer architecture

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

- Interactive diagram: https://gitdiagram.com/auryngji/depviz-dependency-visualizer
- Repository: https://github.com/auryngji/depviz-dependency-visualizer

## Overview

DepViz is a VS Code extension for turning selected Python, TypeScript, and JavaScript code into interactive call/import maps. The main workflow runs from opening the extension and importing files, through parsing and delivering graph artifacts to the webview, where users explore, arrange, search, slice, and export the map. A separate custom-editor path handles saved snapshots. The graph reflects documented capabilities; some webview message and rendering details are not shown in the sampled source, so those connections are omitted or marked unverified.

Main entry points: [`src/services/panel/panelManager.ts`](https://github.com/auryngji/depviz-dependency-visualizer/blob/main/src/services/panel/panelManager.ts) (Panel manager), [`src/services/import/importService.ts`](https://github.com/auryngji/depviz-dependency-visualizer/blob/main/src/services/import/importService.ts) (File import), [`src/services/messaging/webviewMessageRouter.ts`](https://github.com/auryngji/depviz-dependency-visualizer/blob/main/src/services/messaging/webviewMessageRouter.ts) (Webview message router), [`src/extension.ts`](https://github.com/auryngji/depviz-dependency-visualizer/blob/main/src/extension.ts) (Extension activation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_extension["Extension UI"]
  node_activation["Extension activation<br/>[extension.ts]"]
  node_panel_manager["Panel manager<br/>[panelManager.ts]"]
  node_panel_html["Panel HTML<br/>[html.ts]"]
  node_message_router["Webview message router"]
end

subgraph group_analysis["Import and Parsing"]
  node_import_service["File import<br/>[importService.ts]"]
  node_parse_service["Parser selection<br/>[parseService.ts]"]
  node_lsp_parser["VS Code symbol parser<br/>[lspParser.ts]"]
  node_naive_parser["Heuristic parser<br/>[naiveParser.ts]"]
  node_parse_utils["Parse utilities<br/>[utils.ts]"]
  node_graph_artifacts["Graph artifacts<br/>[types.ts]"]
  node_workspace_helpers["Workspace helpers<br/>[workspace.ts]"]
  node_encoding_helpers["Encoding and hashing<br/>[encoding.ts]"]
  node_text_helpers["Text helpers<br/>[text.ts]"]
end

subgraph group_visualization["Graph Exploration"]
  node_webview["Interactive graph view<br/>[webview.js]"]
  node_webview_interact["Graph interactions"]
  node_webview_arrange["Graph arrangement<br/>[webview-arrange.js]"]
  node_webview_data["Graph data handling<br/>[webview-data.js]"]
  node_webview_geom["Graph geometry<br/>[webview-geom.js]"]
end

subgraph group_snapshots["Snapshots and Navigation"]
  node_snapshot_provider["Snapshot editor provider<br/>[dvProvider.ts]"]
  node_snapshot_document["Snapshot document<br/>[dvDocument.ts]"]
  node_navigation["Symbol navigation<br/>[gotoSymbol.ts]"]
end

node_vscode_user(("VS Code user"))

node_vscode_user -->|"opens extension"| node_activation
node_activation -->|"creates"| node_panel_manager
node_activation -->|"registers"| node_snapshot_provider
node_panel_manager -->|"requests HTML"| node_panel_html
node_panel_manager -->|"registers handlers"| node_message_router
node_panel_manager -->|"creates"| node_import_service
node_panel_manager -->|"loads scripts"| node_webview
node_panel_manager -->|"loads scripts"| node_webview_interact
node_panel_manager -->|"loads scripts"| node_webview_arrange
node_panel_manager -->|"loads scripts"| node_webview_data
node_panel_manager -->|"loads scripts"| node_webview_geom
node_vscode_user -->|"selects code"| node_import_service
node_message_router -->|"imports files"| node_import_service
node_import_service -->|"parses files"| node_parse_service
node_parse_service -->|"tries symbols"| node_lsp_parser
node_parse_service -->|"falls back"| node_naive_parser
node_lsp_parser -->|"uses utilities"| node_parse_utils
node_naive_parser -->|"uses utilities"| node_parse_utils
node_lsp_parser -->|"produces"| node_graph_artifacts
node_naive_parser -->|"produces"| node_graph_artifacts
node_import_service -->|"posts results"| node_graph_artifacts
node_import_service -->|"normalizes paths"| node_workspace_helpers
node_import_service -->|"decodes and hashes"| node_encoding_helpers
node_import_service -->|"checks extensions"| node_text_helpers
node_webview -.->|"sends actions"| node_message_router
node_message_router -->|"opens symbols"| node_navigation
node_snapshot_provider -->|"opens and saves"| node_snapshot_document
node_snapshot_provider -->|"registers handlers"| node_message_router
node_message_router -->|"edits and saves"| node_snapshot_document
node_snapshot_document -->|"encodes content"| node_encoding_helpers
node_message_router -->|"validates paths"| node_workspace_helpers
node_navigation -->|"escapes names"| node_text_helpers
node_vscode_user -->|"explores and exports"| node_webview

click node_activation "https://github.com/auryngji/depviz-dependency-visualizer/blob/main/src/extension.ts"
click node_panel_manager "https://github.com/auryngji/depviz-dependency-visualizer/blob/main/src/services/panel/panelManager.ts"
click node_panel_html "https://github.com/auryngji/depviz-dependency-visualizer/blob/main/src/services/panel/html.ts"
click node_message_router "https://github.com/auryngji/depviz-dependency-visualizer/blob/main/src/services/messaging/webviewMessageRouter.ts"
click node_webview "https://github.com/auryngji/depviz-dependency-visualizer/blob/main/media/webview.js"
click node_webview_interact "https://github.com/auryngji/depviz-dependency-visualizer/blob/main/media/webview-interact.js"
click node_webview_arrange "https://github.com/auryngji/depviz-dependency-visualizer/blob/main/media/webview-arrange.js"
click node_webview_data "https://github.com/auryngji/depviz-dependency-visualizer/blob/main/media/webview-data.js"
click node_webview_geom "https://github.com/auryngji/depviz-dependency-visualizer/blob/main/media/webview-geom.js"
click node_import_service "https://github.com/auryngji/depviz-dependency-visualizer/blob/main/src/services/import/importService.ts"
click node_parse_service "https://github.com/auryngji/depviz-dependency-visualizer/blob/main/src/services/parse/parseService.ts"
click node_lsp_parser "https://github.com/auryngji/depviz-dependency-visualizer/blob/main/src/services/parse/lspParser.ts"
click node_naive_parser "https://github.com/auryngji/depviz-dependency-visualizer/blob/main/src/services/parse/naiveParser.ts"
click node_parse_utils "https://github.com/auryngji/depviz-dependency-visualizer/blob/main/src/services/parse/utils.ts"
click node_graph_artifacts "https://github.com/auryngji/depviz-dependency-visualizer/blob/main/src/shared/types.ts"
click node_snapshot_provider "https://github.com/auryngji/depviz-dependency-visualizer/blob/main/src/document/dvProvider.ts"
click node_snapshot_document "https://github.com/auryngji/depviz-dependency-visualizer/blob/main/src/document/dvDocument.ts"
click node_navigation "https://github.com/auryngji/depviz-dependency-visualizer/blob/main/src/services/navigation/gotoSymbol.ts"
click node_workspace_helpers "https://github.com/auryngji/depviz-dependency-visualizer/blob/main/src/shared/workspace.ts"
click node_encoding_helpers "https://github.com/auryngji/depviz-dependency-visualizer/blob/main/src/shared/encoding.ts"
click node_text_helpers "https://github.com/auryngji/depviz-dependency-visualizer/blob/main/src/shared/text.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_activation,node_panel_manager,node_panel_html,node_message_router,node_vscode_user toneBlue
class node_import_service,node_parse_service,node_lsp_parser,node_naive_parser,node_parse_utils,node_graph_artifacts,node_workspace_helpers,node_encoding_helpers,node_text_helpers toneAmber
class node_webview,node_webview_interact,node_webview_arrange,node_webview_data,node_webview_geom toneMint
class node_snapshot_provider,node_snapshot_document,node_navigation toneRose
```

## Components

### Extension UI

- [Extension activation](https://github.com/auryngji/depviz-dependency-visualizer/blob/main/src/extension.ts): `src/extension.ts`
- [Panel manager](https://github.com/auryngji/depviz-dependency-visualizer/blob/main/src/services/panel/panelManager.ts): `src/services/panel/panelManager.ts`
- [Panel HTML](https://github.com/auryngji/depviz-dependency-visualizer/blob/main/src/services/panel/html.ts): `src/services/panel/html.ts`
- [Webview message router](https://github.com/auryngji/depviz-dependency-visualizer/blob/main/src/services/messaging/webviewMessageRouter.ts): `src/services/messaging/webviewMessageRouter.ts`

### Import and Parsing

- [File import](https://github.com/auryngji/depviz-dependency-visualizer/blob/main/src/services/import/importService.ts): `src/services/import/importService.ts`
- [Parser selection](https://github.com/auryngji/depviz-dependency-visualizer/blob/main/src/services/parse/parseService.ts): `src/services/parse/parseService.ts`
- [VS Code symbol parser](https://github.com/auryngji/depviz-dependency-visualizer/blob/main/src/services/parse/lspParser.ts): `src/services/parse/lspParser.ts`
- [Heuristic parser](https://github.com/auryngji/depviz-dependency-visualizer/blob/main/src/services/parse/naiveParser.ts): `src/services/parse/naiveParser.ts`
- [Parse utilities](https://github.com/auryngji/depviz-dependency-visualizer/blob/main/src/services/parse/utils.ts): `src/services/parse/utils.ts`
- [Graph artifacts](https://github.com/auryngji/depviz-dependency-visualizer/blob/main/src/shared/types.ts): `src/shared/types.ts`
- [Workspace helpers](https://github.com/auryngji/depviz-dependency-visualizer/blob/main/src/shared/workspace.ts): `src/shared/workspace.ts`
- [Encoding and hashing](https://github.com/auryngji/depviz-dependency-visualizer/blob/main/src/shared/encoding.ts): `src/shared/encoding.ts`
- [Text helpers](https://github.com/auryngji/depviz-dependency-visualizer/blob/main/src/shared/text.ts): `src/shared/text.ts`

### Graph Exploration

- [Interactive graph view](https://github.com/auryngji/depviz-dependency-visualizer/blob/main/media/webview.js): `media/webview.js`
- [Graph interactions](https://github.com/auryngji/depviz-dependency-visualizer/blob/main/media/webview-interact.js): `media/webview-interact.js`
- [Graph arrangement](https://github.com/auryngji/depviz-dependency-visualizer/blob/main/media/webview-arrange.js): `media/webview-arrange.js`
- [Graph data handling](https://github.com/auryngji/depviz-dependency-visualizer/blob/main/media/webview-data.js): `media/webview-data.js`
- [Graph geometry](https://github.com/auryngji/depviz-dependency-visualizer/blob/main/media/webview-geom.js): `media/webview-geom.js`

### Snapshots and Navigation

- [Snapshot editor provider](https://github.com/auryngji/depviz-dependency-visualizer/blob/main/src/document/dvProvider.ts): `src/document/dvProvider.ts`
- [Snapshot document](https://github.com/auryngji/depviz-dependency-visualizer/blob/main/src/document/dvDocument.ts): `src/document/dvDocument.ts`
- [Symbol navigation](https://github.com/auryngji/depviz-dependency-visualizer/blob/main/src/services/navigation/gotoSymbol.ts): `src/services/navigation/gotoSymbol.ts`

### Other components

- **VS Code user**

## Connections

- VS Code user → Extension activation: opens extension (evidence: `README.md`)
- Extension activation → Panel manager: creates (evidence: `src/extension.ts`)
- Extension activation → Snapshot editor provider: registers (evidence: `src/extension.ts`)
- Panel manager → Panel HTML: requests HTML (evidence: `src/services/panel/panelManager.ts`)
- Panel manager → Webview message router: registers handlers (evidence: `src/services/panel/panelManager.ts`)
- Panel manager → File import: creates (evidence: `src/services/panel/panelManager.ts`)
- Panel manager → Interactive graph view: loads scripts (evidence: `src/services/panel/panelManager.ts`)
- Panel manager → Graph interactions: loads scripts (evidence: `src/services/panel/panelManager.ts`)
- Panel manager → Graph arrangement: loads scripts (evidence: `src/services/panel/panelManager.ts`)
- Panel manager → Graph data handling: loads scripts (evidence: `src/services/panel/panelManager.ts`)
- Panel manager → Graph geometry: loads scripts (evidence: `src/services/panel/panelManager.ts`)
- VS Code user → File import: selects code (evidence: `README.md`)
- Webview message router → File import: imports files (evidence: `src/services/messaging/webviewMessageRouter.ts`)
- File import → Parser selection: parses files (evidence: `src/services/import/importService.ts`)
- Parser selection → VS Code symbol parser: tries symbols (evidence: `src/services/parse/parseService.ts`)
- Parser selection → Heuristic parser: falls back (evidence: `src/services/parse/parseService.ts`)
- VS Code symbol parser → Parse utilities: uses utilities (evidence: `src/services/parse/lspParser.ts`)
- Heuristic parser → Parse utilities: uses utilities (evidence: `src/services/parse/naiveParser.ts`)
- VS Code symbol parser → Graph artifacts: produces (evidence: `src/services/parse/lspParser.ts`)
- Heuristic parser → Graph artifacts: produces (evidence: `src/services/parse/naiveParser.ts`)
- File import → Graph artifacts: posts results (evidence: `src/services/import/importService.ts`)
- File import → Workspace helpers: normalizes paths (evidence: `src/services/import/importService.ts`)
- File import → Encoding and hashing: decodes and hashes (evidence: `src/services/import/importService.ts`)
- File import → Text helpers: checks extensions (evidence: `src/services/import/importService.ts`)
- Interactive graph view → Webview message router: sends actions
- Webview message router → Symbol navigation: opens symbols (evidence: `src/services/messaging/webviewMessageRouter.ts`)
- Snapshot editor provider → Snapshot document: opens and saves (evidence: `src/document/dvProvider.ts`)
- Snapshot editor provider → Webview message router: registers handlers (evidence: `src/document/dvProvider.ts`)
- Webview message router → Snapshot document: edits and saves (evidence: `src/services/messaging/webviewMessageRouter.ts`)
- Snapshot document → Encoding and hashing: encodes content (evidence: `src/document/dvDocument.ts`)
- Webview message router → Workspace helpers: validates paths (evidence: `src/services/messaging/webviewMessageRouter.ts`)
- Symbol navigation → Text helpers: escapes names (evidence: `src/services/navigation/gotoSymbol.ts`)
- VS Code user → Interactive graph view: explores and exports (evidence: `README.md`)
