How flick9000/winscript works
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: [locale]/index.astro App entry · main.rs Native shell · [locale]/index.astro Site entry · Layout.astro App shell
Components 23
Desktop app
Local Windows product built with Astro UI and Tauri/Rust shell.
- App entry · Localized desktop app entry point and route dispatcher.
app/src/pages/[locale]/index.astro - App shell · Shared page structure for the desktop UI.
app/src/layouts/Layout.astro - UI components · Reusable desktop UI primitives such as sidebar, tabs, dialogs, toggles, and buttons.
app/src/components - Script flows · Browser-side logic for tweak selection, app installs, unattended setup, and script export.
app/src/assets/js - App locales · Static locale bundles and translation helpers for the desktop app.
app/src/i18n/locales - Native shell · Rust/Tauri runtime that provides Windows desktop integration and native capabilities.
app/src-tauri/src/main.rs - Tauri config · Desktop packaging and capability boundaries for the native shell.
app/src-tauri/tauri.conf.json - App styles · Shared styling for the desktop interface.
app/src/assets/styles
Website
Public marketing site for the product.
- Site entry · Localized public website entry point.
website/src/pages/[locale]/index.astro - Background · Website-only visual presentation layer.
website/src/components/Background.astro - Site components · Reusable marketing-site UI primitives.
website/src/components - Site locales · Static locale bundles and translation helpers for the website.
website/src/i18n/locales - Site scripts · Client-side logic reused by the public site.
website/src/assets/js
Docs
Static documentation site with product guides.
- Docs home · Top-level documentation landing page.
docs/index.html - Docs content · Static guides for debloat, gaming, install, privacy, telemetry, presets, and tools.
docs/content - Docs nav · Navigation structure for the documentation site.
docs/_sidebar.md
Delivery
Packaging, release, and installation automation.
- Product README · Repository-level usage, install, and distribution overview.
README.md - Bootstrap · Direct-run installer/bootstrap path for Windows clients.
irm.ps1 - Publish CI · Release automation for build and publishing workflows.
.github/workflows/publish.yml - Winget CI · Packaging and publication path for Winget distribution.
.github/workflows/winget.yml
External services
Outbound distribution and signing services used by the repo.
- Code signing · Signing service used during release distribution.
- Releases · Artifact distribution channel for desktop and bootstrap outputs.
- Winget · Windows package distribution channel.
Connections 24
- 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.