You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
2.9 KiB
2.9 KiB
| title | status | type | priority | created_at | updated_at | blocked_by | ||
|---|---|---|---|---|---|---|---|---|
| Set up ui/Trunk.toml and ui/index.html — build configuration and Wasm entry point | completed | task | critical | 2026-03-10T23:32:11Z | 2026-03-10T23:32:19Z |
|
Verify trunk build succeeds.
- CSS file lives at
src/bin/ui/style.css - Linked in index.html as:
<link data-trunk rel="css" href="src/bin/ui/style.css"/> - Naming convention: BEM-style —
quote-card,quote-card__text,page-browse, etc. - No CDN Tailwind (incompatible with Wasm class-name scanning), no Rust CSS-in-Wasm crate.
- The actual CSS content is implemented in ticket bb1514.
During trunk serve, Trunk's built-in proxy forwards all /api/* requests to the local API server.
The API server runs on localhost:3000 during local development (plain Axum/Tokio — not wrangler dev).
No CORS headers are needed anywhere; the proxy makes API calls appear same-origin.
Add this block to Trunk.toml:
[[proxy]]
rewrite = "/api"
backend = "http://localhost:3000"
This means:
trunk servelistens onlocalhost:8080(default)- Browser requests to
http://localhost:8080/api/quotesare transparently proxied tohttp://localhost:3000/api/quotes - In production (Cloudflare Pages + Workers),
/api/*routes to the Worker via Cloudflare's routing — same path prefix, no code change needed
` mount point for the Yew app.
- Trunk.toml `target` must point to `index.html`.
- The `proxy` block must appear in `Trunk.toml` (not `Trunk.toml.dev` or elsewhere).
- Do NOT remove or overwrite the `` line
added by ticket 9ef703 — that line must remain in `index.html`.
From the `quotesdb/` directory:
trunk build
`chore(quotesdb): set up Trunk.toml and index.html for UI build`