# eskastacy/stellary.px architecture

> Architecture diagram of the GitHub repository eskastacy/stellary.px, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-25). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/eskastacy/stellary.px
- Repository: https://github.com/eskastacy/stellary.px

## Overview

Stellary.PX is a local-first Windows console for emulator performance tuning. Users navigate its pages to inspect system/emulator state, then explicitly apply or restore optimizations. The overview workflow is owned by OptimizerEngine: it detects the emulator and coordinates priority, timer, power-plan, and registry stages, returning per-stage outcomes. The emulator page separately handles launch-time boosting, cache cleanup, driver inspection, high-FPS settings, and the optional injected uncap engine. Visual presets, diagnostics, and settings are additional product branches. Relationships are limited to excerpted calls and README-documented capabilities; several page implementations were not sampled.

Main entry points: [`src/Stellary.PX/Services/OptimizerEngine.cs`](https://github.com/eskastacy/stellary.px/blob/main/src/Stellary.PX/Services/OptimizerEngine.cs) (Apply and restore), [`src/Stellary.PX/ViewModels/ShellViewModel.cs`](https://github.com/eskastacy/stellary.px/blob/main/src/Stellary.PX/ViewModels/ShellViewModel.cs) (Page navigation), [`src/Stellary.PX/ViewModels/EmulatorViewModel.cs`](https://github.com/eskastacy/stellary.px/blob/main/src/Stellary.PX/ViewModels/EmulatorViewModel.cs) (Emulator controls), [`src/Stellary.PX/AppServices.cs`](https://github.com/eskastacy/stellary.px/blob/main/src/Stellary.PX/AppServices.cs) (Service composition)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application shell"]
  node_shell["Page navigation<br/>[ShellViewModel.cs]"]
  node_services["Service composition<br/>[AppServices.cs]"]
  node_overview["Live overview"]
end

subgraph group_tuning["Optimization workflow"]
  node_engine["Apply and restore<br/>[OptimizerEngine.cs]"]
  node_priority["Process priority<br/>[PriorityService.cs]"]
  node_timer["Timer resolution<br/>[TimerService.cs]"]
  node_power["Power plans"]
  node_registry["Registry tuning"]
  node_outcomes["Stage outcomes<br/>[StepResult.cs]"]
end

subgraph group_emulator["Emulator controls"]
  node_target["Emulator discovery<br/>[EmulatorService.cs]"]
  node_emulatorpage["Emulator controls"]
  node_cache["QML cache<br/>[CacheService.cs]"]
  node_drivers["Driver inspection<br/>[DriverService.cs]"]
  node_uncap["Injection and telemetry<br/>[UncapService.cs]"]
  node_payload["Embedded payload<br/>[PayloadStore.cs]"]
end

subgraph group_support["User capabilities"]
  node_visuals["Visual presets"]
  node_diagnostics["Diagnostics"]
  node_integrity["Binary integrity"]
  node_toolscan["Instrumentation scan<br/>[ToolScanService.cs]"]
  node_settings["User settings"]
  node_settingsdata[("Settings persistence<br/>[SettingsService.cs]")]
  node_log[("Session log<br/>[AppLog.cs]")]
  node_paths["App data paths<br/>[Paths.cs]"]
end

subgraph group_runtime["Native runtime"]
  node_native["Uncap engine<br/>[UncapEngine.cpp]"]
  node_telemetry["Shared telemetry contract<br/>[UncapTelemetry.h]"]
  node_installer["Hook installer<br/>[UncapInstaller.cpp]"]
  node_example["Native SDK example<br/>[Example_Main.cpp]"]
end

node_user(("Windows user"))

node_user -->|"uses pages"| node_shell
node_shell -->|"creates page"| node_overview
node_shell -->|"creates page"| node_emulatorpage
node_shell -->|"creates page"| node_visuals
node_shell -->|"creates page"| node_diagnostics
node_shell -->|"creates page"| node_settings
node_services -->|"constructs"| node_engine
node_overview -->|"applies or restores"| node_engine
node_engine -->|"detects target"| node_target
node_engine -->|"sets or restores"| node_priority
node_engine -->|"locks or releases"| node_timer
node_engine -->|"activates or restores"| node_power
node_engine -->|"applies or restores"| node_registry
node_engine -->|"returns stages"| node_outcomes
node_emulatorpage -->|"detects target"| node_target
node_emulatorpage -->|"measures and cleans"| node_cache
node_emulatorpage -->|"inspects drivers"| node_drivers
node_emulatorpage -->|"injects and ejects"| node_uncap
node_uncap -->|"loads payload"| node_payload
node_uncap -->|"loads engine"| node_native
node_native -->|"shares state"| node_telemetry
node_installer -->|"uses contract"| node_telemetry
node_example -->|"uses installer"| node_installer
node_visuals -->|"exports presets"| node_user
node_diagnostics -->|"verifies binary"| node_integrity
node_diagnostics -->|"scans processes"| node_toolscan
node_settings -->|"saves settings"| node_settingsdata
node_settingsdata -->|"uses data path"| node_paths
node_services -->|"ensures directories"| node_paths
node_services -->|"records startup"| node_log

click node_shell "https://github.com/eskastacy/stellary.px/blob/main/src/Stellary.PX/ViewModels/ShellViewModel.cs"
click node_services "https://github.com/eskastacy/stellary.px/blob/main/src/Stellary.PX/AppServices.cs"
click node_overview "https://github.com/eskastacy/stellary.px/blob/main/src/Stellary.PX/ViewModels/OverviewViewModel.cs"
click node_engine "https://github.com/eskastacy/stellary.px/blob/main/src/Stellary.PX/Services/OptimizerEngine.cs"
click node_target "https://github.com/eskastacy/stellary.px/blob/main/src/Stellary.PX/Services/EmulatorService.cs"
click node_priority "https://github.com/eskastacy/stellary.px/blob/main/src/Stellary.PX/Services/PriorityService.cs"
click node_timer "https://github.com/eskastacy/stellary.px/blob/main/src/Stellary.PX/Services/TimerService.cs"
click node_power "https://github.com/eskastacy/stellary.px/blob/main/src/Stellary.PX/Services/PowerPlanService.cs"
click node_registry "https://github.com/eskastacy/stellary.px/blob/main/src/Stellary.PX/Services/RegistryTweaksService.cs"
click node_outcomes "https://github.com/eskastacy/stellary.px/blob/main/src/Stellary.PX/Core/StepResult.cs"
click node_emulatorpage "https://github.com/eskastacy/stellary.px/blob/main/src/Stellary.PX/ViewModels/EmulatorViewModel.cs"
click node_cache "https://github.com/eskastacy/stellary.px/blob/main/src/Stellary.PX/Services/CacheService.cs"
click node_drivers "https://github.com/eskastacy/stellary.px/blob/main/src/Stellary.PX/Services/DriverService.cs"
click node_uncap "https://github.com/eskastacy/stellary.px/blob/main/src/Stellary.PX/Services/UncapService.cs"
click node_payload "https://github.com/eskastacy/stellary.px/blob/main/src/Stellary.PX/Infrastructure/PayloadStore.cs"
click node_native "https://github.com/eskastacy/stellary.px/blob/main/native/UncapEngine_SDK/UncapEngine_DLL/UncapEngine.cpp"
click node_telemetry "https://github.com/eskastacy/stellary.px/blob/main/native/UncapEngine_SDK/SharedContract/UncapTelemetry.h"
click node_installer "https://github.com/eskastacy/stellary.px/blob/main/native/UncapEngine_SDK/UncapInstaller/UncapInstaller.cpp"
click node_example "https://github.com/eskastacy/stellary.px/blob/main/native/UncapEngine_SDK/Example_Main.cpp"
click node_visuals "https://github.com/eskastacy/stellary.px/blob/main/src/Stellary.PX/ViewModels/VisualsViewModel.cs"
click node_diagnostics "https://github.com/eskastacy/stellary.px/blob/main/src/Stellary.PX/ViewModels/DiagnosticsViewModel.cs"
click node_integrity "https://github.com/eskastacy/stellary.px/blob/main/src/Stellary.PX/Services/IntegrityService.cs"
click node_toolscan "https://github.com/eskastacy/stellary.px/blob/main/src/Stellary.PX/Services/ToolScanService.cs"
click node_settings "https://github.com/eskastacy/stellary.px/blob/main/src/Stellary.PX/ViewModels/SettingsViewModel.cs"
click node_settingsdata "https://github.com/eskastacy/stellary.px/blob/main/src/Stellary.PX/Services/SettingsService.cs"
click node_log "https://github.com/eskastacy/stellary.px/blob/main/src/Stellary.PX/Infrastructure/AppLog.cs"
click node_paths "https://github.com/eskastacy/stellary.px/blob/main/src/Stellary.PX/Infrastructure/Paths.cs"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_shell,node_services,node_overview,node_user toneBlue
class node_engine,node_priority,node_timer,node_power,node_registry,node_outcomes toneAmber
class node_target,node_emulatorpage,node_cache,node_drivers,node_uncap,node_payload toneMint
class node_visuals,node_diagnostics,node_integrity,node_toolscan,node_settings,node_settingsdata,node_log,node_paths toneRose
class node_native,node_telemetry,node_installer,node_example toneIndigo
```

## Components

### Application shell

- [Page navigation](https://github.com/eskastacy/stellary.px/blob/main/src/Stellary.PX/ViewModels/ShellViewModel.cs): `src/Stellary.PX/ViewModels/ShellViewModel.cs`
- [Service composition](https://github.com/eskastacy/stellary.px/blob/main/src/Stellary.PX/AppServices.cs): `src/Stellary.PX/AppServices.cs`
- [Live overview](https://github.com/eskastacy/stellary.px/blob/main/src/Stellary.PX/ViewModels/OverviewViewModel.cs): `src/Stellary.PX/ViewModels/OverviewViewModel.cs`

### Optimization workflow

- [Apply and restore](https://github.com/eskastacy/stellary.px/blob/main/src/Stellary.PX/Services/OptimizerEngine.cs): `src/Stellary.PX/Services/OptimizerEngine.cs`
- [Process priority](https://github.com/eskastacy/stellary.px/blob/main/src/Stellary.PX/Services/PriorityService.cs): `src/Stellary.PX/Services/PriorityService.cs`
- [Timer resolution](https://github.com/eskastacy/stellary.px/blob/main/src/Stellary.PX/Services/TimerService.cs): `src/Stellary.PX/Services/TimerService.cs`
- [Power plans](https://github.com/eskastacy/stellary.px/blob/main/src/Stellary.PX/Services/PowerPlanService.cs): `src/Stellary.PX/Services/PowerPlanService.cs`
- [Registry tuning](https://github.com/eskastacy/stellary.px/blob/main/src/Stellary.PX/Services/RegistryTweaksService.cs): `src/Stellary.PX/Services/RegistryTweaksService.cs`
- [Stage outcomes](https://github.com/eskastacy/stellary.px/blob/main/src/Stellary.PX/Core/StepResult.cs): `src/Stellary.PX/Core/StepResult.cs`

### Emulator controls

- [Emulator discovery](https://github.com/eskastacy/stellary.px/blob/main/src/Stellary.PX/Services/EmulatorService.cs): `src/Stellary.PX/Services/EmulatorService.cs`
- [Emulator controls](https://github.com/eskastacy/stellary.px/blob/main/src/Stellary.PX/ViewModels/EmulatorViewModel.cs): `src/Stellary.PX/ViewModels/EmulatorViewModel.cs`
- [QML cache](https://github.com/eskastacy/stellary.px/blob/main/src/Stellary.PX/Services/CacheService.cs): `src/Stellary.PX/Services/CacheService.cs`
- [Driver inspection](https://github.com/eskastacy/stellary.px/blob/main/src/Stellary.PX/Services/DriverService.cs): `src/Stellary.PX/Services/DriverService.cs`
- [Injection and telemetry](https://github.com/eskastacy/stellary.px/blob/main/src/Stellary.PX/Services/UncapService.cs): `src/Stellary.PX/Services/UncapService.cs`
- [Embedded payload](https://github.com/eskastacy/stellary.px/blob/main/src/Stellary.PX/Infrastructure/PayloadStore.cs): `src/Stellary.PX/Infrastructure/PayloadStore.cs`

### User capabilities

- [Visual presets](https://github.com/eskastacy/stellary.px/blob/main/src/Stellary.PX/ViewModels/VisualsViewModel.cs): `src/Stellary.PX/ViewModels/VisualsViewModel.cs`
- [Diagnostics](https://github.com/eskastacy/stellary.px/blob/main/src/Stellary.PX/ViewModels/DiagnosticsViewModel.cs): `src/Stellary.PX/ViewModels/DiagnosticsViewModel.cs`
- [Binary integrity](https://github.com/eskastacy/stellary.px/blob/main/src/Stellary.PX/Services/IntegrityService.cs): `src/Stellary.PX/Services/IntegrityService.cs`
- [Instrumentation scan](https://github.com/eskastacy/stellary.px/blob/main/src/Stellary.PX/Services/ToolScanService.cs): `src/Stellary.PX/Services/ToolScanService.cs`
- [User settings](https://github.com/eskastacy/stellary.px/blob/main/src/Stellary.PX/ViewModels/SettingsViewModel.cs): `src/Stellary.PX/ViewModels/SettingsViewModel.cs`
- [Settings persistence](https://github.com/eskastacy/stellary.px/blob/main/src/Stellary.PX/Services/SettingsService.cs): `src/Stellary.PX/Services/SettingsService.cs`
- [Session log](https://github.com/eskastacy/stellary.px/blob/main/src/Stellary.PX/Infrastructure/AppLog.cs): `src/Stellary.PX/Infrastructure/AppLog.cs`
- [App data paths](https://github.com/eskastacy/stellary.px/blob/main/src/Stellary.PX/Infrastructure/Paths.cs): `src/Stellary.PX/Infrastructure/Paths.cs`

### Native runtime

- [Uncap engine](https://github.com/eskastacy/stellary.px/blob/main/native/UncapEngine_SDK/UncapEngine_DLL/UncapEngine.cpp): `native/UncapEngine_SDK/UncapEngine_DLL/UncapEngine.cpp`
- [Shared telemetry contract](https://github.com/eskastacy/stellary.px/blob/main/native/UncapEngine_SDK/SharedContract/UncapTelemetry.h): `native/UncapEngine_SDK/SharedContract/UncapTelemetry.h`
- [Hook installer](https://github.com/eskastacy/stellary.px/blob/main/native/UncapEngine_SDK/UncapInstaller/UncapInstaller.cpp): `native/UncapEngine_SDK/UncapInstaller/UncapInstaller.cpp`
- [Native SDK example](https://github.com/eskastacy/stellary.px/blob/main/native/UncapEngine_SDK/Example_Main.cpp): `native/UncapEngine_SDK/Example_Main.cpp`

### Other components

- **Windows user**

## Connections

- Windows user → Page navigation: uses pages (evidence: `README.md`)
- Page navigation → Live overview: creates page (evidence: `src/Stellary.PX/ViewModels/ShellViewModel.cs`)
- Page navigation → Emulator controls: creates page (evidence: `src/Stellary.PX/ViewModels/ShellViewModel.cs`)
- Page navigation → Visual presets: creates page (evidence: `src/Stellary.PX/ViewModels/ShellViewModel.cs`)
- Page navigation → Diagnostics: creates page (evidence: `src/Stellary.PX/ViewModels/ShellViewModel.cs`)
- Page navigation → User settings: creates page (evidence: `src/Stellary.PX/ViewModels/ShellViewModel.cs`)
- Service composition → Apply and restore: constructs (evidence: `src/Stellary.PX/AppServices.cs`)
- Live overview → Apply and restore: applies or restores (evidence: `src/Stellary.PX/ViewModels/OverviewViewModel.cs`)
- Apply and restore → Emulator discovery: detects target (evidence: `src/Stellary.PX/Services/OptimizerEngine.cs`)
- Apply and restore → Process priority: sets or restores (evidence: `src/Stellary.PX/Services/OptimizerEngine.cs`)
- Apply and restore → Timer resolution: locks or releases (evidence: `src/Stellary.PX/Services/OptimizerEngine.cs`)
- Apply and restore → Power plans: activates or restores (evidence: `src/Stellary.PX/Services/OptimizerEngine.cs`)
- Apply and restore → Registry tuning: applies or restores (evidence: `src/Stellary.PX/Services/OptimizerEngine.cs`)
- Apply and restore → Stage outcomes: returns stages (evidence: `src/Stellary.PX/Services/OptimizerEngine.cs`)
- Emulator controls → Emulator discovery: detects target (evidence: `src/Stellary.PX/ViewModels/EmulatorViewModel.cs`)
- Emulator controls → QML cache: measures and cleans (evidence: `src/Stellary.PX/ViewModels/EmulatorViewModel.cs`)
- Emulator controls → Driver inspection: inspects drivers (evidence: `src/Stellary.PX/ViewModels/EmulatorViewModel.cs`)
- Emulator controls → Injection and telemetry: injects and ejects (evidence: `src/Stellary.PX/ViewModels/EmulatorViewModel.cs`)
- Injection and telemetry → Embedded payload: loads payload (evidence: `src/Stellary.PX/Services/UncapService.cs`)
- Injection and telemetry → Uncap engine: loads engine (evidence: `README.md`)
- Uncap engine → Shared telemetry contract: shares state (evidence: `native/UncapEngine_SDK/UncapEngine_DLL/UncapEngine.cpp`)
- Hook installer → Shared telemetry contract: uses contract
- Native SDK example → Hook installer: uses installer (evidence: `native/UncapEngine_SDK/Example_Main.cpp`)
- Visual presets → Windows user: exports presets (evidence: `README.md`)
- Diagnostics → Binary integrity: verifies binary (evidence: `README.md`)
- Diagnostics → Instrumentation scan: scans processes (evidence: `README.md`)
- User settings → Settings persistence: saves settings (evidence: `src/Stellary.PX/Services/SettingsService.cs`)
- Settings persistence → App data paths: uses data path (evidence: `src/Stellary.PX/Services/SettingsService.cs`)
- Service composition → App data paths: ensures directories (evidence: `src/Stellary.PX/AppServices.cs`)
- Service composition → Session log: records startup (evidence: `src/Stellary.PX/AppServices.cs`)
