# massimopaganigh/sirstrap architecture

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

- Interactive diagram: https://gitdiagram.com/massimopaganigh/sirstrap
- Repository: https://github.com/massimopaganigh/sirstrap

## Overview

##### Project type and purpose
- Sirstrap is a .NET-based “bootstrapper” application for Roblox, offering both a command-line interface (CLI) and a graphical UI. Its core library implements downloading, installation, configuration, and launching of Roblox with extra features for exploiters.
- It is a full-stack desktop tool, not a web service, but still has clear layers: a reusable core library, two front ends (CLI and UI), test suite, and integrations with external tools and services.

##### File structure
- Top-level “src” contains three main projects:
- Sirstrap.Core: class library with all business logic (configuration, HTTP downloads, manifest parsing, package extraction, registry operations, UAC elevation, version service, launch logic).
- Sirstrap.CLI: console application, references Core, provides scripted/automatable access.
- Sirstrap.UI: Avalonia-based desktop app, references Core, provides graphical access and view models (MVVM pattern).
- There is a “src/ext” directory bundling third-party executables (winget creator, SirCab, upx) that Core invokes for packaging or compression.
- “src/Sirstrap.Core.Tests” holds unit tests against Core.
- Build scripts live under “build/” and GitHub Actions workflows under “.github/workflows” for CI/CD.
- Resources: UI assets under Sirstrap.UI/Assets, configuration publish profiles under each project’s Properties folder.

##### README for additional insights
- Confirms it is a Roblox bootstrapper with extra features.
- Shows badges for build pipelines, releases, and dependencies (Roblox servers).
- Mentions usage scenarios: automated CI builds, end-user installs via CLI or GUI.

##### Elements
– “calls”, “HTTP request/response”, “spawn process”, “read/write config”, “elevate via UAC”
– Blue for front ends, green for Core, gray for external tools, orange for external services
- Data flow direction and dependencies with arrowheads.

