[PR #8] [MERGED] Browser-only download, CLI onboarding, and VPS deployment hardening #6

Closed
opened 2026-08-09 19:08:05 +02:00 by zaph0d · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/niels-emmer/myace/pull/8
Author: @niels-emmer
Created: 8/9/2026
Status: Merged
Merged: 8/9/2026
Merged by: @niels-emmer

Base: mainHead: feat/browser-download-cli-onboarding-vps-hardening


📝 Commits (3)

  • 8f83f1f feat(phase-2): browser-only zip download for compiled profiles
  • 11dd537 feat(phase-3): CLI onboarding + local companion server for remote scanning
  • 7c86c91 feat(phase-4): harden defaults for public VPS deployment

📊 Changes

31 files changed (+1807 additions, -100 deletions)

View changed files

.claude/launch.json (+11 -0)
📝 .env.example (+18 -2)
📝 CLAUDE.md (+20 -4)
📝 README.md (+60 -4)
📝 backend/Dockerfile (+8 -2)
📝 backend/app/api/auth.py (+4 -1)
📝 backend/app/api/profiles.py (+45 -1)
📝 backend/app/core/config.py (+13 -1)
📝 backend/app/core/deps.py (+7 -2)
📝 backend/app/main.py (+19 -0)
📝 backend/pyproject.toml (+1 -0)
📝 backend/tests/conftest.py (+38 -6)
backend/tests/test_admin_bootstrap.py (+57 -0)
backend/tests/test_profiles.py (+135 -0)
backend/tests/test_startup_warnings.py (+82 -0)
cli/myace_cli/local_server.py (+115 -0)
📝 cli/myace_cli/main.py (+30 -0)
📝 cli/pyproject.toml (+6 -0)
cli/tests/test_local_server.py (+111 -0)
📝 docker-compose.dev.yml (+4 -2)

...and 11 more files

📄 Description

Summary

Follow-up to hosting MyACE on a public multi-user VPS: the myace CLI turned out to be mandatory for both getting compiled files onto a user's disk and scanning a remote user's own machine (the browser has no filesystem API of its own, and the backend's old local-scan path only ever sees the server's own disk). This PR closes both gaps and hardens the deployment defaults for public exposure.

  • Browser-only zip downloadPOST /api/v1/profiles/compile/zip + a working Download button on /compile, so a user without the CLI can still get their compiled profile. Fixes a header-injection vector in the zip filename and a pre-existing gap where the backend test suite never actually exercised a real database.
  • CLI onboarding + myace serve — Settings' CLI setup block now shows a real, working install/login command (it previously referenced an unpublished PyPI package and a placeholder token). New myace serve companion server lets the Import page scan a remote user's own machine directly, gated on existing myace login credentials, loopback-only, origin-locked CORS, and Chrome Private Network Access support.
  • VPS hardening — startup warnings for unsafe DEBUG/ADMIN_BOOTSTRAP_ENABLED defaults left on in production, a flag to close the "first registrant becomes admin" window, opt-in TrustedHostMiddleware, --proxy-headers so OIDC redirects resolve to https:// behind a reverse proxy, and concrete nginx-proxy-manager setup docs.

Full context and design tradeoffs are in the commit messages (one per phase) and the updated CLAUDE.md/README.md/docs/.

Test plan

  • Backend: pytest (37 passed), ruff check . clean, mypy unchanged from baseline (advisory only)
  • CLI: pytest (15 passed), ruff check . clean
  • Frontend: tsc -b, eslint ., vitest run (4 passed), vite build all clean
  • Live-verified myace serve's CORS/origin/header gating and Private Network Access preflight via curl
  • Live-verified the zip download, dynamic Settings CLI block, and Import page companion-detection UX in a real browser against the running dev stack
  • Rebuilt and restarted the backend Docker container with these changes; confirmed /health and /docs still work

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/niels-emmer/myace/pull/8 **Author:** [@niels-emmer](https://github.com/niels-emmer) **Created:** 8/9/2026 **Status:** ✅ Merged **Merged:** 8/9/2026 **Merged by:** [@niels-emmer](https://github.com/niels-emmer) **Base:** `main` ← **Head:** `feat/browser-download-cli-onboarding-vps-hardening` --- ### 📝 Commits (3) - [`8f83f1f`](https://github.com/niels-emmer/myace/commit/8f83f1f9284b2eda8804598e39db3f6a81afa04d) feat(phase-2): browser-only zip download for compiled profiles - [`11dd537`](https://github.com/niels-emmer/myace/commit/11dd537784efc563fa4a4469b24a22ed45556d45) feat(phase-3): CLI onboarding + local companion server for remote scanning - [`7c86c91`](https://github.com/niels-emmer/myace/commit/7c86c91a5c1adf48f0e6707e58fcd5de83d3efeb) feat(phase-4): harden defaults for public VPS deployment ### 📊 Changes **31 files changed** (+1807 additions, -100 deletions) <details> <summary>View changed files</summary> ➕ `.claude/launch.json` (+11 -0) 📝 `.env.example` (+18 -2) 📝 `CLAUDE.md` (+20 -4) 📝 `README.md` (+60 -4) 📝 `backend/Dockerfile` (+8 -2) 📝 `backend/app/api/auth.py` (+4 -1) 📝 `backend/app/api/profiles.py` (+45 -1) 📝 `backend/app/core/config.py` (+13 -1) 📝 `backend/app/core/deps.py` (+7 -2) 📝 `backend/app/main.py` (+19 -0) 📝 `backend/pyproject.toml` (+1 -0) 📝 `backend/tests/conftest.py` (+38 -6) ➕ `backend/tests/test_admin_bootstrap.py` (+57 -0) ➕ `backend/tests/test_profiles.py` (+135 -0) ➕ `backend/tests/test_startup_warnings.py` (+82 -0) ➕ `cli/myace_cli/local_server.py` (+115 -0) 📝 `cli/myace_cli/main.py` (+30 -0) 📝 `cli/pyproject.toml` (+6 -0) ➕ `cli/tests/test_local_server.py` (+111 -0) 📝 `docker-compose.dev.yml` (+4 -2) _...and 11 more files_ </details> ### 📄 Description ## Summary Follow-up to hosting MyACE on a public multi-user VPS: the `myace` CLI turned out to be mandatory for both getting compiled files onto a user's disk and scanning a remote user's own machine (the browser has no filesystem API of its own, and the backend's old local-scan path only ever sees the server's own disk). This PR closes both gaps and hardens the deployment defaults for public exposure. - **Browser-only zip download** — `POST /api/v1/profiles/compile/zip` + a working Download button on `/compile`, so a user without the CLI can still get their compiled profile. Fixes a header-injection vector in the zip filename and a pre-existing gap where the backend test suite never actually exercised a real database. - **CLI onboarding + `myace serve`** — Settings' CLI setup block now shows a real, working install/login command (it previously referenced an unpublished PyPI package and a placeholder token). New `myace serve` companion server lets the Import page scan a remote user's own machine directly, gated on existing `myace login` credentials, loopback-only, origin-locked CORS, and Chrome Private Network Access support. - **VPS hardening** — startup warnings for unsafe `DEBUG`/`ADMIN_BOOTSTRAP_ENABLED` defaults left on in production, a flag to close the "first registrant becomes admin" window, opt-in `TrustedHostMiddleware`, `--proxy-headers` so OIDC redirects resolve to `https://` behind a reverse proxy, and concrete nginx-proxy-manager setup docs. Full context and design tradeoffs are in the commit messages (one per phase) and the updated `CLAUDE.md`/`README.md`/`docs/`. ## Test plan - [x] Backend: `pytest` (37 passed), `ruff check .` clean, mypy unchanged from baseline (advisory only) - [x] CLI: `pytest` (15 passed), `ruff check .` clean - [x] Frontend: `tsc -b`, `eslint .`, `vitest run` (4 passed), `vite build` all clean - [x] Live-verified `myace serve`'s CORS/origin/header gating and Private Network Access preflight via curl - [x] Live-verified the zip download, dynamic Settings CLI block, and Import page companion-detection UX in a real browser against the running dev stack - [x] Rebuilt and restarted the backend Docker container with these changes; confirmed `/health` and `/docs` still work 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
zaph0d 2026-08-09 19:08:05 +02:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
github-mirrors/myace#6
No description provided.