# truong310100/soft architecture

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

- Interactive diagram: https://gitdiagram.com/truong310100/soft
- Repository: https://github.com/truong310100/soft

## Overview

##### Project Type and Purpose
- This “Soft” repository is not a web or server application but a curated toolkit for Windows administrators and power users. It aggregates:
- Batch scripts (.cmd), VB scripts (.vbs), and Python scripts (.py)
- Portable executables (.exe) for utilities like 7-zip, AnyDesk, CrystalDiskInfo
- Configuration files (JSON, .reg) and Office/Windows activation tools
- Document templates under signatureHHH/Form
- Purpose: streamline device setup, driver installation, license activation, system checks, and document generation on Windows.

##### File‐Structure Analysis
- Top‐level:
- Run.cmd, Setup.vbs – entry points
- Apps/ – container for all modules
- README.md – placeholder with Git instructions
- Under Apps/:
- Activation tools (ActivateAIOToolsv3.1.3/) – nested folders of scripts, binaries, license files
- CheckingDevice/ – subfolders for BackupApp (Python + JSON), CrystalDiskInfo (binaries + CSV data)
- signatureHHH/ – Python‐based doc generator plus Word template library
- Assorted standalone installers and helper scripts (.cmd, .vbs, .reg, .exe)

a. Main Components
1. Entry Layer
– Run.cmd / Setup.vbs (invoked by user)
2. Module Layer
– Activation Module (scripts + binaries + license data)
– CheckingDevice Module
- BackupApp (Python + data JSON)
- CrystalDiskInfo (exe + SMART CSV data)
– Document Generation Module (signatureHHH/Form + Python exe)
– Utility Scripts & Installers (7-zip, AnyDesk, Wi-Fi drivers, etc.)
3. Data Layer
– License configuration files (.xrm-ms, .reg)
– Device data (SMART CSV under CheckingDevice)
– Template docs (.docx)
b. Relationships & Interactions
– User → Entry Layer (Run.cmd kicks off setup)
– Entry Layer → Module Layer (calls specific scripts)
– Activation Module scripts call binaries and read/write license data
– BackupApp Python reads JSON, writes folder backups
– CrystalDiskInfo exe reads device SMART data and stores CSVs
– Document Gen Python exe reads templates → outputs .docx
c. Architectural Patterns & Principles
– Modular separation by function (Activation, Backup, Monitoring, Doc Gen)
– File-system–centric “service” approach: each module is self-contained in its subfolder
– Use of portable executables to avoid system installation dependencies
d. Key Technologies
– Windows Batch (.cmd), VBScript (.vbs), Python (PyInstaller exe)
– Portable COTS tools (7-zip, AnyDesk, CrystalDiskInfo)
– JSON for config, CSV for device data

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Entry Layer
    subgraph "Entry Layer"
        RunCMD["Run.cmd"]:::entry
        SetupVBS["Setup.vbs"]:::entry
    end

    %% Module Layer
    subgraph "Module Layer"
        direction TB

        %% Activation Module
        subgraph "Activation Module" 
            direction TB
            ActivRoot["ActivateAIOToolsv3.1.3/"]:::activation
            ActivScript["ActivateAIOToolsv3.1.3bySavio.cmd"]:::activation
            BIN["BIN/"]:::activation
            Converter["Converter/"]:::activation
            LicenseFiles["License Files/"]:::activation
        end

        %% CheckingDevice Module
        subgraph "CheckingDevice Module"
            direction TB
            subgraph "BackupApp" 
                direction TB
                BackupAppRoot["BackupApp/"]:::device
                JSONLocal["data_localhost.json"]:::device
                JSONList["list_data_localhost.json"]:::device
            end
            subgraph "CrystalDiskInfo"
                direction TB
                CDIFolder["CrytalDiskInfo/"]:::device
                SmartData["Smart/"]:::device
            end
        end

        %% Document Generation Module
        subgraph "DocGen Module"
            direction TB
            FormTemplates["Form/"]:::docgen
            RunPy["Run.py"]:::docgen
            RunExe["run.exe"]:::docgen
            SpecFile["run.spec"]:::docgen
            OutputDocs["Output/"]:::docgen
        end

        %% Utilities Module
        subgraph "Utilities & Installers"
            direction TB
            Utils["Portable Tools & Scripts"]:::util
        end
    end

    %% Data Layer
    subgraph "Data Layer"
        direction TB
        LicenseData["License Files (.xrm-ms, .reg)"]:::data
        SMARTCSV["SMART CSV Data"]:::data
        DocTemplates["Document Templates (.docx)"]:::data
    end

    %% Connections Entry -> Modules
    RunCMD -->|"invokes"| ActivRoot
    RunCMD -->|"invokes"| BackupAppRoot
    RunCMD -->|"invokes"| CDIFolder
    RunCMD -->|"invokes"| FormTemplates
    RunCMD -->|"invokes"| Utils

    SetupVBS -->|"invokes"| ActivRoot
    SetupVBS -->|"invokes"| BackupAppRoot
    SetupVBS -->|"invokes"| CDIFolder
    SetupVBS -->|"invokes"| FormTemplates
    SetupVBS -->|"invokes"| Utils

    %% Activation inner calls
    ActivRoot -->|"runs"| ActivScript
    ActivScript -->|"loads"| BIN
    BIN -->|"contains"| Converter
    Converter -->|"reads/writes"| LicenseFiles
    LicenseFiles -->|"stored in"| LicenseData

    %% CheckingDevice inner calls
    CDIFolder -->|"executes"| SmartData
    SmartData -->|"stores"| SMARTCSV
    BackupAppRoot -->|"reads"| JSONLocal
    BackupAppRoot -->|"reads"| JSONList
    BackupAppRoot -->|"writes backups"| DataBackup(DB)

    %% DocGen inner calls
    FormTemplates -->|"provides"| DocTemplates
    RunPy -->|"built to"| RunExe
    RunExe -->|"reads"| FormTemplates
    RunExe -->|"writes"| OutputDocs
    OutputDocs -->|"example files"| DocTemplates

    %% Utilities interactions
    Utils -->|"executes various"| LicenseData
    Utils -->|"executes various"| SMARTCSV

    %% Click Events
    click RunCMD "https://github.com/truong310100/soft/blob/main//Run.cmd"
    click SetupVBS "https://github.com/truong310100/soft/blob/main//Setup.vbs"
    click ActivRoot "https://github.com/truong310100/soft/blob/main//Apps/ActivateAIOToolsv3.1.3"
    click ActivScript "https://github.com/truong310100/soft/blob/main//Apps/ActivateAIOToolsv3.1.3/ActivateAIOToolsv3.1.3bySavio.cmd"
    click BIN "https://github.com/truong310100/soft/tree/main//Apps/ActivateAIOToolsv3.1.3/BIN"
    click Converter "https://github.com/truong310100/soft/tree/main//Apps/ActivateAIOToolsv3.1.3/BIN/Converter"
    click LicenseFiles "https://github.com/truong310100/soft/tree/main//Apps/ActivateAIOToolsv3.1.3/BIN/Converter/License Files"
    click BackupAppRoot "https://github.com/truong310100/soft/tree/main//Apps/CheckingDevice/BackupApp"
    click JSONLocal "https://github.com/truong310100/soft/blob/main//Apps/CheckingDevice/BackupApp/data_localhost.json"
    click JSONList "https://github.com/truong310100/soft/blob/main//Apps/CheckingDevice/BackupApp/list_data_localhost.json"
    click CDIFolder "https://github.com/truong310100/soft/tree/main//Apps/CheckingDevice/CrytalDiskInfo"
    click SmartData "https://github.com/truong310100/soft/tree/main//Apps/CheckingDevice/CrytalDiskInfo/Smart"
    click FormTemplates "https://github.com/truong310100/soft/tree/main//Apps/signatureHHH/Form"
    click RunPy "https://github.com/truong310100/soft/blob/main//Apps/signatureHHH/Form/Data/Run.py"
    click RunExe "https://github.com/truong310100/soft/blob/main//Apps/signatureHHH/Form/Data/build/run/run.exe"
    click SpecFile "https://github.com/truong310100/soft/blob/main//Apps/signatureHHH/Form/Data/run.spec"
    click OutputDocs "https://github.com/truong310100/soft/tree/main//Apps/signatureHHH/Form/Data/Output"

    %% Styles
    classDef entry fill:#f5b7b1,stroke:#c0392b,color:#000
    classDef activation fill:#d5f5e3,stroke:#27ae60,color:#000
    classDef device fill:#fdedcc,stroke:#d68910,color:#000
    classDef docgen fill:#d6eaf8,stroke:#2980b9,color:#000
    classDef util fill:#ecf0f1,stroke:#7f8c8d,color:#000
    classDef data fill:#f9e79f,stroke:#b7950b,color:#000
```
