The OTAS frontend is a Vite-built React application that reads all backend URLs from a single file: frontend/otas-frontend/src/constants.ts. There is no runtime environment variable injection — the constants are compiled into the bundle at build time for the production Docker image and read directly from the source file during npm run dev. Update these values whenever your services are not on the default localhost ports.
Constants reference
// frontend/otas-frontend/src/constants.ts
export const ENV = "DEV";
export const UASAM_ENDPOINT = "http://localhost:8000";
/** Event capture & analytics (path-timeseries, session events). */
export const BRAIN_ENDPOINT = "http://localhost:8002";
export const GOVERNOR_ENDPOINT = "http://localhost:8008";
| Constant | Default | Purpose |
|---|
UASAM_ENDPOINT | http://localhost:8000 | Base URL for all user, project, and agent management API calls |
BRAIN_ENDPOINT | http://localhost:8002 | Base URL for event capture logging and all analytics endpoints |
GOVERNOR_ENDPOINT | http://localhost:8008 | Reserved for future use; not currently called by the dashboard |
All other endpoint constants in the file are built by appending path segments to these three base URLs. Changing a base URL constant automatically updates every derived endpoint.
Applying changes
After editing constants.ts, restart the Vite dev server to pick up the new values:
cd frontend/otas-frontend
npm run dev
If you are using the frontend Docker Compose image, rebuild the image so the new values are compiled into the bundle:
cd frontend/docker-compose
docker-compose -f docker-compose-local.yml up --build
Do not commit production URLs, tokens, or credentials to source control. For staging and production deployments, inject endpoint values via a build-time environment variable substitution step or a CI/CD secret rather than hardcoding them in constants.ts.
Example: custom host configuration
If UASAM runs on an internal hostname and Brain is on a separate server, update the two base constants accordingly:
export const UASAM_ENDPOINT = "http://uasam.internal:8000";
export const BRAIN_ENDPOINT = "http://brain.internal:8002";
export const GOVERNOR_ENDPOINT = "http://localhost:8008"; // unchanged
No other changes are needed — all derived endpoint constants update automatically.