Skip to main content

melodee-admin-ui

Imported component documentation. Source: melodee-project/melodee-admin-ui at commit e0ed63ec61a069159a1482d1ecd11dd480a6a60f. Version 2026.11.0-rc.0. License MIT. Status: release candidate; not published, deployed, production-qualified or security-reviewed. This is the component's committed documentation, not proof of a distribution release or production qualification.

Melodee Operations administration application. It is a separately built and deployed browser client for the authoritative melodee-api; interactive sign-in, device consent and recent-auth step-up belong to the separately served melodee-auth-ui.

Release status: release candidate 2026.11.0-rc.0, pinned to native API contract 1.0.0 at upstream commit f77dba9ea1b85bece26cb72b19088f3f41087371. Not published, deployed, production qualified or security-reviewed. Read Readiness before making availability claims.

Design authority: Melodee Operations design system 1.0.0 retained unchanged under design/design-kit. The application ports the approved tokens and component family; it does not embed preview screenshots or serve the preview gallery as product UI.

Stack​

  • TypeScript 5.9, React 19, Vite 7, React Router v7 and Mantine 8.
  • Generated OpenAPI types plus a generated runtime response validator derived from the pinned artifact. Unknown response fields are tolerated; missing required fields and wrong types fail closed.
  • Same-origin API calls with the API-owned HttpOnly cookie and CSRF header. No bearer token is stored or exposed to JavaScript.
  • Vitest/Testing Library for deterministic unit and component tests; Playwright for browser acceptance; a test-only mock API for visual/state coverage; a disposable real stack is used for integration qualification.

Quick start​

npm ci
npm run dev # http://localhost:5173/admin/

