Suno-style web UI for a self-hosted MiniMax-Music3 inference server
TypeScript ai-musicdiffusersdockerexpressminimaxminimax-musicmusic-generationreactself-hostedsgl-omnisunotailwindcsstext-to-musictypescriptvite
feat: read-only demo mode with simulated renders; Dockerfile.demo bakes a showcase library
Adam Benhassena8a303f58054
diff --git a/.dockerignore b/.dockerignoreindex 8e1730f..478bf2c 100644--- a/.dockerignore+++ b/.dockerignore@@ -2,6 +2,7 @@ node_modules*/node_modules*/distdata+!demo/datadocs.git.playwright-clidiff --git a/Dockerfile.demo b/Dockerfile.demonew file mode 100644index 0000000..7eaf809--- /dev/null+++ b/Dockerfile.demo@@ -0,0 +1,11 @@+# syntax=docker/dockerfile:1.7+# Public read-only demo: the normal image + a baked-in showcase library, DEMO=1.+# demo/prepare.sh # showcase from server/data → demo/data+# docker build -t minimax-music-ui . # base image+# docker build -f Dockerfile.demo -t minimax-music-ui-demo .+# Run it with a read-only root filesystem — nothing is written in demo mode:+# docker run --read-only -p 8787:8787 minimax-music-ui-demo+ARG BASE=minimax-music-ui+FROM ${BASE}+COPY --chown=node:node demo/data /data+ENV DEMO=1diff --git a/README.md b/README.mdindex 5b3376e..acfa5f8 100644--- a/README.md+++ b/README.md@@ -115,11 +115,22 @@ FAKE_STREAM=1 npm run fake -w server # advertises streaming; SSE progress + 4FAKE_PORT=7998 npm run fake -w server # listen elsewhere (default 7999)```+## Public demo image (read-only)++`Dockerfile.demo` bakes a showcase library into the normal image and sets `DEMO=1`: the library is read-only, Settings/Templates can't be changed, and **Create simulates a render** (progress bar, then one of the showcase songs is handed out) — per visitor, in memory, no GPU involved. A banner and the health pill say so.++```bash+demo/prepare.sh server/data # copy finished WAV tracks + trimmed library.json → demo/data+docker build -t minimax-music-ui .+docker build -f Dockerfile.demo -t minimax-music-ui-demo .+docker run --read-only -p 8787:8787 minimax-music-ui-demo+```+## UI server API| Method | Path | Description ||---|---|---|-| `GET` | `/api/health` | `upstreamReachable` (via `/v1/models`), `ready` (false only if an optional upstream `/health` answers 503), `capabilities` from that `/health`, queue state |+| `GET` | `/api/health` | `demo` (read-only demo, see above), `upstreamReachable` (via `/v1/models`), `ready` (false only if an optional upstream `/health` answers 503), `capabilities` from that `/health`, queue state || `GET` | `/api/library` | Tracks, newest first || `POST` | `/api/generate` | `{title?, prompt, lyrics?, duration, seed?, format, takes}` → created tracks (queued) || `GET` | `/api/tracks/:id/audio` | Stream audio (`?download` for an attachment); for a track still rendering, the audio so far with a valid header (Range supported) |diff --git a/demo/prepare.sh b/demo/prepare.shnew file mode 100755index 0000000..cf24809--- /dev/null+++ b/demo/prepare.sh@@ -0,0 +1,12 @@+#!/bin/sh+# Build the showcase data dir for the demo image from a real data dir:+# demo/prepare.sh [SRC_DATA_DIR=server/data] [DEST=demo/data]+# Copies finished WAV tracks + a library.json trimmed to them (no settings, no templates).+set -eu+SRC=${1:-server/data}+DEST=${2:-demo/data}+command -v jq >/dev/null || { echo "jq is required" >&2; exit 1; }+rm -rf "$DEST" && mkdir -p "$DEST/tracks"+jq '[.[] | select(.status == "done" and .file != null and (.file | endswith(".wav"))) | .stream = false | .renderedSeconds = null]' "$SRC/library.json" > "$DEST/library.json"+jq -r '.[].file' "$DEST/library.json" | while read -r f; do cp "$SRC/tracks/$f" "$DEST/tracks/$f"; done+echo "$(jq length "$DEST/library.json") tracks, $(du -sh "$DEST/tracks" | cut -f1) → $DEST"diff --git a/server/src/app.ts b/server/src/app.tsindex a2a25a6..e9e4725 100644--- a/server/src/app.ts+++ b/server/src/app.ts@@ -10,6 +10,7 @@ import { normalizeMusicApi, SettingsStore } from './settings.js';import { randomTitle } from './names.js';import { FORMATS, type Template, type Track } from './types.js';import { patchWavSizes, WAV_HEADER_BYTES } from './wav.js';+import { demoRouter, type DemoOptions } from './demo.js';export interface AppDeps {library: Library;@@ -20,6 +21,8 @@ export interface AppDeps {tracksDir: string;staticDir?: string | null;log?: (msg: string) => void;+ /** read-only public demo: showcase library, simulated per-visitor renders, no upstream, no writes */+ demo?: DemoOptions | null;}const MIME: Record<string, string> = { wav: 'audio/wav' };@@ -56,6 +59,7 @@ export function createApp(deps: AppDeps) {const log = deps.log ?? ((m: string) => console.log(`[app] ${m}`));const app = express();app.use(express.json({ limit: '1mb' }));+ if (deps.demo) app.use(demoRouter(library, tracksDir, deps.demo));app.get('/api/health', async (_req, res) => {try {diff --git a/server/src/config.ts b/server/src/config.tsindex c893bf5..030d14e 100644--- a/server/src/config.ts+++ b/server/src/config.ts@@ -8,6 +8,8 @@ export interface Config {port: number;dataDir: string;staticDir: string | null;+ /** DEMO=1: read-only public demo (see demo.ts) */+ demo: boolean;}export function loadConfig(env: NodeJS.ProcessEnv = process.env): Config {@@ -19,5 +21,6 @@ export function loadConfig(env: NodeJS.ProcessEnv = process.env): Config {port,dataDir: path.resolve(env.DATA_DIR ?? './data'),staticDir: env.STATIC_DIR ? path.resolve(env.STATIC_DIR) : null,+ demo: env.DEMO === '1' || env.DEMO === 'true',};}diff --git a/server/src/demo.ts b/server/src/demo.tsnew file mode 100644index 0000000..28288fd--- /dev/null+++ b/server/src/demo.ts@@ -0,0 +1,159 @@+import { Router, type Request, type Response } from 'express';+import path from 'node:path';+import { randomUUID, randomInt } from 'node:crypto';+import type { Library } from './library.js';+import { extFor, REALTIME_FACTOR } from './upstream.js';+import { normalizeGenerate } from './validate.js';+import { randomTitle } from './names.js';+import { FORMATS, type Track } from './types.js';++/**+ * Read-only public demo. The persisted library is the showcase (never modified); anything a+ * visitor "creates" is simulated in memory for that visitor only (cookie session), progresses+ * like a real render, and ends up pointing at one of the showcase files. Nothing reaches a GPU.+ */+export interface DemoOptions {+ /** how long a simulated render takes; default ≈ duration × 0.25 s, clamped 6–30 s */+ renderMs?: number;+ tickMs?: number;+ /** drop a visitor's simulated tracks after this long without a request */+ sessionTtlMs?: number;+ maxTracksPerSession?: number;+}++const COOKIE = 'demo_sid';+const READ_ONLY = { error: 'This is a read-only demo — changes are not saved.' };+const MIME: Record<string, string> = { wav: 'audio/wav' };+const safeName = (s: string) => s.replace(/[^\w\- ]+/g, '').trim().slice(0, 60) || 'track';++interface Session {+ tracks: Track[];+ lastSeen: number;+ running: boolean;+ timer: NodeJS.Timeout | null;+}++export function demoRouter(library: Library, tracksDir: string, opts: DemoOptions = {}): Router {+ const tickMs = opts.tickMs ?? 500;+ const sessionTtl = opts.sessionTtlMs ?? 2 * 3600_000;+ const maxTracks = opts.maxTracksPerSession ?? 20;+ const sessions = new Map<string, Session>();++ const sweep = setInterval(() => {+ const now = Date.now();+ for (const [sid, s] of sessions) if (now - s.lastSeen > sessionTtl && !s.running) { if (s.timer) clearInterval(s.timer); sessions.delete(sid); }+ }, 60_000);+ sweep.unref();++ const sessionOf = (req: Request, res: Response): Session => {+ const m = /(?:^|;\s*)demo_sid=([\w-]+)/.exec(req.headers.cookie ?? '');+ let sid = m?.[1];+ if (!sid || !sessions.has(sid)) {+ sid = sid && /^[\w-]{20,}$/.test(sid) ? sid : randomUUID();+ sessions.set(sid, { tracks: [], lastSeen: Date.now(), running: false, timer: null });+ res.cookie(COOKIE, sid, { httpOnly: true, sameSite: 'lax', maxAge: sessionTtl });+ }+ const s = sessions.get(sid)!;+ s.lastSeen = Date.now();+ return s;+ };++ const seeds = () => library.all().filter((t) => t.status === 'done' && t.file);++ const renderMsFor = (duration: number) => opts.renderMs ?? Math.min(30_000, Math.max(6_000, duration * 250));++ /** Run the visitor's queue one track at a time, like the real RenderQueue. */+ const pump = (s: Session) => {+ if (s.running) return;+ const track = s.tracks.slice().reverse().find((t) => t.status === 'queued'); // oldest first+ if (!track) return;+ s.running = true;+ const total = renderMsFor(track.duration);+ const startedAt = Date.now();+ const est = Math.max(5, track.duration * REALTIME_FACTOR);+ Object.assign(track, { status: 'running', stage: 'rendering', progress: 0, eta: est, elapsed: 0 });+ const finish = () => {+ if (s.timer) clearInterval(s.timer);+ s.timer = null;+ s.running = false;+ pump(s);+ };+ s.timer = setInterval(() => {+ if (!s.tracks.includes(track)) return finish(); // cancelled+ const frac = Math.min(1, (Date.now() - startedAt) / total);+ if (frac < 1) {+ Object.assign(track, { progress: Math.min(0.99, frac), elapsed: est * frac, eta: est * (1 - frac) });+ return;+ }+ const pool = seeds();+ const pick = pool.length ? pool[randomInt(pool.length)] : null;+ Object.assign(track, pick+ ? { status: 'done', stage: 'done', progress: 1, eta: null, elapsed: est, file: pick.file, format: pick.format, seed: track.seed ?? randomInt(1, 2 ** 31), finishedAt: new Date().toISOString() }+ : { status: 'error', stage: 'error', error: 'demo has no showcase audio to hand out', finishedAt: new Date().toISOString() });+ finish();+ }, tickMs);+ };++ const r = Router();++ r.get('/api/health', (_req, res) => {+ res.json({ demo: true, upstreamReachable: true, ready: true, busy: false, queued: 0, formats: FORMATS, capabilities: [], models: [] });+ });++ r.get('/api/library', (req, res) => {+ const s = sessionOf(req, res);+ res.json([...s.tracks, ...library.all()]);+ });++ r.post('/api/generate', (req, res, next) => {+ try {+ const s = sessionOf(req, res);+ const g = normalizeGenerate(req.body);+ if (s.tracks.length + g.takes > maxTracks) return res.status(429).json({ error: `Demo limit: at most ${maxTracks} simulated tracks per visitor — delete some first.` });+ const groupId = randomUUID();+ const title = g.title || randomTitle();+ const created: Track[] = [];+ for (let i = 0; i < g.takes; i++) {+ const track: Track = {+ id: randomUUID(), groupId, takeIndex: i, title, prompt: g.prompt, lyrics: g.lyrics, duration: g.duration,+ seed: g.seed === null ? null : g.seed + i, format: g.format, status: 'queued', progress: 0, stage: 'queued', eta: null,+ stream: false, renderedSeconds: null, error: null, file: null, createdAt: new Date().toISOString(), finishedAt: null,+ };+ s.tracks.unshift(track);+ created.push(track);+ }+ setImmediate(() => pump(s)); // respond with them queued, like the real queue does+ res.status(201).json(created);+ } catch (err) {+ next(err);+ }+ });++ r.delete('/api/tracks/:id', (req, res) => {+ const s = sessionOf(req, res);+ const i = s.tracks.findIndex((t) => t.id === req.params.id);+ if (i !== -1) { s.tracks.splice(i, 1); return res.json({ ok: true }); }+ if (library.get(req.params.id)) return res.status(403).json(READ_ONLY);+ res.status(404).json({ error: 'not found' });+ });++ r.get('/api/tracks/:id/audio', (req, res, next) => {+ const s = sessionOf(req, res);+ const track = s.tracks.find((t) => t.id === req.params.id);+ if (!track) return next(); // a showcase track: the normal handler serves it+ if (!track.file) return res.status(404).json({ error: 'no audio' });+ const type = MIME[extFor(track.format)] ?? 'application/octet-stream';+ const download = req.query.download !== undefined;+ res.sendFile(path.join(tracksDir, track.file), {+ headers: { 'Content-Type': type, ...(download ? { 'Content-Disposition': `attachment; filename="${safeName(track.title)}.${extFor(track.format)}"` } : {}) },+ }, (err) => { if (err && !res.headersSent) res.status(404).json({ error: 'file missing' }); });+ });++ const readOnly = (_req: Request, res: Response) => { res.status(403).json(READ_ONLY); };+ r.put('/api/settings', readOnly);+ r.post('/api/settings/test', readOnly);+ r.post('/api/templates', readOnly);+ r.delete('/api/templates/:id', readOnly);++ return r;+}diff --git a/server/src/index.ts b/server/src/index.tsindex bbe6476..6c78fd6 100644--- a/server/src/index.ts+++ b/server/src/index.ts@@ -26,13 +26,14 @@ const here = path.dirname(fileURLToPath(import.meta.url));const defaultStatic = path.resolve(here, '../../web/dist');const staticDir = config.staticDir ?? (fs.existsSync(defaultStatic) ? defaultStatic : null);-const app = createApp({ library, templates, settings, upstream, queue, tracksDir, staticDir });+const app = createApp({ library, templates, settings, upstream, queue, tracksDir, staticDir, demo: config.demo ? {} : null });app.listen(config.port, () => {console.log(`minimax-music-ui server on http://localhost:${config.port}`);console.log(` upstream: ${effective.musicApi} [${effective.source.musicApi}]${effective.apiKey ? ` (bearer set [${effective.source.apiKey}])` : ''}`);console.log(` data: ${config.dataDir}`);console.log(` static: ${staticDir ?? '(none — run web dev server)'}`);+ if (config.demo) console.log(' DEMO mode: read-only showcase, renders are simulated');if (recovered.failed) console.log(` marked ${recovered.failed} interrupted render(s) as error`);if (recovered.resumed) console.log(` re-queued ${recovered.resumed} pending render(s)`);});diff --git a/server/test/demo.test.ts b/server/test/demo.test.tsnew file mode 100644index 0000000..e8f34e9--- /dev/null+++ b/server/test/demo.test.ts@@ -0,0 +1,100 @@+import { describe, it, expect } from 'vitest';+import request from 'supertest';+import fs from 'node:fs/promises';+import os from 'node:os';+import path from 'node:path';+import { JsonStore, Library } from '../src/library.js';+import type { Template, Track } from '../src/types.js';+import { RenderQueue, UpstreamClient } from '../src/upstream.js';+import { createApp } from '../src/app.js';+import { SettingsStore } from '../src/settings.js';++const seedTrack = (id: string, file: string): Track => ({+ id, groupId: id, takeIndex: 0, title: `Seed ${id}`, prompt: 'seed', lyrics: '[Instrumental]', duration: 10, seed: 1, format: 'wav',+ status: 'done', progress: 1, stage: 'done', eta: null, elapsed: 30, stream: false, renderedSeconds: null, error: null, file,+ createdAt: '2026-01-01T00:00:00.000Z', finishedAt: '2026-01-01T00:00:30.000Z',+});++async function setup() {+ const dir = await fs.mkdtemp(path.join(os.tmpdir(), 'demo-'));+ const tracksDir = path.join(dir, 'tracks');+ await fs.mkdir(tracksDir);+ await fs.writeFile(path.join(tracksDir, 'a.wav'), Buffer.from('RIFFxxxxWAVEseed-a'));+ const lib = new Library(path.join(dir, 'library.json'));+ await lib.load();+ await lib.add(seedTrack('s1', 'a.wav'));+ const settings = new SettingsStore(path.join(dir, 'settings.json'), { musicApi: null, apiKey: null });+ await settings.load();+ const upstream = new UpstreamClient('http://127.0.0.1:1');+ const templates = new JsonStore<Template>(path.join(dir, 'templates.json'));+ await templates.load();+ const queue = new RenderQueue(lib, upstream, tracksDir, () => {}, 20);+ const app = createApp({ library: lib, templates, settings, upstream, queue, tracksDir, log: () => {}, demo: { renderMs: 120, tickMs: 20 } });+ return { app, lib };+}++const until = async (cond: () => Promise<boolean>, ms = 4000) => {+ const t0 = Date.now();+ while (!(await cond())) {+ if (Date.now() - t0 > ms) throw new Error('timeout');+ await new Promise((r) => setTimeout(r, 15));+ }+};++describe('demo mode', () => {+ it('reports demo health without touching any upstream', async () => {+ const { app } = await setup();+ const h = await request(app).get('/api/health');+ expect(h.body).toMatchObject({ demo: true, upstreamReachable: true, ready: true, capabilities: [] });+ });++ it('refuses writes to seed tracks, settings and templates', async () => {+ const { app, lib } = await setup();+ expect((await request(app).delete('/api/tracks/s1')).status).toBe(403);+ expect(lib.get('s1')).toBeDefined();+ expect((await request(app).put('/api/settings').send({ musicApi: 'http://x:1' })).status).toBe(403);+ expect((await request(app).post('/api/settings/test').send({})).status).toBe(403);+ expect((await request(app).post('/api/templates').send({ name: 'n', prompt: 'p' })).status).toBe(403);+ expect((await request(app).delete('/api/templates/x')).status).toBe(403);+ });++ it('simulates a render per visitor and hands out a seed file as the result', async () => {+ const { app, lib } = await setup();+ const agent = request.agent(app);+ const other = request.agent(app);+ const res = await agent.post('/api/generate').send({ prompt: 'lofi', duration: 30, takes: 2, seed: 9 });+ expect(res.status).toBe(201);+ expect(res.body).toHaveLength(2);+ expect(res.body[0]).toMatchObject({ status: 'queued', seed: 9 });+ const id = res.body[0].id as string;+ // visible to this visitor, invisible to another, never persisted+ expect((await agent.get('/api/library')).body.map((t: Track) => t.id)).toEqual([res.body[1].id, id, 's1']);+ expect((await other.get('/api/library')).body.map((t: Track) => t.id)).toEqual(['s1']);+ expect(lib.all().map((t) => t.id)).toEqual(['s1']);+ // progresses then finishes with the seed audio+ await until(async () => (await agent.get('/api/library')).body.find((t: Track) => t.id === id)?.status === 'running');+ await until(async () => (await agent.get('/api/library')).body.find((t: Track) => t.id === id)?.status === 'done');+ const done = (await agent.get('/api/library')).body.find((t: Track) => t.id === id) as Track;+ expect(done.progress).toBe(1);+ expect(done.file).toBe('a.wav');+ expect(done.finishedAt).toBeTruthy();+ const audio = await agent.get(`/api/tracks/${id}/audio?download`);+ expect(audio.status).toBe(200);+ expect(audio.headers['content-disposition']).toContain('.wav');+ expect(audio.body.toString()).toBe('RIFFxxxxWAVEseed-a');+ // other visitors cannot see or fetch it+ expect((await other.get(`/api/tracks/${id}/audio`)).status).toBe(404);+ // the visitor can delete their own simulated track+ expect((await agent.delete(`/api/tracks/${id}`)).status).toBe(200);+ expect((await agent.get('/api/library')).body.map((t: Track) => t.id)).toEqual([res.body[1].id, 's1']);+ });++ it('cancelling a queued simulated track removes it', async () => {+ const { app } = await setup();+ const agent = request.agent(app);+ const res = await agent.post('/api/generate').send({ prompt: 'x', duration: 60, takes: 2 });+ const second = res.body[1].id as string;+ expect((await agent.delete(`/api/tracks/${second}`)).status).toBe(200);+ expect((await agent.get('/api/library')).body.map((t: Track) => t.id)).toEqual([res.body[0].id, 's1']);+ });+});diff --git a/web/src/App.tsx b/web/src/App.tsxindex 45cfe0d..4c1e3ab 100644--- a/web/src/App.tsx+++ b/web/src/App.tsx@@ -99,6 +99,12 @@ export default function App() {<div className="flex-1 flex min-h-0"><Sidebar view={view} onChange={setView} counts={{ inflight, total: tracks.length }} /><main className="flex-1 flex flex-col min-w-0">+ {health?.demo && (+ <div className="shrink-0 px-4 md:px-6 py-1.5 text-xs text-sky-200 bg-sky-500/10 border-b border-sky-500/30 text-center">+ <span className="font-semibold">Demo</span> — a read-only showcase of tracks rendered with MiniMax-Music3. No GPU is attached: <span className="font-semibold">Create</span> simulates a render and hands you one of the showcase songs; your simulated tracks are private to this browser and vanish after a while.+ {' '}<a className="underline underline-offset-2 hover:text-white" href="https://github.com/adambenhassen/minimax-music-ui" target="_blank" rel="noreferrer">Run it yourself →</a>+ </div>+ )}<header className="h-14 shrink-0 flex items-center justify-between gap-3 px-4 md:px-6 border-b border-ink-700"><h1 className="text-base font-semibold truncate">{view === 'create' ? 'Create' : view === 'library' ? 'Library' : 'Settings'}</h1><div className="flex items-center gap-3 shrink-0">@@ -117,7 +123,7 @@ export default function App() {<section className="p-4 md:p-5 lg:overflow-y-auto lg:min-h-0">{feed}</section></div>) : view === 'settings' ? (- <div className="flex-1 min-h-0 overflow-y-auto"><SettingsPanel onSaved={() => void refresh()} /></div>+ <div className="flex-1 min-h-0 overflow-y-auto"><SettingsPanel onSaved={() => void refresh()} demo={!!health?.demo} /></div>) : (<div className="flex-1 min-h-0 flex flex-col"><div className="px-5 pt-4">diff --git a/web/src/components/CreatePanel.tsx b/web/src/components/CreatePanel.tsxindex 9730639..6f43cec 100644--- a/web/src/components/CreatePanel.tsx+++ b/web/src/components/CreatePanel.tsx@@ -228,7 +228,7 @@ export function CreatePanel({ health, form, onFormChange, onSubmit }: Props) {<Sparkle width={16} height={16} /> {submitting ? 'Queuing…' : form.takes > 1 ? `Create ${form.takes} takes` : 'Create'}</button><span className="text-[11px] text-zinc-500">- {loading ? 'Loading model…' : online ? `≈ ${estMin} min of GPU time` : health ? 'Inference server offline' : 'Connecting…'}+ {health?.demo ? 'Demo — the render is simulated; you get a showcase song' : loading ? 'Loading model…' : online ? `≈ ${estMin} min of GPU time` : health ? 'Inference server offline' : 'Connecting…'}</span></div></div>diff --git a/web/src/components/HealthPill.tsx b/web/src/components/HealthPill.tsxindex 92133f7..c567a28 100644--- a/web/src/components/HealthPill.tsx+++ b/web/src/components/HealthPill.tsx@@ -4,7 +4,8 @@ export function HealthPill({ health }: { health: Health | null }) {let dot = 'bg-zinc-500';let text = 'Connecting…';let pulse = false;- if (health) {+ if (health?.demo) { dot = 'bg-sky-400'; text = 'Demo · renders are simulated'; }+ else if (health) {if (!health.upstreamReachable) { dot = 'bg-red-500'; text = 'Inference server offline'; }else if (!health.ready) { dot = 'bg-amber-400'; text = 'Loading model…'; pulse = true; }else if (health.busy) { dot = 'bg-accent'; text = `Rendering${health.queued ? ` · ${health.queued} queued` : ''}`; pulse = true; }diff --git a/web/src/components/SettingsPanel.tsx b/web/src/components/SettingsPanel.tsxindex 9b86e69..8eed31f 100644--- a/web/src/components/SettingsPanel.tsx+++ b/web/src/components/SettingsPanel.tsx@@ -3,7 +3,7 @@ import { api } from '../api';import type { Settings, SettingsTestResult } from '../types';import { Lock } from './Icons';-export function SettingsPanel({ onSaved }: { onSaved: () => void }) {+export function SettingsPanel({ onSaved, demo = false }: { onSaved: () => void; demo?: boolean }) {const [settings, setSettings] = useState<Settings | null>(null);const [musicApi, setMusicApi] = useState('');const [apiKey, setApiKey] = useState('');@@ -78,6 +78,7 @@ export function SettingsPanel({ onSaved }: { onSaved: () => void }) {return (<div className="p-6 max-w-2xl space-y-8">+ {demo && <div className="text-xs rounded-lg px-3 py-2 border text-sky-200 bg-sky-500/10 border-sky-500/30">Read-only demo — settings can be viewed but not changed.</div>}<section className="space-y-4"><div><h2 className="text-sm font-semibold">Inference server</h2>diff --git a/web/src/types.ts b/web/src/types.tsindex 562e41b..a8b8e06 100644--- a/web/src/types.ts+++ b/web/src/types.ts@@ -27,6 +27,8 @@ export interface Track {}export interface Health {+ /** public read-only demo: showcase library, simulated renders */+ demo?: boolean;upstreamReachable: boolean;ready: boolean;busy: boolean;