WebUI#
The web interface for the CLP package, which currently consists of a React client and a Fastify server. It also serves the log viewer.
Requirements#
Node.js v22 or higher
(Optional) nvm (Node Version Manager) to manage different versions of Node.js
Setup#
Download the log-viewer’s source code:
task deps:yscope-log-viewerInstall the app’s dependencies:
cd components/webui pnpm install
If you add a package manually to
package.jsonorpackage.jsonchanges for some other reason, you should rerun the commands above.
Configuration#
The WebUI’s runtime configuration lives in two places under components/webui/:
settings.json— the non-secret runtime settings. It has apublicsection (served to the browser) and aserversection (server-only). The browser only ever receives thepublicsection, so never put secrets here..envand.env.local— process environment values and secrets..env.localoverrides.env. Secrets stay here, never insettings.json.
Running#
To run both the client and server during development:
cd components/webui pnpm run dev
Or run only the client:
cd components/webui pnpm --filter @webui/client run dev
Or run only the server:
cd components/webui pnpm --filter @webui/server run dev
To customize the host and port the server binds to, or to configure secrets, copy
.envto.env.localand update the values there. Settings in.env.localoverride those in.env.
Linting#
To check for linting errors:
task lint:check-js
To also fix linting errors (if applicable):
task lint:fix-js