Initial Mist scaffold
admin-web / build (push) Successful in 22s
backend / test (push) Failing after 52s
mistpipe / test (push) Successful in 10s
admin-web / build-and-push (push) Failing after 5s
backend / build-and-push (push) Has been skipped

Successor to the Josh Steam prototypes. Single-VM Docker Compose stack with
the load-bearing core/ logic ported from JoshSteam CDN with bug fixes.

Contents:
- backend/  FastAPI + Celery (same image, two entrypoints)
            core/  hdiff, librsync, chain_replay, manifest, compression,
                   discord, steam, unrealpak, paths
            api/   auth, catalog, admin, builds (skeletons) + downloads (real)
            worker/  Celery factory replacing the missing prototype Tasks/__init__.py
            db/    SQLAlchemy models + Alembic initial migration
- admin-web/  SvelteKit + Tailwind skeleton
- client/    Tauri 2 + Svelte skeleton (Mist placeholder UI)
- mistpipe/  click-based admin CLI with subcommand stubs
- docs/      ARCHITECTURE, DECISIONS (9 ADRs), RUNBOOK
- docker-compose.yml + dev overlay + .github/workflows

Bugs fixed during port:
- Routes/download.py:2 stray backslash on import line
- Utils/celery.py inspect.reserved() missing parens + double active() typo
- Hardcoded OneDrive/Desktop paths replaced with pydantic-settings config
- Discord webhook URL + RabbitMQ password moved to env vars
- Missing Tasks/__init__.py reconstructed as worker/__init__.py

