How josefnemec/playnite works
Main Components
• User Interfaces:
• Playnite.DesktopApp (the primary WPF desktop interface).
• Playnite.FullscreenApp (provides a fullscreen gaming experience).
• Core Application Layer:
• Playnite (contains the majority of business logic, data management, controllers, and common utilities).
• Playnite.API and related namespaces (wrap external integrations, add-ons, and internal service APIs).
• Extension & Plugin System:
• PlayniteSDK: Exposes APIs and models for third-party developers to write plugins/extensions.
• -ons / ThirdPartyClients - these support plugins, themes, and scripts.
• Data & Persistence:
• Database modules for local game libraries, settings, collections, and metadata.
• Localization and resource management (Playnite/Localization, Themes, Resources).
• External Integration Components:
• API modules and controllers integrating with third-party libraries (Steam, Epic, etc.).
• Emulation support (modules under Playnite/Emulation support various emulators, each defined by its own YAML configuration).
• Supporting Tools:
• Build scripts, installer tools, and utilities (Tools and Tests directories).
Relationships and Interactions
• UI components (Desktop and Fullscreen) interact with their respective ViewModels (following an MVVM pattern) that then invoke underlying business logic in the core Playnite layer.
• The Core Application Layer aggregates game data from a variety of sources (local libraries, API calls, emulator configurations) and passes the appropriate information to the views.
• The Plugin/SDK layer is designed with extensibility in mind. It communicates with the core using defined APIs and events (e.g. notifications, settings changes) and is hosted in a separate SDK project.
• External integrations (API wrappers for services and emulators) are consumed by the core business logic to update game metadata, manage user sessions, and handle library synchronizations.
• Testing modules target almost every layer (UI tests, business logic tests, API behavior tests) ensuring that each designated section remains modular and loosely coupled.
Architectural Patterns & Technologies
• MVVM (Model-View-ViewModel) is evident in the separation of UI (XAML-based views) from ViewModels and Controllers.
• Modular and extensible architecture: The separation between the core engine, UI interfaces, and the SDK allows for plugin-based extensions.
• The use of build and deployment scripts (such as PowerShell scripts and build.xml) reflects a CI/CD approach to manage multi-project builds.
• Use of .NET libraries, WPF for UI, and likely dependency injection (or at least loose coupling through abstracted APIs) are critical to the project’s design.