# Apex Agent Console Independent Vue 3 + Vite SPA for the operator console. ## Run Locally Start the backend from the repository root: ```bash uvicorn api.rest:create_app --factory --host 127.0.0.1 --port 8000 ``` Start the frontend from this directory: ```bash npm install npm run dev ``` The frontend reads `VITE_API_BASE_URL` and defaults to `http://127.0.0.1:8000`. Copy `.env.example` to `.env.local` if the backend runs on another host or port. The backend mounts `/console/*` routes and enables permissive CORS in `create_app()` for local frontend development. ## Build ```bash npm run build ``` ## Same-Origin, Single-Process Mode For an edge/dev setup where running a separate `npm run dev` process is too heavy, the backend can serve the built console directly from the same process: ```bash VITE_API_BASE_URL= npm run build RUNTIME_CONSOLE_STATIC_DIR=$(pwd)/dist uvicorn api.rest:create_app --factory --host 127.0.0.1 --port 8000 ``` `VITE_API_BASE_URL=` (empty) makes the build use relative API paths so it works same-origin without CORS. The console is then served at `/ui/` (with `/` redirecting there); `/console/*` remains the JSON API used by both this mode and local `npm run dev`. Rebuild (`npm run build`) after frontend changes — this mode does not hot-reload.