The development server proxies /api and /healthz to VITE_API_PROXY (default http://127.0.0.1:8080). Production is served under /admin/ on the same origin as the API and Auth UI by the reverse proxy.

For screenshots and state coverage without a live API:

# terminal 1: deterministic test-only fixture API
node tests/fixtures/mock-api.mjs # 127.0.0.1:8080

# terminal 2
npm run dev

Test-only scenario cookies (set through /__test/scenario?name=…) are ready, empty, forbidden, error, expired, conflict and slow. /__test/session?state=anon simulates an expired browser session. These routes exist only in the fixture server, never in the application.

Commands​

CommandPurpose
npm run devVite development server at /admin/
npm run buildProduction build
npm run typecheckStrict TypeScript (application and node configs)
npm run lintESLint
npm run format / format:checkPrettier
npm testVitest unit/component suite
npm run contract:generateRegenerate src/api/schema.d.ts
npm run contract:checkArtifact SHA/version/surface, referenced operations, stale generated types
node scripts/generate-response-validators.mjsRegenerate runtime validators
node scripts/generate-contract-matrix.mjsRefresh route/operation/capability evidence
npm run secrets:checkSecret scan
npm run licenses:check / deps:checkRuntime licence allowlist and lockfile hygiene
npm run version:checkVersion/provenance consistency
npm run gateComplete local gate (format, lint, typecheck, contract, version, secrets, licences, deps, tests, build)
npm run prechecksPre-commit gate: repository, design, hygiene, static, build, unit, audit and browser checks
npm run prechecks:fastQuick static iteration subset; not the pre-commit gate
npm run test:e2ePlaywright browser acceptance (after installing browsers)

Repository layout​

src/
app/ boot, providers, router, shell, navigation, appearance
api/ generated schema/types, typed transport, validators, endpoints
design-system/ tokens bridge, shared components, async boundaries, dialogs
features/ overview, search, catalog, corrections, quality, ingest, jobs,
storage, reports, access, devices, integrations, notifications,
legacy, system, settings, auth
shared/ formatters, status semantics, hooks, safe continuation, downloads
styles/ approved tokens.css and operations.css + additive app layer
test/ test render helper and jsdom setup
contracts/ pinned OpenAPI artifact, provenance, supplemental response schemas
design/ design kit, implementation decisions and acceptance evidence
docs/ operator, authentication, security, development and deployment docs
scripts/ contract/validator/matrix generation and repository gates
tests/ deterministic fixture API, visual scripts, disposable integration

Pre-commit quality gate​

Run scripts/do-prechecks.py before every commit. It runs the existing npm gates plus repository/design-input integrity, generated evidence freshness, source-level security rules, brand integrity, Python syntax, runtime dependency advisories and the Playwright suite, and reports one verdict.

npm run prechecks # full gate (installs no tools, writes no tracked files)
npm run prechecks:fast # quick static loop while editing
npm run prechecks:report # JSON verdict at .prechecks-report.json

Optional qualification suites are explicit:

python3 scripts/do-prechecks.py --with-integration
python3 scripts/do-prechecks.py --with-scale
python3 scripts/do-prechecks.py --with-visual # requires mock API + Vite running

To run it automatically on commit, opt in once:

git config core.hooksPath .githooks

The hook is .githooks/pre-commit. A skipped check is reported as a coverage gap and never counted as a pass. --fast and --only verdicts are deliberately labelled as non-completion runs. The gate needs Node per package.json engines, Python 3.11+, and Chromium (npx playwright install chromium) for the browser suite; --allow-missing-tools records a missing browser as a gap instead.

Contract pin and drift gate​

contracts/openapi/v1/openapi.json is vendored verbatim from the upstream commit. contracts/openapi/PROVENANCE.json records the commit, git blob, SHA-256, size, version and surface. The gate fails on artifact drift, missing inventory operations, a stale generated type file, version mismatch or a claimed publication/production state.

The artifact version discrepancy recorded by the design kit is resolved: the design kit recorded OpenAPI 1.0.0 with blob 83f7ea2bbf113a10ab1d6c9bba334416aaed7017; the current upstream commit ships the same blob and version. 1.6.2/1.8.0 were internal development revisions. The full reconciliation and unresolved gaps are in design/evidence/implementation/contract-gaps.md.

Security boundaries​

  • Browser authentication is an API-owned HttpOnly cookie with same-origin CSRF/origin enforcement. The application never stores a bearer token.
  • 403 is a permission state, 401 a session expiry, 404 a missing record. A 403 does not trigger a login loop.
  • One-time automation/compatibility secrets are shown once, held in component memory, removed from history state immediately and never written to storage, URLs, logs or analytics.
  • Each request path is constrained to /api/… (and /healthz); fetched artwork derivatives are content-type checked.
  • The API mount path is deliberately not displayed. Relative asset paths are displayed only as returned by the server.
  • No filesystem access, binary database payload, arbitrary upload path, direct file delete or worker control is implemented.

See docs/security.md, docs/authentication.md and docs/operations.md.

Screens and evidence​

The design kit contains 63 references: 61 route/action-state views, two design-only boards. The implementation covers every applicable product route; design-only boards are mapped to the shared components/state patterns rather than served as routes. Coverage, contract constraints and disabled states are recorded in:

Readiness and known blockers​

Implemented and independently exercisable with the deterministic fixture and test suite: shell/theme/responsive behaviour, catalog browse/detail, editorial locks/merge/split, corrections review/transfer, ingest enqueue and inbound browse, jobs/SSE/controls/schedules, storage volumes/assets/move/quarantine, reports and snapshots, accounts/capabilities/sessions, automation and compatibility credentials, provider circuits, notifications, legacy preview and system status.

Externally blocked or intentionally gated (see the contract-gaps document for exact evidence):

  • Auth UI does not accept an administration route as post-sign-in continuation.
  • Corrections import apply is disabled until preview semantics are published.
  • Artwork cache/derivative pruning is disabled until bounded request schemas are published.
  • Quality reassessment is disabled per-Track and as an undocumented global batch.
  • Artist, asset, merge-journal and owner-artwork reads are absent upstream; documented rehydration limits apply.
  • admin_providers has no enforcing operation in 1.0.0.
  • A production deployment, publication and independent security review are not authorized/performed here.

Outcome classification for the authorized scope: PARTIALLY COMPLETE — EXTERNAL BLOCKERS.