cmvr-visual/docs/implementation-plan.md

2.6 KiB

CMVR Visual Implementation Plan

Goal: Deliver the requested Vue3/Element Plus/Pinia and FastAPI/MySQL creative studio connected to the server's real inference queue.

Architecture: Same-origin HTTP plus durable authenticated SSE; business data in MySQL; original upstream worker remains the only GPU executor. Production web CPU containers share the isolated workspace and a private Docker network with the inference container. Local test databases require explicit mode.

Spec: docs/design.md, shared interfaces docs/api-contract.md.

Constraints and review focus

  • Preserve existing GPU priority, serial execution, services and confinement. No database-wide deletion, driver changes, global Docker/systemd restart or public publication.
  • Credentials absent from source and browser; session/owner/CSRF checks protect every mutation/content stream.
  • Persist immutable upstream request/key before dispatch. No duplicate inference after timeout/restart; no job replay after known upstream ID.
  • Preserve running→queued preemption, cancellation races, idempotent output import and event ordering.
  • Only genuine capabilities and samples; five-second video limit, no defect mask claim, no synthetic GPU percentages.
  • Detached SSE must not hold transactions or cancel inference. Reconnection uses event cursor and HTTP reconciliation.

Implementation

  • Backend core: write failing auth/ownership/jobs/event recovery tests; implement MySQL/explicit SQLite config, schema, auth, asset storage, job coordinator and SSE. Prove negative access and upstream lifecycle transitions.
  • Providers: test actual parameter/path validation, HTTP boundary, safe subprocess and output handling; implement existing GPU API adapter, Qwen math/vision, CPU FFmpeg analysis/composition, bounded file probing and optional speech provider.
  • Frontend: implement shared DTOs and HTTP client, cookie/CSRF flow, Pinia versioned job/SSE store, creation forms, real asset previews/library, task center and composition. Test requeue/version handling; build/typecheck.
  • Integration: install isolated dependencies, verify OpenAPI/schema contract, run tests and MySQL connectivity if credentials arrive, package private-network deployment and environment examples. Do not auto-switch DB on failure.
  • Visual and live verification: run browser, inspect desktop/mobile layouts and actual actions; perform real image/ASR or CPU generation against the model host without interrupting existing users. Record any capability or credential blocker honestly.
  • Deliver source, setup guide, communication recommendation, verified URLs and acceptance report.