# janiszhang/supporttoolbox architecture

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

- Interactive diagram: https://gitdiagram.com/janiszhang/supporttoolbox
- Repository: https://github.com/janiszhang/supporttoolbox

## Overview

##### Project Type and Purpose
- This is not a full-stack web or server-based project but a set of lightweight, browser-based Chrome extensions.
- The README clearly explains that these tools help users extract environment details (such as the current URL, user account information, etc.) and perform URL conversions. Each extension offers a specific feature accessible via the browser toolbar.

##### File Structure
- At the top level, you see directories “EnvInfoExtractor” and “URL_converter”, each containing the following files:
- A main JavaScript file (EnvInfoExtractor.js and convertedUrl.js) that handles the core logic.
- Other files like LICENSE and README are repository-level resources.

a. Main Components:
- Repository Core:
- Acts as the container for all Chrome extension tools.
- Contains shared resources (like documentation) and development configurations (.idea).

- Chrome Extensions:
▪ manifest.json: Represents configuration and permissions.
▪ JavaScript file (EnvInfoExtractor.js or convertedUrl.js): Handles logic and interactions.
▪ view.html: Provides the user interface.

- Browser Environment:

b. Interactions and Flow:

c. Architectural Patterns and Design Principles:
- Modular Design: Each extension functions as its own module with defined responsibilities.
- Separation of Concerns:
- Configuration (manifest.json) is separate from the UI (view.html) and the business logic (JavaScript files).
- Event-Driven Interaction:
- Direct User Interaction: The design should reflect that the extensions do not have backend servers; they interact directly with the user’s browser context and the webpage content.

d. Technologies and Frameworks:
- Chrome Extension APIs (implied by the manifest.json, which sets permissions and configurations).
- Standard HTML (for view.html) and JavaScript (handling logic within EnvInfoExtractor.js and convertedUrl.js).
- Although there are no additional frameworks mentioned (like React or Angular), note that all front-end functionalities are built using native web technologies.

## Diagram (Mermaid)

```mermaid
graph TD
    RepoCore["Repository Core"]:::repo
    ChromeBrowser["Chrome Browser Environment"]:::external

    subgraph "EnvInfoExtractor Extension"
        EnvModule["EnvInfoExtractor Extension"]:::module
        EnvUI["view.html"]:::ui
        EnvLogic["EnvInfoExtractor.js"]:::logic
        EnvManifest["manifest.json"]:::config
    end

    subgraph "URL_converter Extension"
        URModule["URL_converter Extension"]:::module
        URUI["view.html"]:::ui
        URLogic["convertedUrl.js"]:::logic
        URLManifest["manifest.json"]:::config
    end

    %% Repository Core relationships
    RepoCore --> EnvModule
    RepoCore --> URModule

    %% Chrome Browser interactions triggering UI
    ChromeBrowser --> EnvUI
    ChromeBrowser --> URUI

    %% EnvInfoExtractor Extension flow
    EnvModule --> EnvUI
    EnvUI --> EnvLogic
    EnvLogic --> EnvManifest

    %% URL_converter Extension flow
    URModule --> URUI
    URUI --> URLogic
    URLogic --> URLManifest

    %% Click Events
    click RepoCore "https://github.com/janiszhang/supporttoolbox/tree/master/Root directory"
    click EnvManifest "https://github.com/janiszhang/supporttoolbox/blob/master/EnvInfoExtractor/manifest.json"
    click EnvUI "https://github.com/janiszhang/supporttoolbox/blob/master/EnvInfoExtractor/view.html"
    click EnvLogic "https://github.com/janiszhang/supporttoolbox/blob/master/EnvInfoExtractor/EnvInfoExtractor.js"
    click URLManifest "https://github.com/janiszhang/supporttoolbox/blob/master/URL_converter/manifest.json"
    click URUI "https://github.com/janiszhang/supporttoolbox/blob/master/URL_converter/view.html"
    click URLogic "https://github.com/janiszhang/supporttoolbox/blob/master/URL_converter/convertedUrl.js"

    %% Styles
    classDef repo fill:#FFD700,stroke:#333,stroke-width:2px;
    classDef module fill:#FFEE58,stroke:#333,stroke-width:2px;
    classDef config fill:#ADD8E6,stroke:#333,stroke-width:2px;
    classDef ui fill:#90EE90,stroke:#333,stroke-width:2px;
    classDef logic fill:#DDA0DD,stroke:#333,stroke-width:2px;
    classDef external fill:#FFB6C1,stroke:#333,stroke-width:2px;
```
