# CADDesigner React UI This directory contains the standalone TypeScript + React frontend for the CADDesigner project. ## What It Includes - A collapsible session sidebar with conversation stats and history - A left-side chat timeline that interleaves assistant text and tool calls in event order - A right-side workbench with a resizable 3D preview pane and code viewer - Native streaming from the backend `POST /v1/chat/events` SSE endpoint - A Vite dev proxy for `/health` and `/v1/*` ## Run It For the standard local workflow from the repo root, use the startup scripts: ```bash uv run python start_caddesigner_full.py ``` If you are working on the frontend itself, start the FastAPI backend first on `http://127.0.0.1:8000`, then run: ```bash pnpm install pnpm dev ``` The direct Vite dev server runs on `http://127.0.0.1:4173` by default. The wrapper script `start_caddesigner_ui.py` starts the same frontend on `http://127.0.0.1:7860` and auto-installs dependencies when `node_modules/` is missing. ## Build It ```bash pnpm build ``` ## Notes - `frontend/.gitignore` ignores local frontend build artifacts like `node_modules/` and `dist/`. - The startup scripts prefer `pnpm`; they fall back to `npm` only if `pnpm` is unavailable. - The current 3D viewport focuses on STL previews, which matches the agent's main output flow. - Model preview assets are loaded through the backend artifact endpoints added under `/v1/conversations/{conversation_id}/artifacts/*`.