# goodbyemyself/vscode-plugin architecture

> Architecture diagram of the GitHub repository goodbyemyself/vscode-plugin, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-05-23). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/goodbyemyself/vscode-plugin
- Repository: https://github.com/goodbyemyself/vscode-plugin

## Overview

##### Project type and purpose
- This is a VS Code extension (“development-tool”), not a multi-service web application.
- Its purpose is to provide code snippets and custom commands/completions inside the VS Code editor.

##### File structure
- Top-level:
- package.json – VS Code extension manifest (activation events, contributions, dependencies)
- src/extension.js – extension entry point (activate/deactivate)
- src/registerCommand/… – individual command & completion‐provider modules
- snippets/… – collections of grammar.code-snippets organized by category (Antd, React, Vue, etc.)
- Configuration/metadata:
- development-tool-1.0.0.vsix – packaged extension
- vsc-extension-quickstart.md – scaffold guidance
- CHANGELOG.md, LICENSE, README.md

##### README for additional insights
- Minimal descriptive text: “extension for convenient development,” supports VS Code ≥1.76

- extension.js (entry point)
- registerCommand modules (completion.js, helloword.js, test-menu.js, etc.)
- Snippet loader component
- package.json (pointing to activationEvents & contributions)
and “executeCommand() → showInfoMessage / other side effects.”

## Diagram (Mermaid)

```mermaid
flowchart TB
    VSCode["VS Code Main Process & Renderer"]:::process
    EH["Extension Host Process (Node.js)"]:::process
    VSCode -->|"RPC via extension host protocol"| EH

    subgraph "Extension Host"
        EJS["extension.js"]:::module
        PJSON["package.json"]:::config
        subgraph "Command & Completion Modules"
            COMP["completion.js"]:::module
            HW["helloword.js"]:::module
            TCP["test-command-params.js"]:::module
            TM["test-menu.js"]:::module
        end
        SNIPLOAD["Snippet Loader"]:::service
        subgraph "Snippet Resources"
            direction TB
            S_ANTD["Antd Snippets"]:::resource
            S_CI["CI Snippets"]:::resource
            S_CODE["Code Snippets"]:::resource
            S_CSS["CSS Snippets"]:::resource
            S_ELEMENT["Element Snippets"]:::resource
            S_EVENTS["Events Snippets"]:::resource
            S_JSX["JSX Snippets"]:::resource
            S_JS["JS Snippets"]:::resource
            S_PY["Python Snippets"]:::resource
            S_REACT["React Snippets"]:::resource
            S_TS["TypeScript Snippets"]:::resource
            S_USER["User-defined Snippets"]:::resource
            S_VUE["Vue Snippets"]:::resource
        end
    end

    VSCode -->|"activationEvents triggers"| EJS
    EJS -->|"registerCommand() calls"| COMP
    EJS -->|"registerCommand() calls"| HW
    EJS -->|"registerCommand() calls"| TCP
    EJS -->|"registerCommand() calls"| TM

    COMP -->|"fs.readFile & JSON.parse"| SNIPLOAD
    HW -->|"fs.readFile & JSON.parse"| SNIPLOAD
    TCP -->|"fs.readFile & JSON.parse"| SNIPLOAD
    TM -->|"fs.readFile & JSON.parse"| SNIPLOAD

    SNIPLOAD -->|"loads resources"| S_ANTD
    SNIPLOAD -->|"loads resources"| S_CI
    SNIPLOAD -->|"loads resources"| S_CODE
    SNIPLOAD -->|"loads resources"| S_CSS
    SNIPLOAD -->|"loads resources"| S_ELEMENT
    SNIPLOAD -->|"loads resources"| S_EVENTS
    SNIPLOAD -->|"loads resources"| S_JSX
    SNIPLOAD -->|"loads resources"| S_JS
    SNIPLOAD -->|"loads resources"| S_PY
    SNIPLOAD -->|"loads resources"| S_REACT
    SNIPLOAD -->|"loads resources"| S_TS
    SNIPLOAD -->|"loads resources"| S_USER
    SNIPLOAD -->|"loads resources"| S_VUE

    COMP -->|"provideCompletionItems() returns"| VSCode
    HW -->|"executeCommand() returns"| VSCode
    TCP -->|"executeCommand() returns"| VSCode
    TM -->|"executeCommand() returns"| VSCode

    click EJS "https://github.com/goodbyemyself/vscode-plugin/blob/main/src/extension.js"
    click PJSON "https://github.com/goodbyemyself/vscode-plugin/blob/main/package.json"
    click COMP "https://github.com/goodbyemyself/vscode-plugin/blob/main/src/registerCommand/completion.js"
    click HW "https://github.com/goodbyemyself/vscode-plugin/blob/main/src/registerCommand/helloword.js"
    click TCP "https://github.com/goodbyemyself/vscode-plugin/blob/main/src/registerCommand/test-command-params.js"
    click TM "https://github.com/goodbyemyself/vscode-plugin/blob/main/src/registerCommand/test-menu.js"
    click S_ANTD "https://github.com/goodbyemyself/vscode-plugin/blob/main/snippets/Antd/grammar.code-snippets"
    click S_CI "https://github.com/goodbyemyself/vscode-plugin/blob/main/snippets/CI/grammar.code-snippets"
    click S_CODE "https://github.com/goodbyemyself/vscode-plugin/blob/main/snippets/Code/grammar.code-snippets"
    click S_CSS "https://github.com/goodbyemyself/vscode-plugin/blob/main/snippets/Css/grammar.code-snippets"
    click S_ELEMENT "https://github.com/goodbyemyself/vscode-plugin/blob/main/snippets/Element/grammar.code-snippets"
    click S_EVENTS "https://github.com/goodbyemyself/vscode-plugin/blob/main/snippets/Events/events.code-snippets"
    click S_JSX "https://github.com/goodbyemyself/vscode-plugin/blob/main/snippets/Javascript/esx.code-snippets"
    click S_JS "https://github.com/goodbyemyself/vscode-plugin/blob/main/snippets/Javascript/js.code-snippets"
    click S_PY "https://github.com/goodbyemyself/vscode-plugin/blob/main/snippets/Python/grammar.code-snippets"
    click S_REACT "https://github.com/goodbyemyself/vscode-plugin/blob/main/snippets/React/grammar.code-snippets"
    click S_TS "https://github.com/goodbyemyself/vscode-plugin/blob/main/snippets/Typescript/grammar.code-snippets"
    click S_USER "https://github.com/goodbyemyself/vscode-plugin/blob/main/snippets/User/M.yunlong/grammar.code-snippets"
    click S_VUE "https://github.com/goodbyemyself/vscode-plugin/blob/main/snippets/Vue/grammar.code-snippets"

    classDef process fill:#87CEFA,stroke:#333,stroke-width:1px
    classDef module fill:#98FB98,stroke:#333,stroke-width:1px
    classDef service fill:#ADFF2F,stroke:#333,stroke-width:1px
    classDef config fill:#FFD700,stroke:#333,stroke-width:1px,stroke-dasharray:5 5
    classDef resource fill:#FFFACD,stroke:#333,stroke-width:1px
```