Out of scope for this commit: route bodies, UI screens, mistpipe subcommand
bodies, real image builds.
This commit is contained in:
2026-06-07 19:39:25 -04:00
commit bfd6771a9a
76 changed files with 3890 additions and 0 deletions
+26
View File
@@ -0,0 +1,26 @@
# Mist client
The Tauri-based desktop client for Mist. Rust shell, Svelte UI inside.
## Dev quickstart
```sh
pnpm install
pnpm tauri dev
```
Tauri builds a native installer per platform via `pnpm tauri build`. Initial target is Windows (friends are on Windows); macOS/Linux straightforward to add.
## What goes here
- **`src/`** — Svelte UI (browse store, install, update, launch screens)
- **`src-tauri/`** — Rust shell, native commands, file-system integration
## Patch application
The two patch tools (`hpatchz` for direct updates, `rdiff` for indirect) are external binaries. The plan is to either:
1. Port `apply_hdiff_patch` / `apply_librsync_patch` to Rust using `tauri::command` so the UI invokes them natively, or
2. Bundle a small Python sidecar binary built with PyInstaller that the Tauri shell spawns for each patch op (uses the same `mist.core.hdiff` / `mist.core.librsync` modules as the backend worker, except this side only *applies*, not *generates*).
Decision deferred to the implementation phase.
+12
View File
@@ -0,0 +1,12 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Mist</title>
</head>
<body>
<div id="app"></div>
<script type="module" src="/src/main.ts"></script>
</body>
</html>
+25
View File
@@ -0,0 +1,25 @@
{
"name": "mist-client",
"version": "0.1.0",
"private": true,
"type": "module",
"scripts": {
"dev": "vite",
"build": "vite build",
"preview": "vite preview",
"tauri": "tauri",
"check": "svelte-check --tsconfig ./tsconfig.json"
},
"dependencies": {
"@tauri-apps/api": "^2.1.0"
},
"devDependencies": {
"@sveltejs/vite-plugin-svelte": "^4.0.0",
"@tauri-apps/cli": "^2.1.0",
"svelte": "^5.0.0",
"svelte-check": "^4.0.0",
"tslib": "^2.7.0",
"typescript": "^5.6.0",
"vite": "^5.4.0"
}
}
+18
View File
@@ -0,0 +1,18 @@
[package]
name = "mist-client"
version = "0.1.0"
description = "Mist desktop client"
authors = ["Josh"]
edition = "2021"
[build-dependencies]
tauri-build = { version = "2", features = [] }
[dependencies]
tauri = { version = "2", features = [] }
serde = { version = "1", features = ["derive"] }
serde_json = "1"
[features]
default = ["custom-protocol"]
custom-protocol = ["tauri/custom-protocol"]
+3
View File
@@ -0,0 +1,3 @@
fn main() {
tauri_build::build()
}
+14
View File
@@ -0,0 +1,14 @@
// Prevents an extra console window on Windows in release.
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]
fn main() {
tauri::Builder::default()
// TODO: register #[tauri::command] handlers for:
// - apply_hdiff_patch(old, patch, new) -> bool
// - apply_librsync_patch(old, delta, new) -> bool
// - generate_librsync_signature(file) -> Vec<u8>
// - install_game(game_id, version) -> JobHandle
// - launch_game(game_id) -> ()
.run(tauri::generate_context!())
.expect("error while running tauri application");
}
+31
View File
@@ -0,0 +1,31 @@
{
"$schema": "https://schema.tauri.app/config/2",
"productName": "Mist",
"version": "0.1.0",
"identifier": "app.mist.client",
"build": {
"beforeDevCommand": "npm run dev",
"beforeBuildCommand": "npm run build",
"devUrl": "http://localhost:1420",
"frontendDist": "../dist"
},
"app": {
"windows": [
{
"title": "Mist",
"width": 1200,
"height": 800,
"minWidth": 900,
"minHeight": 600
}
],
"security": {
"csp": null
}
},
"bundle": {
"active": true,
"targets": "all",
"icon": []
}
}
+78
View File
@@ -0,0 +1,78 @@
<script lang="ts">
// Mist client placeholder. Purple background is a nod to the original PyQt5 stub.
let view = $state<'store' | 'library' | 'downloads'>('store');
</script>
<main>
<header>
<h1>Mist</h1>
<nav>
<button class:active={view === 'store'} onclick={() => (view = 'store')}>Store</button>
<button class:active={view === 'library'} onclick={() => (view = 'library')}>Library</button>
<button class:active={view === 'downloads'} onclick={() => (view = 'downloads')}>Downloads</button>
</nav>
</header>
<section>
{#if view === 'store'}
<h2>Store</h2>
<p class="muted">Browse games here. Skeleton — backend wiring TBD.</p>
{:else if view === 'library'}
<h2>Library</h2>
<p class="muted">Your installed games will show up here.</p>
{:else}
<h2>Downloads</h2>
<p class="muted">In-flight downloads and updates.</p>
{/if}
</section>
</main>
<style>
:global(body) {
margin: 0;
background: #3a115e;
color: #f0e6ff;
font-family: system-ui, -apple-system, sans-serif;
}
main {
min-height: 100vh;
padding: 24px;
}
header {
display: flex;
align-items: center;
gap: 32px;
border-bottom: 1px solid #4e1f6d;
padding-bottom: 16px;
margin-bottom: 24px;
}
h1 {
margin: 0;
font-size: 1.5rem;
letter-spacing: 0.02em;
}
nav {
display: flex;
gap: 8px;
}
nav button {
background: #6b2e8d;
color: white;
border: 1px solid #4e1f6d;
border-radius: 8px;
padding: 8px 14px;
cursor: pointer;
font: inherit;
}
nav button:hover {
background: #4e1f6d;
}
nav button.active {
background: #3c184d;
}
h2 {
font-weight: 500;
}
.muted {
color: #b9a8d6;
}
</style>
+6
View File
@@ -0,0 +1,6 @@
import { mount } from 'svelte';
import App from './App.svelte';
const app = mount(App, { target: document.getElementById('app')! });
export default app;
+5
View File
@@ -0,0 +1,5 @@
import { vitePreprocess } from '@sveltejs/vite-plugin-svelte';
export default {
preprocess: vitePreprocess()
};
+19
View File
@@ -0,0 +1,19 @@
{
"compilerOptions": {
"target": "ESNext",
"useDefineForClassFields": true,
"module": "ESNext",
"resolveJsonModule": true,
"allowJs": true,
"checkJs": true,
"isolatedModules": true,
"moduleResolution": "bundler",
"strict": true,
"noImplicitAny": true,
"esModuleInterop": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true,
"types": ["svelte", "vite/client"]
},
"include": ["src/**/*.ts", "src/**/*.svelte"]
}
+16
View File
@@ -0,0 +1,16 @@
import { defineConfig } from 'vite';
import { svelte } from '@sveltejs/vite-plugin-svelte';
// https://vitejs.dev/config/
export default defineConfig({
plugins: [svelte()],
clearScreen: false,
server: {
port: 1420,
strictPort: true
},
envPrefix: ['VITE_', 'TAURI_'],
build: {
target: 'esnext'
}
});