nanobot/webui/README.md

1.0 KiB

nanobot webui

The browser front-end for nanobot web. Built with Vite + React 18 + TypeScript + Tailwind 3 + shadcn/ui. Talks to the gateway over the WebSocket multiplex protocol; session metadata comes from the embedded REST surface on the same port.

Layout

webui/                 source tree (this directory)
nanobot/web/dist/      build output, shipped in the Python wheel

Develop

cd webui
bun install            # npm install also works
bun run dev            # http://127.0.0.1:5173 (proxies /api /webui /auth -> 8765)

In a separate shell, start the gateway with the WebSocket channel:

uv run nanobot gateway        # or `nanobot web` once you've built once

If the gateway listens on a non-default port, point the dev server at it:

NANOBOT_API_URL=http://127.0.0.1:9000 bun run dev

Build

bun run build   # writes ../nanobot/web/dist (consumed by `nanobot web`)

Test

bun run test    # vitest, jsdom-style happy-dom environment