feat(admin): serve Operator Console SPA at /admin (rust-embed)

Preact + Vite standalone admin-ui bundled into the server binary via
rust-embed. Login is NIP-07 (Smirk wallet signs the NIP-98 admin
challenge); tabs cover instance status, admin keys, invite codes, and
the effective-config editor (live vs restart-required per field).

admin-ui/dist is committed because rust-embed reads it at compile time;
node_modules is gitignored (npm ci reproduces it). A lib test asserts
index.html and the /admin/ asset base are embedded so an unbuilt
console fails the build instead of an operator.

The console is served on the admin plane only (loopback bind), behind
the existing NIP-98 admin_guard + MAC allowlist.
This commit is contained in:
jwinterm
2026-07-18 16:03:03 -04:00
parent 8b408a063a
commit 35447868d4
16 changed files with 1912 additions and 34 deletions
+14
View File
@@ -0,0 +1,14 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="robots" content="noindex" />
<title>Smirk Operator Console</title>
<script type="module" crossorigin src="/admin/assets/index-DLOlKNyc.js"></script>
<link rel="stylesheet" crossorigin href="/admin/assets/index-uKG4VNAS.css">
</head>
<body>
<div id="app"></div>
</body>
</html>