$ show mmvanheusden/SteamDepotDownloaderGUI
SteamDepotDownloaderGUI is a Tauri v2 desktop application that provides a graphical interface for DepotDownloader, a CLI tool for downloading specific versions (manifests) of Steam games. The app allows users to input Steam credentials (or download anonymously), app/depot/manifest IDs, and an output directory. The Rust backend downloads the DepotDownloader binary from GitHub, extracts it, and spawns it as a child process via a pseudo-terminal (PTY), streaming output to an xterm.js terminal component in the Preact frontend. The frontend also includes a clipboard parser that extracts identifiers from SteamDB's copy format, auto-filling the form. The architecture is a standard monolithic desktop app with clear separation between Rust backend (Tauri commands) and Preact frontend, communicating via Tauri's invoke system. Settings for output directory naming and mobile authentication are managed through a context. The code is well-organized, with reusable input components and a clean PTY abstraction, though testing is minimal beyond a single URL validation test.
The LLM identified 4 files worth highlighting for reuse:
Implements a clean abstraction for spawning DepotDownloader as a child process with a PTY, handling resize events, and streaming read/write via Tauri commands. The `create_depotdownloader_command` function builds the CLI command parameterized from the `SteamDownload` struct. This module is self-contained and could be reused in any Tauri project requiring terminal emulation for a CLI tool.
Provides a button that reads the clipboard, uses regex to extract app/depot/manifest IDs from a standardized format (e.g., '-app 346900 -depot 346903 -manifest ...'), and sets the form state accordingly. Includes a modal help button explaining the SteamDB copy format. This component is isolated and could be extracted as a generic clipboard parser for any app requiring structured data extraction.
Defines the `SteamDownload` struct using serde deserialization from camelCase JSON and `derive-getters` for clean accessors. Includes a method `output_path()` that constructs the final directory path from optional fields. This model is well-designed and could be reused in any Rust CLI or backend that needs to parse similar download parameters.
Contains reusable Preact form input components (TextInput, NumberInput, BooleanInput, FileInput) with built-in validation, Tauri integration for file dialogs, and proper state handling. These components are generic and could be extracted as a UI component library for Tauri applications, reducing boilerplate for form-heavy apps.