Problem
Library and author routes currently use opaque IDs. Human-readable URLs would make shared links easier to understand, but title and author strings are mutable and non-unique.
Scope
- Keep the existing stable identifier authoritative.
- Add an optional human-readable slug derived from the current title for books and author name for authors.
- Use URL shapes that retain the stable ID, such as
/library/books/{id}-{slug} and /library/authors/{id}-{slug}.
- Redirect obsolete, missing, or malformed slugs to the canonical URL without breaking existing ID-only links.
- Define normalization, Unicode, punctuation, collision, and title/author-change behavior.
- Consider SEO only after confirming the privacy model and whether pages are intentionally public; this work is primarily for human-readable navigation.
Acceptance criteria
- Existing links continue to work.
- Two books or authors with identical names remain unambiguous.
- Renaming/correcting a title or author does not invalidate old links.
- Canonical links are used consistently in navigation and page metadata where applicable.
- Tests cover slug generation, canonicalization, and redirects.
Problem
Library and author routes currently use opaque IDs. Human-readable URLs would make shared links easier to understand, but title and author strings are mutable and non-unique.
Scope
/library/books/{id}-{slug}and/library/authors/{id}-{slug}.Acceptance criteria