Skip to content

UI configuration

Runtime config (one image for every environment)

The Tellyboard container does not bake addresses into the bundle. At start it writes /tellyboard/env-config.js from its own environment (docker/40-runtime-env.sh), and the app reads it through one file, src/config/env.js:

  1. window.__ENV__ (from env-config.js), then
  2. the build-time import.meta.env (a .env file for npm run dev; the placeholder public/env-config.js leaves window.__ENV__ empty).

Every other file imports its variables from env.js; none reads import.meta.env directly.

Variable Meaning
VITE_TELLYID_URL TellyID (sign-in) address
VITE_AUTH_URL AuthAPI address; CI sets it equal to VITE_TELLYID_URL and the script falls back to it
VITE_CORE_API_URL CoreAPI address
VITE_MEDIA_PROXY_URL, VITE_CDN_HOST where media and artwork are served from
VITE_MQTT_HOST, VITE_MQTT_PORT, VITE_MQTT_PATH, VITE_MQTT_USE_SSL MQTT broker (WebSocket) for live control
VITE_MQTT_USER, VITE_MQTT_PASSWORD MQTT login. The password is treated as a secret key by the script. Keep real values in the deployment's ConfigMap or secret, never in the repo

Where requests go

The app calls same-origin paths; nginx proxies them (nginx.conf.template):

Path Goes to
/tellyboard/api/auth/ AuthAPI (${AUTHAPI_URL}/api/v1/), cookies passed through
/tellyboard/api/ CoreAPI (${COREAPI_URL}/api/v1/)
/tusd/ the upload server (${TUSD_URL})
/tellyboard/env-config.js the generated config
everything under /tellyboard the single page app (try_files ... /tellyboard/index.html)

src/utils/api.js uses API_BASE_URL = '/tellyboard/api'. For local work, vite.config.js proxies /api and /auth to local services.

Leftovers to clean up

vite.config.js has a hard-coded dev host (tellyboard.poc.castis.io) and Schedule.jsx a hard-coded STATIC_URL. They should come from the runtime config.

Build and styling configuration

File What it configures
vite.config.js dev server, proxy, @ alias for src/
tailwind.config.js content paths, fonts (font-sans Hanken Grotesk, font-mono IBM Plex Mono), the shadcn colour names mapped to hsl(var(--...))
src/index.css @import "tailwindcss", the dark variant (.dark), the raw HSL tokens, the --c-* aliases, font imports
design-tokens/sd.config.js the Style Dictionary build of @playtelly/design-tokens
.npmrc the @playtelly registry (nexus.castis.io/repository/npm-hosted/)

Tailwind 4 is used through @tailwindcss/vite; there is no PostCSS config to maintain.

User preferences (stored in the browser)

Key What Where it is set
content_theme_preference light, dark or auto (adds the dark class on <html>) Preferences
sidebar_theme sidebar dark or light Settings, Preferences
ui_prefs density (comfortable), language (en), dateFormat (DD/MM/YYYY), timeFormat (24h) Preferences

The side navigation is data: tellyboardNav.js (items grouped as Operations, Programming, Media Network ...) and cmsNav.js. Add a page by adding the route in App.jsx and an item there. Routes today include /campaigns, /schedule, /addschedule, /playlist, /channel (feeds), /screentab, /live-control.