$ show Scighost/Starward
Starward is a third-party Windows desktop companion and launcher for HoYoverse games (Genshin Impact, Honkai: Star Rail, Honkai Impact 3rd, Zenless Zone Zero). It replaces the official HoYoPlay with enhanced features: game installation and update management (including pre-download and delta patching), gacha (wish) history tracking with UIGF import/export, real-time game record display (Spiral Abyss, Simulated Universe, etc.), HDR screenshot capture and batch conversion, playtime statistics, game account switching, and cloud game launching. The application is built with .NET 10 (C#), WinUI 3, and MVVM (CommunityToolkit.Mvvm), with a separate gRPC-based background service (Starward.RPC) for privileged game installation tasks. It uses SQLite via Dapper for local data storage, WebView2 for miHoYo login and game notices, and integrates with miHoYo/HoYoverse APIs via reverse-engineered clients. The codebase is well-structured into Core, RPC, Setup, and UI projects, with strong localization support (10+ languages via Crowdin). It demonstrates advanced Windows development skills including Win32 interop, Win2D image processing, and custom XAML controls. However, it is Windows-only, tightly coupled to miHoYo's volatile APIs, and contains some code duplication (e.g., DriveHelper) and hardcoded registry paths.
The LLM identified 5 files worth highlighting for reuse:
Custom WinUI ImageEx control that asynchronously loads images from URLs, caches them to disk, and generates JPEG thumbnails for videos and images. Handles memory management, retries, and cancellation. Demonstrates advanced image loading patterns and can be reused in any WinUI application needing efficient image display.
A self-drawn overlay tooltip for chart data points, rendered as a semi-transparent rounded rectangle with formatted text. Uses direct composition and Win2D for smooth rendering. Decoupled from chart logic, making it reusable as a general-purpose tooltip overlay in custom WinUI controls.
A .NET Stream implementation that combines multiple FileStreams into a single readable, seekable stream. Supports partial reads across boundaries, length calculation, and disposal. Useful for patching or concatenating file segments without copying data. Cleanly abstracted and easily extractable.
Generic class that provides a collection of enum values with localized display names for XAML bindings. Uses a custom LocalizationKeyAttribute to map enum fields to resource keys. Demonstrates a clean, reusable pattern for binding enums to dropdowns or lists with full localization support.
Custom SystemBackdrop implementation for WinUI windows that provides transparent, Mica, or Acrylic backdrops using DWM and Win32 subclassing. Supports theme changes and window activation. Complex but isolated interop code that can be reused to create modern overlay windows.