How mmvanheusden/steamdepotdownloadergui works
Project type + purpose (what you’re diagramming)
This is a cross-platform desktop GUI built with Tauri:
• Frontend: Preact + Vite + TypeScript (src/)
• Backend (native side): Rust Tauri runtime (src-tauri/src/)
• Purpose: a graphical wrapper around DepotDownloader to download specific/older Steam depots (i.e., older game versions). Practically, it orchestrates:
• collecting user inputs (appId/depotId/manifestId, output dir, credentials/options),
• executing a download workflow via a Rust layer (likely spawning/controlling DepotDownloader and/or implementing some Steam interactions),
• streaming progress/log output back to the UI,
• optional clipboard parsing + settings persistence.
So your “system” is not a client/server web app; it’s a desktop app with an embedded web UI plus a native orchestrator that interacts with Steam/DepotDownloader and the local filesystem/terminal.
Frontend boundary (WebView UI)
Key files:
• src/main.tsx, src/App.tsx: app bootstrap + root composition
• src/components/*:
• DownloaderForm.tsx: user inputs / form submission (core command parameters)
• DownloaderOutput.tsx: log/progress display (streaming output)
• ClipboardParser.tsx: interprets clipboard text into structured inputs
• Settings.tsx: configuration UX (paths, defaults, maybe auth mode)
• FormInput.tsx: shared input component
• src/context.ts: global state (settings, download job state, logs, etc.)
• src/css/App.css, src/assets/*
This strongly suggests a UI that:
Backend boundary (Rust / Tauri commands)
Key files:
• src-tauri/src/main.rs: Tauri entrypoint; registers commands, sets up app lifecycle
• src-tauri/src/depotdownloader.rs: likely “run DepotDownloader” orchestration (spawn process, parse output)
• src-tauri/src/steam.rs: Steam-specific logic (auth/session, app/depot metadata, guard/2FA, etc.—whatever the tool needs)
• src-tauri/src/terminal.rs: process spawning, stdout/stderr streaming, kill/cancel, platform-specific shell handling
• src-tauri/tauri.conf.json: Tauri config (windows, permissions/capabilities, bundling)
• src-tauri/capabilities/default.json: permission model (what APIs the UI can invoke)
This indicates the Rust side is the “application service layer” and “system integration layer”.
External dependencies / systems
From README + likely runtime behavior:
• DepotDownloader (external tool / binary or packaged dependency)
• Steam network (Steam services for depot content/auth)
• Local OS: filesystem writes, process management, keychain/credential storage (if implemented), clipboard access (via frontend or Tauri plugin), network.
Build + release pipeline boundary
• package.json, pnpm-lock.yaml, vite.config.ts: frontend build
• src-tauri/Cargo.toml, Cargo.lock, build.rs: Rust build
• .github/workflows/build_debug.yml, build_release.yml: CI packaging/signing across OSes
Tauri Desktop App
• Preact UI (WebView)
• Rust Core (Tauri commands)
Local Filesystem (Download directory + config)
• User → Preact UI (inputs, start/cancel)
• Preact UI ↔ Rust Core (Tauri IPC invoke/events)
• Rust Core → DepotDownloader (spawn process, args)
• DepotDownloader ↔ Steam Services (auth, manifests, download content)
• DepotDownloader → Local Filesystem (writes game files)
• Rust Core → Preact UI (stream logs/progress events)
Split into two big columns: Frontend and Rust backend.
Frontend (Preact)
• DownloaderForm → invokes command startDownload(...)
• Settings → reads/writes settings (via Tauri store/fs command)
• ClipboardParser → transforms clipboard text → form state
• DownloaderOutput → subscribes to progress/log events (Tauri event listener)
• context.ts → shared state/store
Rust (Tauri)
• main.rs → command registration + event emitter
• depotdownloader.rs → constructs command line, manages job state, parses output
• terminal.rs → spawn/kill process, stream stdout/stderr
• steam.rs → any Steam-specific helpers (credentials, manifest retrieval, etc.)
• DownloaderForm → Rust depotdownloader (start)
• DownloaderOutput ← Rust events from terminal output parser
• Settings ↔ Rust persistence (if exists; otherwise show as “Local config”)
• ClipboardParser → DownloaderForm (state update)
• Rust depotdownloader → terminal (process execution)
• Rust depotdownloader/steam → network/steam (if direct calls exist; otherwise show Steam only under DepotDownloader)
Process completes → Rust emits completion (success/failure) → UI updates state
Also include:
• Cancel: UI → Rust → kill process
• Settings: UI ↔ local persistence (file/tauri store)
Architectural patterns/design principles visible here
• Hybrid desktop architecture: Web UI + native orchestrator (Tauri)
• Thin UI, thick integration layer: UI collects/visualizes; Rust performs privileged OS operations
• Event-driven progress reporting: streaming logs from a subprocess to UI via Tauri events
• External-tool wrapper: DepotDownloader is not a library here (most likely); it’s an external executable/process boundary. Treat it as its own component.
• UI: “Preact + TS + Vite (WebView)”
• Bridge: “Tauri IPC (invoke/emit)”
• Core: “Rust (Tauri commands)”
• Process execution: “Spawn subprocess / stdout-stderr streaming”
• External: “DepotDownloader (SteamRE)”
• Network: “Steam CDN / Steam APIs”
• Storage: “Local filesystem (download dir), local app config”