Skip to content

Asset routes

A small fixed set of static assets is served directly by the gateway, not through any package's asset endpoint. These are platform-level branding files.

The reserved set

Per isBrandingAssetPath in projects/matrix-3/packages/system-gateway-http/src/http-listener.ts:215-217:

typescript
function isBrandingAssetPath(pathname: string): boolean {
  return pathname === '/favicon.ico'
      || pathname === '/manifest.json'
      || pathname.startsWith('/branding/');
}

The set is:

PathPurpose
/favicon.icoBrowser tab icon
/manifest.jsonPWA manifest
/branding/*Logos, theme assets, OG images

Why these are special

Three reasons they bypass the route resolver:

  1. Browsers fetch them automatically. A favicon request fires on every page load even before the bootstrap. It must work without authentication and without route resolution overhead.
  2. They are deployment-level. The same favicon is served regardless of which app the user is viewing. Per-app favicon would be misleading.
  3. They live in the Host home, not in any package. The deploy step places them under <host-home>/branding/ (and <host-home>/favicon.ico, <host-home>/manifest.json).

Where the bytes come from

hivecast install copies branding assets from the wrapper's bundled dist/branding/ to <host-home>/branding/:

js
// projects/matrix-3/packages/hivecast/bin/hivecast.mjs (excerpt)
copyDirIfPresent(join(distDir, 'branding'), join(matrixHome, 'branding'));

The handler onBrandingAsset in host-http-runtime.ts reads from <host-home>/branding/ (or <host-home>/favicon.ico, <host-home>/manifest.json) directly.

Customization

Operators can replace the bundled branding by overwriting files in <host-home>/branding/ after install. There is no admin UI for branding configuration today; it is a filesystem operation.

What is NOT a branding asset

The gateway does not serve any other static files at the root level. Things like:

  • /robots.txt — not handled today; requests fall through to 404.
  • /.well-known/... — Caddy redirects this to hivecast.ai in production (see projects/deploy-cloud/Caddyfile.bare); locally, 404.
  • App-specific images, icons, fonts — those live in the app's dist/browser/ and are served via /apps/<appName>/....

See also

Source: projects/matrix-3/packages/system-gateway-http/src/http-listener.ts:147-150, projects/matrix-3/packages/system-gateway-http/src/http-listener.ts:215-217.