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.

1.4 KiB

+++ title = "Implement ui/src/main.rs — Yew app shell, BrowserRouter, route definitions for all 5 pages" priority = 8 status = "todo" ticket_type = "task" dependencies = ["c3503b", "93515e", "dc3d2b"] +++

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.

The five frontend routes are:

  • / — Home (random quote)
  • /browse — Paginated quote list
  • /quotes/:id — Single quote view/edit/delete
  • /author/:name — All quotes by an author
  • /submit — New quote form
Implement `src/bin/ui/main.rs` — the Yew app shell and router: 1. Set up `BrowserRouter` (from yew-router) 2. Define a `Route` enum for all five routes 3. Render each route to its respective page component (stubs are fine initially) 4. Mount the app to the `#app` div in `index.html` - Resolve TRIAGE ticket 166996 (Yew/yew-router version) before starting. - The `Route` enum must be exhaustive — all five routes listed above. - Page components can be stubs (`html! {

"Home"

}`) in this ticket; full implementation is in separate tickets. From the `quotesdb/` directory:
trunk build
`feat(quotesdb): implement Yew app shell and BrowserRouter with all 5 routes`