MASWITCH
Open-source Windows gaming launcher and account switcher with encrypted credential storage and memory optimization.
The Problem Space
PC gamers managing multiple competitive accounts frequently endure repetitive login cycles, manual two-factor friction, and fragmented launchers across Steam, Epic Games, and Riot Games. Additionally, background game clients and launchers consume significant RAM, leading gamers on budget or mid-tier hardware to run separate, unvetted third-party memory cleaners.
Systemized Implementation
Engineered MaSwitch from scratch as a modular, privacy-conscious Windows desktop utility. It automates Riot Games account transitions using native Windows UI Automation and DPAPI-encrypted credential storage, integrates installed library detection across major PC platforms, tracks playtime without background overhead, and safely clears unneeded system memory working sets.
How It Operates in Production
Built with Electron 33, React 18, Vite, and TypeScript. Uses Electron's native safeStorage (Windows DPAPI CryptProtectData) to encrypt stored account credentials bound strictly to the current Windows user profile. Interacts with the official Riot Client via native Windows UI Automation (UI Automation API / PowerShell Automation Elements) to focus windows and input credentials without injecting dlls, modifying binaries, or touching the Windows clipboard. Implemented local SQLite for metadata and playtime session persistence, and integrated low-level Windows NT memory management APIs to trim working sets safely.
Architected clean multi-process IPC between Electron main and renderer processes using strongly typed context bridges. Designed an automated game discovery engine that inspects Steam appmanifest_*.acf files, Epic Games *.item manifests, and Windows Registry uninstall keys. Implemented non-invasive process tracking with sleep/wake event listeners and utility exclusion filters (e.g. Wallpaper Engine) to prevent inflated playtime metrics.
MASWITCH // DESKTOP SYSTEM ARCHITECTURE & WINDOWS AUTOMATION
Hardware-Bound Credential Encryption
Credentials encrypted via Windows Data Protection API (CryptProtectData) locked to the local OS user profile, preventing portable exfiltration.
Native Riot Client Automation
Windows UI Automation detects the official Riot Client window, synchronizes focus, and inputs credentials without touching clipboard or modifying binaries.
Multi-Platform Library Discovery
Inspects Steam appmanifests, Epic Games manifests, and Windows Registry keys to index installed games and route launcher URI protocols.
Windows NT Working Set Optimization
Invokes low-level Windows memory management APIs to trim unneeded working sets and system file cache, automatically locking during active gameplay.
Data Flow & Infrastructure
The architecture comprises an Electron Main process managing OS-level integrations and an isolated React/Vite Renderer UI connected via context isolation. The Main process orchestrates four core subsystems: the Credential Vault (Windows DPAPI / SQLite), the UI Automation Worker (communicating with the Riot Client window), the Library Scanner (parsing registry and game manifests), and the Memory Management Engine (invoking safe Windows NT working set trims).
Automates Riot Games account switching via native Windows UI Automation without injecting code or modifying game binaries, securing credentials with Windows Data Protection API (DPAPI).
Core System Features

Riot Games Account Switching & Profile Matrix
Multi-account organization for League of Legends, VALORANT, and TFT with DPAPI-encrypted credentials and automated login.

Unified Game Library & Custom Artwork Details
Consolidated multi-platform game catalog with SteamGridDB integration, local caching, and direct launcher protocol routing.

Hardware Memory Reducer & RAM Optimization
Windows NT memory list cleaner inspired by Mem Reduct, safely trimming working sets and system cache.

Real-Time Hardware Telemetry & Footprint Monitor
On-demand CPU, system RAM, and application memory telemetry with zero background polling overhead.

Automatic Multi-Platform Installed Game Detection
Manifest and registry scanning detecting Steam, Epic Games, Riot, EA, GOG, and custom PC installations.

Accurate Playtime Tracking & Year in Review
Process lifecycle tracking with utility exclusions (e.g. Wallpaper Engine) and annual gaming summary.

Multi-Platform Game News & Patch Notes
Aggregated patch notes and developer updates for installed games with offline caching.

Platform Expansion Roadmap & Multi-Account Architecture
Interface demonstrating upcoming platform account integrations planned for subsequent releases.