# wurielle/auto-lossless-scaling architecture

> Architecture diagram of the GitHub repository wurielle/auto-lossless-scaling, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-05). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/wurielle/auto-lossless-scaling
- Repository: https://github.com/wurielle/auto-lossless-scaling

## Overview

Auto Lossless Scaling is a Windows desktop app that remembers per-game scaling preferences and automates Lossless Scaling (LS), optionally alongside RivaTuner. Users launch Auto LS, opt a running game in with a shortcut, then future launches are detected and scaled after a delay. The graph separates the Electron runtime, process-to-scaling workflow, external scaling integrations, and settings UI. README statements establish several product behaviors; some internal links to the renderer and process-watcher implementation are not shown in sampled source, so those links are omitted or marked unverified.

Main entry points: [`apps/app/electron/app.ts`](https://github.com/wurielle/auto-lossless-scaling/blob/dev/apps/app/electron/app.ts) (Electron App), [`apps/app/electron/auto-lossless-scaling.ts`](https://github.com/wurielle/auto-lossless-scaling/blob/dev/apps/app/electron/auto-lossless-scaling.ts) (Auto-Scaling Control), [`apps/app/electron/automations/index.ts`](https://github.com/wurielle/auto-lossless-scaling/blob/dev/apps/app/electron/automations/index.ts) (Automation Manager), [`apps/app/electron/store.ts`](https://github.com/wurielle/auto-lossless-scaling/blob/dev/apps/app/electron/store.ts) (Settings Store)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Desktop Runtime"]
  node_electron["Electron App<br/>[app.ts]"]
  node_runtime_entry["Runtime Entry<br/>[main.ts]"]
  node_store[("Settings Store<br/>[store.ts]")]
  node_events["Event Emitter<br/>[events.ts]"]
  node_native_utils["Windows Utilities<br/>[native.ts]"]
  node_filesystem["File Utilities<br/>[filesystem.ts]"]
end

subgraph group_workflow["Game Workflow"]
  node_process_watch["Process Watcher"]
  node_process_native["Process Detection<br/>[index.js]"]
  node_game_library["Game Profiles<br/>[game-library.ts]"]
  node_scaling_flow["Auto-Scaling Control"]
end

subgraph group_integrations["Scaling Integrations"]
  node_automation_manager["Automation Manager<br/>[index.ts]"]
  node_ls_automation["LS Automation"]
  node_opti_automation["Opti-Scaler<br/>[opti-scaler.ts]"]
  node_riva_automation["RivaTuner Automation<br/>[riva-tuner.ts]"]
end

subgraph group_settings["Settings UI"]
  node_ui_entry["Renderer Entry<br/>[main.tsx]"]
  node_app_shell["App Shell<br/>[app.tsx]"]
  node_home["Home Settings<br/>[index.tsx]"]
  node_default_shell["Settings Shell<br/>[default-shell.tsx]"]
  node_process_card["Process Cards<br/>[process-card.tsx]"]
end

node_user(("User"))
node_game["Game Process"]
node_ls["Lossless Scaling"]
node_riva["RivaTuner"]

node_user -.->|"starts"| node_electron
node_runtime_entry -->|"loads"| node_electron
node_electron -->|"reads and updates"| node_store
node_electron -->|"handles events"| node_process_watch
node_process_watch -.->|"detects launches"| node_game
node_electron -->|"opts in or out"| node_scaling_flow
node_electron -->|"scales detected game"| node_scaling_flow
node_electron -->|"updates profile"| node_store
node_scaling_flow -->|"uses settings"| node_store
node_scaling_flow -->|"uses automations"| node_automation_manager
node_automation_manager -->|"registers"| node_ls_automation
node_automation_manager -->|"registers"| node_riva_automation
node_automation_manager -->|"loads"| node_opti_automation
node_ls_automation -->|"launches and scales"| node_ls
node_riva_automation -->|"launches"| node_riva
node_user -->|"launches"| node_game
node_user -->|"opts in by shortcut"| node_electron
node_electron -->|"gets active process"| node_native_utils
node_electron -->|"subscribes"| node_events
node_electron -->|"reads icon path"| node_filesystem
node_ui_entry -->|"renders"| node_app_shell
node_app_shell -->|"renders"| node_home
node_home -.->|"uses"| node_default_shell
node_default_shell -.->|"updates settings"| node_store
node_home -.->|"displays profiles"| node_process_card
node_process_watch -.->|"detects processes"| node_process_native
node_scaling_flow -->|"uses profiles"| node_game_library
node_electron -->|"notifies renderer"| node_events

click node_electron "https://github.com/wurielle/auto-lossless-scaling/blob/dev/apps/app/electron/app.ts"
click node_runtime_entry "https://github.com/wurielle/auto-lossless-scaling/blob/dev/apps/app/electron/main.ts"
click node_store "https://github.com/wurielle/auto-lossless-scaling/blob/dev/apps/app/electron/store.ts"
click node_events "https://github.com/wurielle/auto-lossless-scaling/blob/dev/apps/app/electron/events.ts"
click node_process_watch "https://github.com/wurielle/auto-lossless-scaling/blob/dev/apps/app/electron/process-watcher-instance.ts"
click node_process_native "https://github.com/wurielle/auto-lossless-scaling/blob/dev/packages/process-watcher/index.js"
click node_game_library "https://github.com/wurielle/auto-lossless-scaling/blob/dev/apps/app/electron/game-library.ts"
click node_scaling_flow "https://github.com/wurielle/auto-lossless-scaling/blob/dev/apps/app/electron/auto-lossless-scaling.ts"
click node_automation_manager "https://github.com/wurielle/auto-lossless-scaling/blob/dev/apps/app/electron/automations/index.ts"
click node_ls_automation "https://github.com/wurielle/auto-lossless-scaling/blob/dev/apps/app/electron/automations/lossless-scaling.ts"
click node_opti_automation "https://github.com/wurielle/auto-lossless-scaling/blob/dev/apps/app/electron/automations/opti-scaler.ts"
click node_riva_automation "https://github.com/wurielle/auto-lossless-scaling/blob/dev/apps/app/electron/automations/riva-tuner.ts"
click node_ui_entry "https://github.com/wurielle/auto-lossless-scaling/blob/dev/apps/app/src/main.tsx"
click node_app_shell "https://github.com/wurielle/auto-lossless-scaling/blob/dev/apps/app/src/app.tsx"
click node_home "https://github.com/wurielle/auto-lossless-scaling/blob/dev/apps/app/src/teams/home/views/index.tsx"
click node_default_shell "https://github.com/wurielle/auto-lossless-scaling/blob/dev/apps/app/src/components/shells/default-shell.tsx"
click node_process_card "https://github.com/wurielle/auto-lossless-scaling/blob/dev/apps/app/src/components/cards/process-card.tsx"
click node_native_utils "https://github.com/wurielle/auto-lossless-scaling/blob/dev/apps/app/electron/utils/native.ts"
click node_filesystem "https://github.com/wurielle/auto-lossless-scaling/blob/dev/apps/app/electron/utils/filesystem.ts"

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_electron,node_runtime_entry,node_store,node_events,node_native_utils,node_filesystem,node_user toneBlue
class node_process_watch,node_process_native,node_game_library,node_scaling_flow toneAmber
class node_automation_manager,node_ls_automation,node_opti_automation,node_riva_automation toneMint
class node_ui_entry,node_app_shell,node_home,node_default_shell,node_process_card toneRose
class node_game,node_ls,node_riva toneIndigo
```

## Components

### Desktop Runtime

- [Electron App](https://github.com/wurielle/auto-lossless-scaling/blob/dev/apps/app/electron/app.ts): `apps/app/electron/app.ts`
- [Runtime Entry](https://github.com/wurielle/auto-lossless-scaling/blob/dev/apps/app/electron/main.ts): `apps/app/electron/main.ts`
- [Settings Store](https://github.com/wurielle/auto-lossless-scaling/blob/dev/apps/app/electron/store.ts): `apps/app/electron/store.ts`
- [Event Emitter](https://github.com/wurielle/auto-lossless-scaling/blob/dev/apps/app/electron/events.ts): `apps/app/electron/events.ts`
- [Windows Utilities](https://github.com/wurielle/auto-lossless-scaling/blob/dev/apps/app/electron/utils/native.ts): `apps/app/electron/utils/native.ts`
- [File Utilities](https://github.com/wurielle/auto-lossless-scaling/blob/dev/apps/app/electron/utils/filesystem.ts): `apps/app/electron/utils/filesystem.ts`

### Game Workflow

- [Process Watcher](https://github.com/wurielle/auto-lossless-scaling/blob/dev/apps/app/electron/process-watcher-instance.ts): `apps/app/electron/process-watcher-instance.ts`
- [Process Detection](https://github.com/wurielle/auto-lossless-scaling/blob/dev/packages/process-watcher/index.js): `packages/process-watcher/index.js`
- [Game Profiles](https://github.com/wurielle/auto-lossless-scaling/blob/dev/apps/app/electron/game-library.ts): `apps/app/electron/game-library.ts`
- [Auto-Scaling Control](https://github.com/wurielle/auto-lossless-scaling/blob/dev/apps/app/electron/auto-lossless-scaling.ts): `apps/app/electron/auto-lossless-scaling.ts`

### Scaling Integrations

- [Automation Manager](https://github.com/wurielle/auto-lossless-scaling/blob/dev/apps/app/electron/automations/index.ts): `apps/app/electron/automations/index.ts`
- [LS Automation](https://github.com/wurielle/auto-lossless-scaling/blob/dev/apps/app/electron/automations/lossless-scaling.ts): `apps/app/electron/automations/lossless-scaling.ts`
- [Opti-Scaler](https://github.com/wurielle/auto-lossless-scaling/blob/dev/apps/app/electron/automations/opti-scaler.ts): `apps/app/electron/automations/opti-scaler.ts`
- [RivaTuner Automation](https://github.com/wurielle/auto-lossless-scaling/blob/dev/apps/app/electron/automations/riva-tuner.ts): `apps/app/electron/automations/riva-tuner.ts`

### Settings UI

- [Renderer Entry](https://github.com/wurielle/auto-lossless-scaling/blob/dev/apps/app/src/main.tsx): `apps/app/src/main.tsx`
- [App Shell](https://github.com/wurielle/auto-lossless-scaling/blob/dev/apps/app/src/app.tsx): `apps/app/src/app.tsx`
- [Home Settings](https://github.com/wurielle/auto-lossless-scaling/blob/dev/apps/app/src/teams/home/views/index.tsx): `apps/app/src/teams/home/views/index.tsx`
- [Settings Shell](https://github.com/wurielle/auto-lossless-scaling/blob/dev/apps/app/src/components/shells/default-shell.tsx): `apps/app/src/components/shells/default-shell.tsx`
- [Process Cards](https://github.com/wurielle/auto-lossless-scaling/blob/dev/apps/app/src/components/cards/process-card.tsx): `apps/app/src/components/cards/process-card.tsx`

### Other components

- **User**
- **Game Process**
- **Lossless Scaling**
- **RivaTuner**

## Connections

- User → Electron App: starts
- Runtime Entry → Electron App: loads (evidence: `apps/app/electron/main.ts`)
- Electron App → Settings Store: reads and updates (evidence: `apps/app/electron/app.ts`)
- Electron App → Process Watcher: handles events (evidence: `apps/app/electron/app.ts`)
- Process Watcher → Game Process: detects launches
- Electron App → Auto-Scaling Control: opts in or out (evidence: `apps/app/electron/app.ts`)
- Electron App → Auto-Scaling Control: scales detected game (evidence: `apps/app/electron/app.ts`)
- Electron App → Settings Store: updates profile (evidence: `apps/app/electron/app.ts`)
- Auto-Scaling Control → Settings Store: uses settings (evidence: `apps/app/electron/auto-lossless-scaling.ts`)
- Auto-Scaling Control → Automation Manager: uses automations (evidence: `apps/app/electron/auto-lossless-scaling.ts`)
- Automation Manager → LS Automation: registers (evidence: `apps/app/electron/automations/index.ts`)
- Automation Manager → RivaTuner Automation: registers (evidence: `apps/app/electron/automations/index.ts`)
- Automation Manager → Opti-Scaler: loads (evidence: `apps/app/electron/automations/index.ts`)
- LS Automation → Lossless Scaling: launches and scales
- RivaTuner Automation → RivaTuner: launches
- User → Game Process: launches
- User → Electron App: opts in by shortcut
- Electron App → Windows Utilities: gets active process (evidence: `apps/app/electron/app.ts`)
- Electron App → Event Emitter: subscribes (evidence: `apps/app/electron/app.ts`)
- Electron App → File Utilities: reads icon path (evidence: `apps/app/electron/app.ts`)
- Renderer Entry → App Shell: renders (evidence: `apps/app/src/main.tsx`)
- App Shell → Home Settings: renders (evidence: `apps/app/src/app.tsx`)
- Home Settings → Settings Shell: uses
- Settings Shell → Settings Store: updates settings
- Home Settings → Process Cards: displays profiles
- Process Watcher → Process Detection: detects processes
- Auto-Scaling Control → Game Profiles: uses profiles (evidence: `apps/app/electron/auto-lossless-scaling.ts`)
- Electron App → Event Emitter: notifies renderer (evidence: `apps/app/electron/app.ts`)
