How wheaney/decky-xrgaming works
Main components
• Frontend/UI Layer: Represented by the “src” folder containing various TSX/TS files (e.g., QrButton.tsx, SupporterTierModal.tsx, tutorials.tsx, etc.). This component is responsible for the plugin’s UI in Decky Loader, and handles user interactions to change display modes and adjust settings.
• Backend/Service Layer: Found in “backend” (with Dockerfile and entrypoint.sh) and possibly “main.py”. This service handles business logic such as configuration management, IPC (note the “PyXRLinuxDriverIPC” file), and licensing for Supporter Tier features. It may also interact with external services (such as Ko-fi for payments) and perform device-specific actions.
• Plugin Configuration & Metadata: Files like “plugin.json”, “package.json”, and “rollup.config.js” indicate how the plugin is built, packaged, and loaded by Decky Loader.
• Integration Components: The project integrates with external dependencies like Breezy Desktop’s Vulkan implementation and the XRLinuxDriver. This creates an implicit component representing the external driver/hardware interface.
• Utility/Tooling: The “bin” directory (package, update_remote_binaries) and “defaults” directory show additional scripts to package and update binaries, which are essential during deployment and updates.
Relationships and interactions
• The Backend interacts with external hardware drivers or libraries (e.g., Breezy Vulkan and XRLinuxDriverIPC) to manage head-tracking, virtual display adjustments, and extended configuration features.
• The plugin sits within the Decky Loader ecosystem. Illustrate how the Decky Loader provides the hosting environment, with both the UI and the backend being loaded as part of the plugin infrastructure.
• Deployment pipeline – including Docker for sandboxing the backend – and any update mechanism orchestrated through the “bin/update_remote_binaries” script.
Architectural patterns and technology choices
• Frontend is likely built with a component-based pattern (React or similar framework), which handles modular UI components, state management (as seen from “stableState.ts”), and interactions.
• Backend services follow a containerized deployment (referencing the Dockerfile) and may adhere to a microservice or modular design, handling licensing and configuration via a defined API.
• The use of IPC in “PyXRLinuxDriverIPC” suggests decoupled components where the frontend communicates with low-level system interfaces.
Additional details
• That the “assets” folder contains tutorials and visual assets for the UI which might provide context during user interactions.
• Optionally, represent the build system and packaging (via “package.json”, “pnpm-lock.yaml”, “rollup.config.js”) which affect how the frontend and plugin are compiled and deployed.
• If necessary, add notes indicating that some IPC components are abstracted (referenced by PyXRLinuxDriverIPC and decky.pyi) to manage interactions between the plugin and the device’s display hardware.