# mrskelee/quantumplay architecture

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

- Interactive diagram: https://gitdiagram.com/mrskelee/quantumplay
- Repository: https://github.com/mrskelee/quantumplay

## Overview

QuantumPlay is an Electron desktop game launcher. Users complete onboarding, scan supported launchers or add games manually, organize and browse a library, then launch games and review play statistics; settings cover themes, language, library and system behavior. The graph preserves documented scanning integrations and product features, but several are represented at their existing directory level because their implementation excerpts were not provided. Edges are limited to relationships visible in excerpts or stated in the README.

Main entry points: [`src/App.tsx`](https://github.com/mrskelee/quantumplay/blob/main/src/App.tsx) (Application shell), [`src/contexts/AppProvider.tsx`](https://github.com/mrskelee/quantumplay/blob/main/src/contexts/AppProvider.tsx) (App state & preferences), [`electron/main.ts`](https://github.com/mrskelee/quantumplay/blob/main/electron/main.ts) (Electron main process), [`src/pages/Settings.tsx`](https://github.com/mrskelee/quantumplay/blob/main/src/pages/Settings.tsx) (Settings screen)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_desktop["Desktop Runtime"]
  node_provider["App state &amp; preferences<br/>[AppProvider.tsx]"]
  node_database[("JSON game database<br/>[db.ts]")]
  node_mainproc["Electron main process<br/>[main.ts]"]
  node_bridge["Renderer IPC bridge<br/>[preload.ts]"]
end

subgraph group_library["Game Library"]
  node_librarypage["Game library view<br/>[Library.tsx]"]
  node_detail["Game details<br/>[GameDetail.tsx]"]
  node_add["Manual game entry<br/>[AddGame.tsx]"]
  node_editmodal["Game editor<br/>[EditGameModal.tsx]"]
  node_contextmenu["Library context menu<br/>[ContextMenu.tsx]"]
  node_scanner["Installed-game scanner<br/>[scanner.ts]"]
end

subgraph group_experience["Launcher Interface"]
  node_app["Application shell<br/>[App.tsx]"]
  node_welcome["Welcome onboarding<br/>[WelcomeScreen.tsx]"]
  node_sidebar["Sidebar &amp; categories<br/>[Sidebar.tsx]"]
  node_modal["Shared modal UI<br/>[BaseModal.tsx]"]
end

subgraph group_preferences["Settings &amp; Personalization"]
  node_settings["Settings screen<br/>[Settings.tsx]"]
  node_translations["Translations<br/>[i18n.ts]"]
end

node_user(("Player"))
node_external_launchers["Installed launchers"]
node_game_process["Game process"]
node_os["Desktop OS"]
node_themes["Theme presets"]

node_user -->|"starts onboarding"| node_welcome
node_app -->|"shows first"| node_welcome
node_app -->|"renders"| node_sidebar
node_app -->|"routes to"| node_librarypage
node_app -->|"routes to"| node_detail
node_app -->|"routes to"| node_settings
node_app -->|"routes to"| node_add
node_app -->|"wraps UI"| node_provider
node_app -->|"requests startup scan"| node_scanner
node_app -->|"refreshes games"| node_provider
node_provider -->|"uses translations"| node_translations
node_provider -->|"loads settings and games"| node_bridge
node_sidebar -->|"reads game state"| node_provider
node_librarypage -->|"reads library state"| node_provider
node_librarypage -->|"renders"| node_contextmenu
node_detail -->|"reads and updates games"| node_provider
node_detail -->|"opens editor"| node_editmodal
node_add -->|"uses app state"| node_provider
node_editmodal -->|"uses app state"| node_provider
node_settings -->|"updates preferences"| node_provider
node_settings -->|"uses shared modal"| node_modal
node_bridge -.->|"forwards IPC"| node_mainproc
node_mainproc -->|"invokes scan"| node_scanner
node_mainproc -->|"reads and writes games"| node_database
node_mainproc -->|"launches and monitors"| node_game_process
node_mainproc -.->|"controls tray and window"| node_os
node_scanner -.->|"detects installations"| node_external_launchers
node_user -->|"adds custom games"| node_add
node_user -->|"organizes library"| node_librarypage
node_settings -->|"chooses or customizes"| node_themes
node_user -->|"launches or ends game"| node_detail
node_database -.->|"persists theme settings"| node_settings

click node_app "https://github.com/mrskelee/quantumplay/blob/main/src/App.tsx"
click node_welcome "https://github.com/mrskelee/quantumplay/blob/main/src/components/WelcomeScreen.tsx"
click node_sidebar "https://github.com/mrskelee/quantumplay/blob/main/src/components/Sidebar.tsx"
click node_librarypage "https://github.com/mrskelee/quantumplay/blob/main/src/pages/Library.tsx"
click node_detail "https://github.com/mrskelee/quantumplay/blob/main/src/pages/GameDetail.tsx"
click node_add "https://github.com/mrskelee/quantumplay/blob/main/src/pages/AddGame.tsx"
click node_editmodal "https://github.com/mrskelee/quantumplay/blob/main/src/components/EditGameModal.tsx"
click node_contextmenu "https://github.com/mrskelee/quantumplay/blob/main/src/components/ContextMenu.tsx"
click node_provider "https://github.com/mrskelee/quantumplay/blob/main/src/contexts/AppProvider.tsx"
click node_database "https://github.com/mrskelee/quantumplay/blob/main/electron/db.ts"
click node_mainproc "https://github.com/mrskelee/quantumplay/blob/main/electron/main.ts"
click node_bridge "https://github.com/mrskelee/quantumplay/blob/main/electron/preload.ts"
click node_scanner "https://github.com/mrskelee/quantumplay/blob/main/electron/scanner.ts"
click node_settings "https://github.com/mrskelee/quantumplay/blob/main/src/pages/Settings.tsx"
click node_translations "https://github.com/mrskelee/quantumplay/blob/main/src/i18n.ts"
click node_modal "https://github.com/mrskelee/quantumplay/blob/main/src/components/BaseModal.tsx"

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_provider,node_database,node_mainproc,node_bridge toneBlue
class node_librarypage,node_detail,node_add,node_editmodal,node_contextmenu,node_scanner toneAmber
class node_app,node_welcome,node_sidebar,node_modal toneMint
class node_settings,node_translations toneRose
class node_user,node_external_launchers,node_game_process,node_os,node_themes toneIndigo
```

## Components

### Desktop Runtime

- [App state & preferences](https://github.com/mrskelee/quantumplay/blob/main/src/contexts/AppProvider.tsx): `src/contexts/AppProvider.tsx`
- [JSON game database](https://github.com/mrskelee/quantumplay/blob/main/electron/db.ts): `electron/db.ts`
- [Electron main process](https://github.com/mrskelee/quantumplay/blob/main/electron/main.ts): `electron/main.ts`
- [Renderer IPC bridge](https://github.com/mrskelee/quantumplay/blob/main/electron/preload.ts): `electron/preload.ts`

### Game Library

- [Game library view](https://github.com/mrskelee/quantumplay/blob/main/src/pages/Library.tsx): `src/pages/Library.tsx`
- [Game details](https://github.com/mrskelee/quantumplay/blob/main/src/pages/GameDetail.tsx): `src/pages/GameDetail.tsx`
- [Manual game entry](https://github.com/mrskelee/quantumplay/blob/main/src/pages/AddGame.tsx): `src/pages/AddGame.tsx`
- [Game editor](https://github.com/mrskelee/quantumplay/blob/main/src/components/EditGameModal.tsx): `src/components/EditGameModal.tsx`
- [Library context menu](https://github.com/mrskelee/quantumplay/blob/main/src/components/ContextMenu.tsx): `src/components/ContextMenu.tsx`
- [Installed-game scanner](https://github.com/mrskelee/quantumplay/blob/main/electron/scanner.ts): `electron/scanner.ts`

### Launcher Interface

- [Application shell](https://github.com/mrskelee/quantumplay/blob/main/src/App.tsx): `src/App.tsx`
- [Welcome onboarding](https://github.com/mrskelee/quantumplay/blob/main/src/components/WelcomeScreen.tsx): `src/components/WelcomeScreen.tsx`
- [Sidebar & categories](https://github.com/mrskelee/quantumplay/blob/main/src/components/Sidebar.tsx): `src/components/Sidebar.tsx`
- [Shared modal UI](https://github.com/mrskelee/quantumplay/blob/main/src/components/BaseModal.tsx): `src/components/BaseModal.tsx`

### Settings & Personalization

- [Settings screen](https://github.com/mrskelee/quantumplay/blob/main/src/pages/Settings.tsx): `src/pages/Settings.tsx`
- [Translations](https://github.com/mrskelee/quantumplay/blob/main/src/i18n.ts): `src/i18n.ts`

### Other components

- **Player**
- **Installed launchers**
- **Game process**
- **Desktop OS**
- **Theme presets**

## Connections

- Player → Welcome onboarding: starts onboarding
- Application shell → Welcome onboarding: shows first (evidence: `src/App.tsx`)
- Application shell → Sidebar & categories: renders (evidence: `src/App.tsx`)
- Application shell → Game library view: routes to (evidence: `src/App.tsx`)
- Application shell → Game details: routes to (evidence: `src/App.tsx`)
- Application shell → Settings screen: routes to (evidence: `src/App.tsx`)
- Application shell → Manual game entry: routes to (evidence: `src/App.tsx`)
- Application shell → App state & preferences: wraps UI (evidence: `src/App.tsx`)
- Application shell → Installed-game scanner: requests startup scan (evidence: `src/App.tsx`)
- Application shell → App state & preferences: refreshes games (evidence: `src/App.tsx`)
- App state & preferences → Translations: uses translations (evidence: `src/contexts/AppProvider.tsx`)
- App state & preferences → Renderer IPC bridge: loads settings and games (evidence: `src/contexts/AppProvider.tsx`)
- Sidebar & categories → App state & preferences: reads game state (evidence: `src/components/Sidebar.tsx`)
- Game library view → App state & preferences: reads library state (evidence: `src/pages/Library.tsx`)
- Game library view → Library context menu: renders (evidence: `src/pages/Library.tsx`)
- Game details → App state & preferences: reads and updates games (evidence: `src/pages/GameDetail.tsx`)
- Game details → Game editor: opens editor (evidence: `src/pages/GameDetail.tsx`)
- Manual game entry → App state & preferences: uses app state (evidence: `src/pages/AddGame.tsx`)
- Game editor → App state & preferences: uses app state (evidence: `src/components/EditGameModal.tsx`)
- Settings screen → App state & preferences: updates preferences (evidence: `src/pages/Settings.tsx`)
- Settings screen → Shared modal UI: uses shared modal
- Renderer IPC bridge → Electron main process: forwards IPC
- Electron main process → Installed-game scanner: invokes scan (evidence: `electron/main.ts`)
- Electron main process → JSON game database: reads and writes games (evidence: `electron/main.ts`)
- Electron main process → Game process: launches and monitors (evidence: `electron/main.ts`)
- Electron main process → Desktop OS: controls tray and window
- Installed-game scanner → Installed launchers: detects installations (evidence: `README.md`)
- Player → Manual game entry: adds custom games (evidence: `README.md`)
- Player → Game library view: organizes library (evidence: `README.md`)
- Settings screen → Theme presets: chooses or customizes (evidence: `README.md`)
- Player → Game details: launches or ends game (evidence: `README.md`)
- JSON game database → Settings screen: persists theme settings (evidence: `README.md`)
