Skip to content

Routes

Production routes (gateway-served)

PathWhat
/apps/director/Director's index.html (entrypoint).
/apps/director/index.ts (build path) → /apps/director/assets/<chunk>.jsThe bundled main script.
/apps/director/assets/<surface-chunk>.jsThe lazy-loaded chat-component surface chunk emitted by Vite when Director is built.
/branding/favicon.svgFavicon. Served by gateway from the host root.
/manifest.jsonWeb-manifest, served by gateway from the host root.

webapp.routePrefix is not set in director/matrix.json directly; the Host gateway uses webapp.appName (director) to derive /apps/director/. The base for asset URLs is set by Vite (vite.config.ts:12):

ts
base: '/apps/director/'

Director runs on both shells:

json
"shells": ["platform", "edge"]

So both https://hivecast.ai/apps/director/ (platform) and http://127.0.0.1:3100/apps/edge/-derived bindings resolve.

Dev routes (pnpm dev)

Vite serves on http://localhost:5173/ (default). The proxy targets in vite.config.ts:46-55:

/.matrix    → MATRIX_DAEMON_ORIGIN
/api        → MATRIX_DAEMON_ORIGIN
/auth       → MATRIX_DAEMON_ORIGIN
/login      → MATRIX_DAEMON_ORIGIN
/logout     → MATRIX_DAEMON_ORIGIN
/healthz    → MATRIX_DAEMON_ORIGIN
/nats-ws    → MATRIX_DAEMON_ORIGIN  (WebSocket upgrade)

MATRIX_DAEMON_ORIGIN defaults to http://127.0.0.1:3100.

Bootstrap contract

The page expects the gateway to serve <matrix-dsl-host bootstrap-mode="hosted" url-params> (src/index.html:50-55) which:

  1. Performs the bootstrap request against the gateway.
  2. Sets data-status="connected" once the WebSocket-NATS transport is up.
  3. Populates host.getAttribute('root'), host.dataset.addressRoot, host.dataset.runtimeTargetRoot.

If the gateway path is broken, Director stays at the loading screen forever. There is no fallback bootstrap.

URL params

<matrix-dsl-host url-params> opts in to URL-driven routing. Director uses ?session=<id>, ?mount=<canonicalMount>, ?surface=<explorer|workstreams|ops|search> — these are read by DirectorApp and turned into the corresponding director.* ops on first load.

MatrixAppReadyDetail (from monitorMatrixAppReady) is dispatched via matrix-app-ready once the page is readinessLevel: 'shell'.

See also

Source: projects/matrix-3/packages/director/matrix.json, vite.config.ts, src/index.html, src/index.ts:74-114.