@remavideo/dashboard
v0.6.0
Published
`@remavideo/dashboard` ships its built static SPA (`dist/`) alongside two framework adapters that mount it under a sub-path of an existing server, in-process — no iframe, no separate origin.
Downloads
764
Readme
Embedding the dashboard in a host server
@remavideo/dashboard ships its built static SPA (dist/) alongside two
framework adapters that mount it under a sub-path of an existing server,
in-process — no iframe, no separate origin.
import { Hono } from "hono";
import { mountRemaDashboard } from "@remavideo/dashboard/hono";
const app = new Hono();
mountRemaDashboard(app, {
basePath: "/dashboard",
serverUrl: "https://my-rema-server.example.com",
});import express from "express";
import { mountRemaDashboard } from "@remavideo/dashboard/express";
const app = express();
mountRemaDashboard(app, {
basePath: "/dashboard",
serverUrl: "https://my-rema-server.example.com",
});serverUrl and basePath are injected into the served index.html at
request time (window.__REMA_RUNTIME__), so a single published dashboard
version can be mounted by many host apps, each pointed at a different rema
server, without rebuilding.
Pass showForceCloseWorkflow: true to show a "Force Close" button on the
pipeline page that tears down every node in a workflow after a confirmation
dialog. It defaults to false (hidden) since closing a workflow this way
cannot be undone. When running the dashboard standalone (not embedded via
mountRemaDashboard), set VITE_REMA_SHOW_FORCE_CLOSE_WORKFLOW=true at
build/dev time instead — see .env.example.
Limitations
- CORS: the dashboard's tRPC/WebSocket client connects to
serverUrldirectly from the browser — it is not proxied through the host app. The rema server must allow the origin the host app is served from (seecors()inservices/server/src/http/server.ts). - No auth pass-through: the host app's own session/auth has no mechanism to flow into the dashboard's connection to the rema server. If the rema server requires auth, that's currently unsolved.
- Path collisions: pick a
basePathnot already served by the host app's own routes;mountRemaDashboardregisters a catch-all route under that prefix. - Version coupling:
@remavideo/dashboardversions independently of@remavideo/server(it is not in the Changesets fixed group), so there is no automatic compatibility check between a dashboard version and the rema server it's pointed at. Pin a dashboard version known to work with your server version.
