MWMartin Wassim
Return to Selected Work
ARCHITECTURAL DOSSIER // 2024—2026
PROJECT 02Windows Desktop Application / Gaming Utility / Open SourceWindows Desktop Utility & Open Source

MASWITCH

Open-source Windows gaming launcher and account switcher with encrypted credential storage and memory optimization.

martinx.work/work/maswitch
MASWITCH Architectural Presentation
TIMELINE

2024 — 2026

DISCIPLINE

Systems · Desktop Engineering

ROLE

Lead Software Architect

AFFILIATION

Systemize EG · Cairo

Core Runtime • Engineering Toolchain
ElectronReactTypeScriptNode.jsSQLiteViteWindows UI Automation
01 // Operational & Technical Friction

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.

02 // The Architected Solution

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.

03 // Production Implementation & Workflow

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.

Engineering Depth

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.

04 // Architectural Flow & State MachineBespoke Pipeline
DESKTOP PIPELINE

MASWITCH // DESKTOP SYSTEM ARCHITECTURE & WINDOWS AUTOMATION

ELECTRON 33 • WINDOWS DPAPI • SECURE VAULT
Core Innovation
STAGE 01 // DPAPI VAULT

Hardware-Bound Credential Encryption

Credentials encrypted via Windows Data Protection API (CryptProtectData) locked to the local OS user profile, preventing portable exfiltration.

NODE 01VERIFIED
STAGE 02 // UI AUTOMATION

Native Riot Client Automation

Windows UI Automation detects the official Riot Client window, synchronizes focus, and inputs credentials without touching clipboard or modifying binaries.

NODE 02ONLINE
STAGE 03 // MANIFEST ENGINE

Multi-Platform Library Discovery

Inspects Steam appmanifests, Epic Games manifests, and Windows Registry keys to index installed games and route launcher URI protocols.

NODE 03ONLINE
STAGE 04 // MEMORY REDUCT

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.

NODE 04ONLINE

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).

Architectural Highlight

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).

05 // Key Engineering Decisions
Non-invasive UI automation over memory injection: Interacts with the Riot Client strictly via official Windows UI Automation elements, guaranteeing game binaries and anti-cheat (Vanguard) remain completely untouched.
Hardware-bound DPAPI encryption: Credential encryption keys are derived through Windows CryptProtectData tied to the OS user account, ensuring saved tokens cannot be decrypted if copied to another machine.
Zero clipboard touching: Credentials are fed directly to UI input targets via automated keystroke events rather than clipboard copy-paste, preventing clipboard hijacking attacks.
Mem Reduct NT memory management: Implemented safe Windows working set trimming (EmptyWorkingSet / NtSetSystemInformation) that automatically disengages while active games are running to avoid micro-stutters.
Modular installer presets: Configured NSIS packaging allowing low-end PC users to install only core launcher features without heavy telemetry or optional background modules.
06 // Challenges & Mitigations
Detecting asynchronous Riot Client window states and login transitions reliably across varying PC hardware performance without timing races.
Normalizing disparate game metadata, install directories, and launch URI protocols across Steam, Epic Games, GOG, and custom executables.
Handling Windows power management events (Sleep, Hibernate, Resume) cleanly so playtime tracking resumes without corrupted or negative session intervals.
07 // Verified Capabilities

Core System Features

Riot Games Account Switching: Automated login workflows for League of Legends, VALORANT, and Teamfight Tactics
Secure Credential Storage: Machine-bound local encryption powered by Windows DPAPI (CryptProtectData)
Unified Game Library: Discovers and organizes installed games across Steam, Epic Games, Riot, EA, and GOG
Automatic Game Detection: Scans local manifests and Windows registry entries for installed titles
Accurate Playtime Tracking: Real-time process lifecycle monitoring with automatic utility exclusions
Hardware Memory Management: Working set and system cache optimization inspired by Mem Reduct
Game Information & Artwork: Automated metadata caching and custom cover art management
Secure Updates: Cryptographically signed update manifests with Ed25519 signature verification
Modular Setup Presets: Tailored installation footprints (Minimal, Recommended, Complete) for budget PCs
Open Source Codebase: Modular architecture with strong IPC typing open for community contribution