##### Important details
- Test suite as a side-component referencing the Core.
- Build and release pipeline connecting source to the final binaries.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% User Interfaces
    subgraph "User Interfaces" 
        direction TB
        CLI["Command-Line Interface"]:::frontend
        UI["Graphical User Interface"]:::frontend
    end

    %% Core Library
    subgraph "Core Library" 
        direction TB
        CM["ConfigurationManager / Parser"]:::core
        MH["ManifestParser / UriBuilder"]:::core
        DV["RobloxVersionService / Downloader / Launcher"]:::core
        PO["PackageManager / PackageExtractor"]:::core
        SI["RegistryManager / PathManager / UacHelper"]:::core
        HL["HttpClientExtension / Logging"]:::core
        US["SirstrapUpdateService / SingletonManager"]:::core
    end

    %% External Tools
    subgraph "External Tools (Toolbox)" 
        direction TB
        WC["wingetcreate.exe"]:::tools
        SC["SirCab.exe"]:::tools
        UX["upx.exe"]:::tools
    end

    %% External Systems
    subgraph "External Systems" 
        direction TB
        RS["Roblox Download Servers"]:::service
        FS["File System & Registry"]:::service
        UA["UAC / Elevation APIs"]:::service
    end

    %% Test Suite
    Tests["Core Unit Tests"]:::test

    %% CI/CD
    subgraph "CI/CD Pipeline" 
        direction TB
        GH["GitHub Actions Workflows"]:::cicd
        BS["Build Scripts"]:::cicd
        AR["Release Artifacts"]:::cicd
    end

    %% Relationships
    CLI -->|"calls Core methods"| CM
    UI -->|"calls Core methods"| CM

    %% UI MVVM
    subgraph "UI Layer (MVVM)" 
        direction TB
        Views["Views (App.axaml, MainWindow.axaml)"]:::frontend
        VMs["ViewModels (MainWindowViewModel)"]:::frontend
        Views -->|"data-bind"| VMs
        VMs -->|"invokes Core"| CM
    end
    UI --> Views

    %% Core modules interactions
    CM --- MH
    MH --- DV
    DV --- PO
    PO --- SI
    SI --- HL
    HL --- US

    %% Core to External Tools
    CM -->|"spawn process"| WC
    CM -->|"spawn process"| SC
    CM -->|"spawn process"| UX

    %% Core to External Systems
    DV -->|"HTTP request/response"| RS
    SI -->|"read/write config"| FS
    SI -->|"elevate via UAC"| UA

    %% Tests reference Core
    Tests -->|"tests modules"| CM

    %% CI/CD flow
    GH --> BS
    BS -->|"compile & package"| CLI
    BS -->|"compile & package"| UI
    BS -->|"compile & package"| Core
    BS -->|"run tests"| Tests
    BS --> AR

    %% Click Events
    click CLI "https://github.com/massimopaganigh/sirstrap/blob/main/src/Sirstrap.CLI"
    click CLI.Program "https://github.com/massimopaganigh/sirstrap/blob/main/src/Sirstrap.CLI/Program.cs"
    click CLI.Project "https://github.com/massimopaganigh/sirstrap/blob/main/src/Sirstrap.CLI/Sirstrap.CLI.csproj"
    click UI "https://github.com/massimopaganigh/sirstrap/blob/main/src/Sirstrap.UI"
    click UI.App "https://github.com/massimopaganigh/sirstrap/blob/main/src/Sirstrap.UI/App.axaml"
    click UI.Views "https://github.com/massimopaganigh/sirstrap/blob/main/src/Sirstrap.UI/Views/MainWindow.axaml"
    click UI.ViewModels "https://github.com/massimopaganigh/sirstrap/blob/main/src/Sirstrap.UI/ViewModels/MainWindowViewModel.cs"
    click UI.ViewModelBase "https://github.com/massimopaganigh/sirstrap/blob/main/src/Sirstrap.UI/ViewModels/ViewModelBase.cs"
    click UI.Locator "https://github.com/massimopaganigh/sirstrap/blob/main/src/Sirstrap.UI/ViewLocator.cs"
    click UI.Project "https://github.com/massimopaganigh/sirstrap/blob/main/src/Sirstrap.UI/Sirstrap.UI.csproj"
    click UI.Assets "https://github.com/massimopaganigh/sirstrap/tree/main/src/Sirstrap.UI/Assets"
    click CM "https://github.com/massimopaganigh/sirstrap/blob/main/src/Sirstrap.Core"
    click CM.ConfigurationManager "https://github.com/massimopaganigh/sirstrap/blob/main/src/Sirstrap.Core/ConfigurationManager.cs"
    click CM.ConfigurationParser "https://github.com/massimopaganigh/sirstrap/blob/main/src/Sirstrap.Core/ConfigurationParser.cs"
    click CM.ManifestParser "https://github.com/massimopaganigh/sirstrap/blob/main/src/Sirstrap.Core/ManifestParser.cs"
    click CM.RobloxVersionService "https://github.com/massimopaganigh/sirstrap/blob/main/src/Sirstrap.Core/RobloxVersionService.cs"
    click CM.RobloxDownloader "https://github.com/massimopaganigh/sirstrap/blob/main/src/Sirstrap.Core/RobloxDownloader.cs"
    click CM.RobloxLauncher "https://github.com/massimopaganigh/sirstrap/blob/main/src/Sirstrap.Core/RobloxLauncher.cs"
    click CM.PackageExtractor "https://github.com/massimopaganigh/sirstrap/blob/main/src/Sirstrap.Core/PackageExtractor.cs"
    click CM.PackageManager "https://github.com/massimopaganigh/sirstrap/blob/main/src/Sirstrap.Core/PackageManager.cs"
    click CM.RegistryManager "https://github.com/massimopaganigh/sirstrap/blob/main/src/Sirstrap.Core/RegistryManager.cs"
    click CM.UacHelper "https://github.com/massimopaganigh/sirstrap/blob/main/src/Sirstrap.Core/UacHelper.cs"
    click CM.HttpClientExtension "https://github.com/massimopaganigh/sirstrap/blob/main/src/Sirstrap.Core/HttpClientExtension.cs"
    click CM.SirstrapUpdateService "https://github.com/massimopaganigh/sirstrap/blob/main/src/Sirstrap.Core/SirstrapUpdateService.cs"
    click CM.Project "https://github.com/massimopaganigh/sirstrap/blob/main/src/Sirstrap.Core/Sirstrap.Core.csproj"
    click WC "https://github.com/massimopaganigh/sirstrap/blob/main/src/ext/Microsoft.WindowsPackageManagerManifestCreator_1.9.14.0/wingetcreate.exe"
    click SC "https://github.com/massimopaganigh/sirstrap/blob/main/src/ext/SirCab/SirCab.exe"
    click UX "https://github.com/massimopaganigh/sirstrap/blob/main/src/ext/upx-5.0.1-win64/upx.exe"
    click Tests "https://github.com/massimopaganigh/sirstrap/blob/main/src/Sirstrap.Core.Tests"
    click Tests.Project "https://github.com/massimopaganigh/sirstrap/blob/main/src/Sirstrap.Core.Tests/Sirstrap.Core.Tests.csproj"
    click GH "https://github.com/massimopaganigh/sirstrap/blob/main/ .github/workflows/develop_branch_build.yml"
    click GH "https://github.com/massimopaganigh/sirstrap/blob/main/ .github/workflows/main_branch_build.yml"
    click GH "https://github.com/massimopaganigh/sirstrap/blob/main/ .github/workflows/release_build.yml"
    click BS "https://github.com/massimopaganigh/sirstrap/tree/main/build"
    classDef frontend fill:#D0E8FF,stroke:#005B96,stroke-width:1px
    classDef core fill:#DFFFE0,stroke:#2E8B57,stroke-width:1px
    classDef tools fill:#F0F0F0,stroke:#666666,stroke-width:1px
    classDef service fill:#FFEED0,stroke:#D2691E,stroke-width:1px
    classDef test fill:#F5E6FF,stroke:#800080,stroke-width:1px
    classDef cicd fill:#FFF4C1,stroke:#DAA520,stroke-width:1px
```
