+++ title = "Set up ui/Trunk.toml and ui/index.html — build configuration and Wasm entry point" priority = 8 status = "todo" ticket_type = "task" dependencies = ["c3503b", "a9534d"] +++ The `quotesdb` UI is a Yew (Rust → Wasm) single-page app compiled by Trunk and hosted on Cloudflare Pages. It communicates with the backend API via `fetch` calls. Source lives in `src/bin/ui/`. Run with `trunk serve` for local development. Create `Trunk.toml` and `index.html` in the `quotesdb/` root (not `src/bin/ui/`): 1. `Trunk.toml` must specify `--bin ui` so Trunk compiles the `ui` binary, not the default `api` binary 2. `index.html` is the Trunk HTML entry point — it should `` to compiled CSS and include the Wasm loader script tag Verify `trunk serve` starts successfully. - Resolve TRIAGE ticket 5e3e37 (CSS approach) before adding stylesheet links. - The `Trunk.toml` `[build.cargo]` section must set `args = ["--bin", "ui"]`. - `index.html` must include a `
` mount point for the Yew app. From the `quotesdb/` directory: ```sh trunk build ``` `chore(quotesdb): set up Trunk.toml and index.html for UI build`