Repository navigation
Architecture Overview
This page is a developer orientation to Updainium's structure. It covers the three layers, the main modules in each, and how they talk to each other. For setup, build commands, and supported platforms, see Architecture and Compatibility.
Updainium is a Tauri 2 desktop app with two halves:
-
Native shell (Rust,
src-tauri/): the window, tray, single-instance handling, deep links, autostart, process control, the OS credential store, backup file I/O, and downloads. -
Frontend (SvelteKit,
src/): the UI running inside the system WebView, plus the update engine that decides what to check, download, and open.
The frontend is built as a static single-page app with @sveltejs/adapter-static. Tauri loads that build (frontendDist points to ../build). In development, npm run dev serves it on port 1420.
flowchart LR
UI["SvelteKit UI<br/>src/routes"] --> Engine["Update engine<br/>src/lib"]
Engine -- "fetch: release metadata" --> Forges["Forge REST APIs"]
Engine -- "invoke: download, hash, process, credentials" --> Rust["Tauri Rust backend<br/>src-tauri/src"]
Rust -- "events: download-progress, deep-link" --> UI
Rust --> OS["OS: keyring, processes, installers"]
| Module | Responsibility |
|---|---|
main.rs |
Entry point. Calls updainium_lib::run(). |
lib.rs |
Application setup, plugin registration, tray icon, platform helpers, and the list of IPC commands. |
github.rs |
GitHub Gist backups, API token validation, request cancellation, and the keyring-backed credential store. |
deep_link.rs |
Parses updainium:// URLs into actions, queues them, and emits them to the frontend. |
process.rs |
Inspects running apps, quits them gracefully, and relaunches installed apps. |
backup.rs |
Reads and writes settings export files, with a 5 MB size limit. |
Tauri plugins used include single-instance, deep-link, opener, autostart, dialog, and fs.
| Area | Files | Responsibility |
|---|---|---|
| Routes |
src/routes/+layout.svelte, +page.svelte, settings/
|
App shell, library view, and settings. The layout starts themes, keybindings, the command palette, and notifications. |
| Catalog |
src/lib/catalog.ts, sourceValidation.ts
|
The TrackedSource record, its validation, and validation of add/edit input. |
| Providers |
src/lib/providers/ (github.ts, gitlab.ts, gitea.ts, shared.ts, types.ts) |
Turn repository URLs into API URLs and normalize forge responses. |
| Registry | src/lib/registry.ts |
Holds the provider list, registers providers and commands from plugins, and loads plugin manifests. |
| Release checks |
src/lib/releaseCheck.ts, assets.ts, versionComparison.ts
|
Poll a source, pick the installer for the current platform, and compare versions. |
| Install flow | src/lib/downloadFlow.ts |
Closes the running app, downloads, verifies the SHA-256 hash, and opens the installer. |
| Backups |
src/lib/backup.ts, gists.ts
|
Build and restore JSON exports and Gist backups. |
-
Frontend to Rust: the frontend calls Tauri commands with
invoke. Commands are registered withtauri::generate_handler!inlib.rs. Examples includedownload_release_asset_resilient,quit_running_app,get_running_app_state,open_installed_app, and thegithub_*commands. -
Rust to frontend: the backend emits events.
download-progressreports download phases.deep-link://actioncarriesupdainium://actions. -
Deep-link queue: links that arrive before the frontend has registered its listener are kept in
PendingDeepLinks. The frontend drains the queue withtake_pending_deep_linkson mount and on each event. -
Network split: release metadata is requested by the frontend with
fetch. Asset downloads run in the Rust backend, which writes them to the local cache.
These constraints shape the code and are documented in the project README:
- Release data comes directly from each forge. There is no proxy or proprietary backend.
- There is no telemetry and no account system.
- Installers are opened after user approval. Updainium does not run unattended installs.
- Downloads use HTTPS only.
- GitHub tokens are kept in the OS credential store, not in
localStorageor backup files. - Themes,
init.js, and plugins are trusted code. They run in the WebView and are not sandboxed.
The security implications are covered in Security Model.
- Architecture and Compatibility: supported platforms, asset matching, and project setup.
- Supported Providers: the built-in forges and how plugins add more.
- Deep Links and Plugin Development: extension points.
- Configuration Reference: settings and storage locations.
Home · Discussions · Report a Bug · Contribute
Found something missing or outdated? Help improve this manual. Every contribution makes Updainium easier to use.
Made with ❤️ by the Updainium community.
Getting Started
User Guide
- Application Library
- Adding Applications
- Managing Applications
- Release Information
- Downloads and Verification
- Backups and Restore
- Settings and Preferences
Customization
Platform Guides
Developer Documentation
- Architecture Overview
- Supported Providers
- Plugin Development
- Configuration Reference
- Deep Links
- Security Model
- Contributing
Reference and Support