# flick9000/winscript architecture

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

- Interactive diagram: https://gitdiagram.com/flick9000/winscript
- Repository: https://github.com/flick9000/winscript

## Overview

1. **Repository shape**
   - This is a **Windows customization product** with three distinct surfaces: a **desktop app** in `app/`, a **public website** in `website/`, and a **static documentation site** in `docs/`.
   - The runtime product is local-first: there is no central application backend in this repo.

2. **Desktop application boundary**
   - `app/` is the main product. It combines an **Astro front end** with a **Tauri/Rust native shell**.
   - The front end lives under `app/src`, while the Windows-native layer lives under `app/src-tauri`.
   - This split is the main architectural boundary: browser-style UI and state on one side, Windows/OS integration and packaging on the other.

3. **UI composition in the app**
   - The Astro app is organized into reusable UI primitives in `app/src/components` such as `Sidebar`, `MainPage`, `Dialogs`, `Tab`, `ButtonEntry`, `AppToggle`, `ScriptToggle`, and `ScriptRadio`.
   - Page routing is locale-aware via `app/src/pages/[locale]/index.astro`, with a default entry point in `app/src/pages/index.astro`.
   - Shared layout and styling are centralized in `app/src/layouts` and `app/src/assets/styles`.

4. **Localization and content model**
   - Both app and website use the same i18n pattern: locale JSON files under `src/i18n/locales` and helper logic in `src/i18n/utils.ts`.
   - Supported languages are embedded in the repo, so localization is a compile-time/static asset concern rather than a remote service.
   - The architecture strongly suggests that most user-facing labels, categories, and feature descriptions are data-driven from these locale files.

5. **Feature domains exposed in the UI**
   - The product is organized around four main task families reflected in the component and icon taxonomy: **Debloat**, **Privacy**, **Performance**, **App Installer**, plus **Unattended Setup**.
   - Asset folders in `public/icons/*` and `src/assets/*` mirror these domains, indicating the UI is structured by feature category rather than by technical module.
   - The front end likely assembles these feature groups into selectable options, scripts, and preset configurations.

6. **Script-generation workflow**
   - The browser-like UI is not just informational; it appears to generate or configure **PowerShell/Windows automation scripts**.
   - The asset files `appinstall.js`, `unattend.js`, `scripts.js`, and `main.js` imply separate flows for app installs, unattended setup, and general script selection/export.
   - From the README, the core data flow is: **user selects tweaks/apps in the UI → the app builds a script or config → that output is used locally on Windows**.

7. **Native/Tauri layer**
   - `app/src-tauri` contains the Rust side of the desktop app, including `main.rs`, `lib.rs`, `build.rs`, and Tauri capability configuration.
   - This layer is responsible for Windows desktop packaging, native permissions/capabilities, and any OS-specific actions that the web UI cannot perform directly.
   - The `tauri.conf.json` and capability files indicate the app is constrained to explicit desktop capabilities rather than unrestricted native access.

8. **Windows installation and automation boundary**
   - The README highlights two important runtime paths: launching the app directly and importing configuration with `-i`, which implies the app can load a saved JSON config and restore UI state or script selection.
   - A top-level `irm.ps1` bootstrap script supports the “run directly” distribution path, which is part of the product’s deployment architecture.
   - Unattended installation is treated as a first-class output: the app can produce an `autounattend.xml`-style configuration for Windows setup automation.

9. **Website surface**
   - `website/` is a separate Astro site that reuses many of the same component names, assets, and i18n structure as the app.
   - It is likely the marketing/landing site for WinScript, not the desktop runtime itself.
   - The presence of a `Background` component here suggests the website has more presentation-focused layout concerns than the app.

10. **Documentation subsystem**
   - `docs/` is a standalone static documentation site with content pages for the same product domains: debloat, gaming, install, misc, performance, presets, privacy, telemetry, and tools.
   - Its structure is file-based markdown/content plus sidebars, so the docs are generated or served as static content rather than through an application backend.
   - This is a distinct distribution channel for user guidance, separate from the app and website.

11. **Release and distribution infrastructure**
   - GitHub Actions in `.github/workflows` handle release-related automation, including publishing and Winget-related packaging.
   - The README also references GitHub Releases and Winget installation, so distribution is via **GitHub release artifacts**, **Winget**, and a **PowerShell install entrypoint**.
   - `SignPath` code signing is part of the release pipeline, which matters for Windows trust and installer behavior.

