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
+52
View File
@@ -0,0 +1,52 @@
# Copy this file to `.env` and fill in real values. Never commit `.env`.
# ---- Database ----
POSTGRES_USER=mist
POSTGRES_PASSWORD=changeme-postgres
POSTGRES_DB=mist
POSTGRES_HOST=postgres
POSTGRES_PORT=5432
DATABASE_URL=postgresql+psycopg://mist:changeme-postgres@postgres:5432/mist
# ---- Redis ----
REDIS_URL=redis://redis:6379/0
# ---- RabbitMQ / Celery ----
RABBITMQ_DEFAULT_USER=mist
RABBITMQ_DEFAULT_PASS=changeme-rabbitmq
CELERY_BROKER_URL=amqp://mist:changeme-rabbitmq@rabbitmq:5672//
CELERY_RESULT_BACKEND=redis://redis:6379/1
# ---- API ----
API_HOST=0.0.0.0
API_PORT=8000
JWT_SECRET=changeme-generate-a-long-random-string
JWT_ALG=HS256
JWT_TTL_MINUTES=720
CORS_ALLOWED_ORIGINS=https://store.example.com,https://admin.example.com
# ---- Paths (inside the container) ----
# NAS mount inside container; source of truth for game files
GAMES_DIR=/mnt/nas/mist/games
# Hot cache for prepared .tar.zst archives (Docker volume)
CACHE_DIR=/mist/cache
# Working / temp dir for in-flight delta-gen (Docker volume or tmpfs)
TEMP_DIR=/mist/tmp
# ---- Patch tool binaries (inside the container) ----
# These are installed in the backend Dockerfile.
HDIFFZ_PATH=/usr/local/bin/hdiffz
HPATCHZ_PATH=/usr/local/bin/hpatchz
RDIFF_PATH=/usr/local/bin/rdiff
# Optional — only needed on the build host that ingests Unreal games
UNREALPAK_PATH=
# ---- External integrations ----
DISCORD_WEBHOOK_URL=
DISCORD_BOT_USERNAME=Mist
DISCORD_BOT_AVATAR_URL=https://www.pcgamesn.com/wp-content/sites/pcgamesn/2018/10/gabe_newell_meme.jpg
STEAM_API_KEY=
# ---- Misc ----
LOG_LEVEL=INFO
ENVIRONMENT=development