12. **External services and operational boundaries**
   - External services are used for distribution and community, not for core app runtime: GitHub Releases, Winget, SignPath signing, and sponsor links (GitHub Sponsors, Ko-fi).
   - There is no evidence of a runtime cloud backend, database, or API dependency in the product itself.
   - For architecture diagrams, the dominant flow is **local Windows client + generated scripts/configs + release/distribution channels**.

Main entry points: [`app/src/pages/[locale]/index.astro`](https://github.com/flick9000/winscript/blob/main/app/src/pages/[locale]/index.astro) (App entry), [`app/src-tauri/src/main.rs`](https://github.com/flick9000/winscript/blob/main/app/src-tauri/src/main.rs) (Native shell), [`website/src/pages/[locale]/index.astro`](https://github.com/flick9000/winscript/blob/main/website/src/pages/[locale]/index.astro) (Site entry), [`app/src/layouts/Layout.astro`](https://github.com/flick9000/winscript/blob/main/app/src/layouts/Layout.astro) (App shell)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Desktop app"]
  node_app_entry["App entry<br/>Astro locale page<br/>[index.astro]"]
  node_app_layout["App shell<br/>Astro layout<br/>[Layout.astro]"]
  node_app_components["UI components<br/>Astro components"]
  node_app_scripts["Script flows<br/>JS workflow assets"]
  node_app_i18n[("App locales<br/>i18n data")]
  node_app_native["Native shell<br/>Tauri Rust<br/>[main.rs]"]
  node_app_tauri_conf["Tauri config<br/>packaging config<br/>[tauri.conf.json]"]
  node_app_ui_style["App styles<br/>CSS assets"]
end

subgraph group_website["Website"]
  node_website_entry["Site entry<br/>Astro locale page<br/>[index.astro]"]
  node_website_bg["Background<br/>presentation component<br/>[Background.astro]"]
  node_website_components["Site components<br/>Astro components"]
  node_website_i18n[("Site locales<br/>i18n data")]
  node_website_scripts["Site scripts<br/>JS workflow assets"]
end

subgraph group_docs["Docs"]
  node_docs_index["Docs home<br/>static docs<br/>[index.html]"]
  node_docs_content["Docs content<br/>markdown docs"]
  node_docs_sidebar["Docs nav<br/>sidebar config<br/>[_sidebar.md]"]
end

subgraph group_delivery["Delivery"]
  node_delivery_readme["Product README<br/>project guide<br/>[README.md]"]
  node_delivery_bootstrap["Bootstrap<br/>PowerShell entrypoint<br/>[irm.ps1]"]
  node_ci_publish["Publish CI<br/>GitHub Actions<br/>[publish.yml]"]
  node_ci_winget["Winget CI<br/>GitHub Actions<br/>[winget.yml]"]
end

subgraph group_external["External services"]
  node_signpath["Code signing<br/>external service"]
  node_github_releases["Releases<br/>external service"]
  node_winget["Winget<br/>external package feed"]
end

node_app_entry -->|"renders"| node_app_layout
node_app_layout -->|"uses"| node_app_components
node_app_entry -->|"loads"| node_app_i18n
node_app_entry -->|"drives"| node_app_scripts
node_app_scripts -->|"binds"| node_app_components
node_app_scripts -->|"invokes"| node_app_native
node_app_native -->|"constrained by"| node_app_tauri_conf
node_app_entry -->|"bridges to"| node_app_native
node_app_layout -->|"styled by"| node_app_ui_style
node_website_entry -->|"renders"| node_website_components
node_website_entry -->|"uses"| node_website_bg
node_website_entry -->|"loads"| node_website_i18n
node_website_entry -->|"drives"| node_website_scripts
node_docs_index -->|"serves"| node_docs_content
node_docs_index -->|"navigates"| node_docs_sidebar
node_delivery_readme -->|"describes"| node_app_entry
node_delivery_readme -->|"describes"| node_delivery_bootstrap
node_delivery_bootstrap -->|"launches"| node_app_native
node_ci_publish -->|"publishes"| node_github_releases
node_ci_publish -->|"signs with"| node_signpath
node_ci_winget -->|"publishes"| node_winget
node_ci_winget -->|"signs with"| node_signpath
node_github_releases -->|"hosts"| node_delivery_bootstrap
node_winget -->|"installs"| node_app_native

click node_app_entry "https://github.com/flick9000/winscript/blob/main/app/src/pages/[locale]/index.astro"
click node_app_layout "https://github.com/flick9000/winscript/blob/main/app/src/layouts/Layout.astro"
click node_app_components "https://github.com/flick9000/winscript/tree/main/app/src/components"
click node_app_scripts "https://github.com/flick9000/winscript/tree/main/app/src/assets/js"
click node_app_i18n "https://github.com/flick9000/winscript/tree/main/app/src/i18n/locales"
click node_app_native "https://github.com/flick9000/winscript/blob/main/app/src-tauri/src/main.rs"
click node_app_tauri_conf "https://github.com/flick9000/winscript/blob/main/app/src-tauri/tauri.conf.json"
click node_app_ui_style "https://github.com/flick9000/winscript/tree/main/app/src/assets/styles"
click node_website_entry "https://github.com/flick9000/winscript/blob/main/website/src/pages/[locale]/index.astro"
click node_website_bg "https://github.com/flick9000/winscript/blob/main/website/src/components/Background.astro"
click node_website_components "https://github.com/flick9000/winscript/tree/main/website/src/components"
click node_website_i18n "https://github.com/flick9000/winscript/tree/main/website/src/i18n/locales"
click node_website_scripts "https://github.com/flick9000/winscript/tree/main/website/src/assets/js"
click node_docs_index "https://github.com/flick9000/winscript/blob/main/docs/index.html"
click node_docs_content "https://github.com/flick9000/winscript/tree/main/docs/content"
click node_docs_sidebar "https://github.com/flick9000/winscript/blob/main/docs/_sidebar.md"
click node_delivery_readme "https://github.com/flick9000/winscript/blob/main/README.md"
click node_delivery_bootstrap "https://github.com/flick9000/winscript/blob/main/irm.ps1"
click node_ci_publish "https://github.com/flick9000/winscript/blob/main/.github/workflows/publish.yml"
click node_ci_winget "https://github.com/flick9000/winscript/blob/main/.github/workflows/winget.yml"

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_app_entry,node_app_layout,node_app_components,node_app_scripts,node_app_i18n,node_app_native,node_app_tauri_conf,node_app_ui_style toneBlue
class node_website_entry,node_website_bg,node_website_components,node_website_i18n,node_website_scripts toneAmber
class node_docs_index,node_docs_content,node_docs_sidebar toneMint
class node_delivery_readme,node_delivery_bootstrap,node_ci_publish,node_ci_winget toneRose
class node_signpath,node_github_releases,node_winget toneIndigo
```

## Components

### Desktop app

Local Windows product built with Astro UI and Tauri/Rust shell.

- [App entry](https://github.com/flick9000/winscript/blob/main/app/src/pages/[locale]/index.astro): Astro locale page · Localized desktop app entry point and route dispatcher. · `app/src/pages/[locale]/index.astro`
- [App shell](https://github.com/flick9000/winscript/blob/main/app/src/layouts/Layout.astro): Astro layout · Shared page structure for the desktop UI. · `app/src/layouts/Layout.astro`
- [UI components](https://github.com/flick9000/winscript/tree/main/app/src/components): Astro components · Reusable desktop UI primitives such as sidebar, tabs, dialogs, toggles, and buttons. · `app/src/components`
- [Script flows](https://github.com/flick9000/winscript/tree/main/app/src/assets/js): JS workflow assets · Browser-side logic for tweak selection, app installs, unattended setup, and script export. · `app/src/assets/js`
- [App locales](https://github.com/flick9000/winscript/tree/main/app/src/i18n/locales): i18n data · Static locale bundles and translation helpers for the desktop app. · `app/src/i18n/locales`
- [Native shell](https://github.com/flick9000/winscript/blob/main/app/src-tauri/src/main.rs): Tauri Rust · Rust/Tauri runtime that provides Windows desktop integration and native capabilities. · `app/src-tauri/src/main.rs`
- [Tauri config](https://github.com/flick9000/winscript/blob/main/app/src-tauri/tauri.conf.json): packaging config · Desktop packaging and capability boundaries for the native shell. · `app/src-tauri/tauri.conf.json`
- [App styles](https://github.com/flick9000/winscript/tree/main/app/src/assets/styles): CSS assets · Shared styling for the desktop interface. · `app/src/assets/styles`

### Website

Public marketing site for the product.

- [Site entry](https://github.com/flick9000/winscript/blob/main/website/src/pages/[locale]/index.astro): Astro locale page · Localized public website entry point. · `website/src/pages/[locale]/index.astro`
- [Background](https://github.com/flick9000/winscript/blob/main/website/src/components/Background.astro): presentation component · Website-only visual presentation layer. · `website/src/components/Background.astro`
- [Site components](https://github.com/flick9000/winscript/tree/main/website/src/components): Astro components · Reusable marketing-site UI primitives. · `website/src/components`
- [Site locales](https://github.com/flick9000/winscript/tree/main/website/src/i18n/locales): i18n data · Static locale bundles and translation helpers for the website. · `website/src/i18n/locales`
- [Site scripts](https://github.com/flick9000/winscript/tree/main/website/src/assets/js): JS workflow assets · Client-side logic reused by the public site. · `website/src/assets/js`

### Docs

Static documentation site with product guides.

- [Docs home](https://github.com/flick9000/winscript/blob/main/docs/index.html): static docs · Top-level documentation landing page. · `docs/index.html`
- [Docs content](https://github.com/flick9000/winscript/tree/main/docs/content): markdown docs · Static guides for debloat, gaming, install, privacy, telemetry, presets, and tools. · `docs/content`
- [Docs nav](https://github.com/flick9000/winscript/blob/main/docs/_sidebar.md): sidebar config · Navigation structure for the documentation site. · `docs/_sidebar.md`

### Delivery

Packaging, release, and installation automation.

- [Product README](https://github.com/flick9000/winscript/blob/main/README.md): project guide · Repository-level usage, install, and distribution overview. · `README.md`
- [Bootstrap](https://github.com/flick9000/winscript/blob/main/irm.ps1): PowerShell entrypoint · Direct-run installer/bootstrap path for Windows clients. · `irm.ps1`
- [Publish CI](https://github.com/flick9000/winscript/blob/main/.github/workflows/publish.yml): GitHub Actions · Release automation for build and publishing workflows. · `.github/workflows/publish.yml`
- [Winget CI](https://github.com/flick9000/winscript/blob/main/.github/workflows/winget.yml): GitHub Actions · Packaging and publication path for Winget distribution. · `.github/workflows/winget.yml`

### External services

Outbound distribution and signing services used by the repo.

- **Code signing**: external service · Signing service used during release distribution.
- **Releases**: external service · Artifact distribution channel for desktop and bootstrap outputs.
- **Winget**: external package feed · Windows package distribution channel.

## Connections

- App entry → App shell: renders · Locale page composes the shared app shell.
- App shell → UI components: uses · Layout assembles reusable UI primitives.
- App entry → App locales: loads · Localized page content comes from embedded locale files.
- App entry → Script flows: drives · UI interactions feed script-generation flows.
- Script flows → UI components: binds · Selection widgets and dialogs support script configuration.
- Script flows → Native shell: invokes · Generated output is handed to the native desktop layer when needed.
- Native shell → Tauri config: constrained by · Native runtime is limited by explicit desktop capabilities.
- App entry → Native shell: bridges to · Desktop UI crosses into the Tauri shell for OS integration.
- App shell → App styles: styled by · Shared styling defines the app presentation system.
- Site entry → Site components: renders · Marketing pages compose reusable site components.
- Site entry → Background: uses · Public site adds presentation-focused background treatment.
- Site entry → Site locales: loads · Website content is localized from static bundles.
- Site entry → Site scripts: drives · Site interactions use shared client-side script flows.
- Docs home → Docs content: serves · Docs home exposes the markdown guide set.
- Docs home → Docs nav: navigates · Sidebar config defines documentation structure.
- Product README → App entry: describes · README documents the desktop app workflow.
- Product README → Bootstrap: describes · README points to the direct-run bootstrap path.
- Bootstrap → Native shell: launches · PowerShell bootstrap hands off to the local desktop runtime.
- Publish CI → Releases: publishes · Release workflow produces distributable artifacts.
- Publish CI → Code signing: signs with · Publish pipeline integrates code signing.
- Winget CI → Winget: publishes · Winget workflow updates the package feed.
- Winget CI → Code signing: signs with · Winget packaging also depends on code signing.
- Releases → Bootstrap: hosts · Release artifacts back the PowerShell install path.
- Winget → Native shell: installs · Winget distributes the desktop application.
