ROADMAP — Shared Libraries & Public Discovery
Objective: make public libraries first-class, discoverable, indexable, and compatible with the multi-library roadmap.
Execution spec for canonical URLs, social metadata, JSON-LD/markdown, MCP listing, and dynamic OG: Public Libraries MCP JSON-LD PRD.
Principles
/librarywithout authentication should show a public directory, not a login wall- zero server function dependency for public pages where possible
- each feature should ship independently
- URL decisions must stay compatible with the multi-library schema migration
Progress
| Feature | Status |
|---|---|
| OwnerAvatar fallback | Complete |
| View counter | Not started |
Canonical /l/{token} + social JSON-LD | Complete (thin Phase 1 — static OG card) |
| Dynamic OG image per library | Deferred (netlify/deferred/library-og.mts) |
Public directory at /library | Complete — anonymous /library lists publics; dedicated /libraries removed (debug: /debug/libraries) |
| Library cards | Complete (PublicLibraryCard) |
Semantic URLs /library/[username] | Not started (later alias; canonical /l/{token} is shipped) |
Feature 0 — OwnerAvatar fallback
Completed:
- created reusable
OwnerAvatarcomponent - fallback to initials on broken or missing avatar URLs
- replaced raw avatar rendering in library and auth surfaces
- avoided
next/imagebecause UI fallback requires direct error-driven re-rendering
Feature 1 — View counter
Plan:
- add
view_countto library/public profile data - create a secure increment RPC
- record one view per session per shared library
- expose counts in owner and public views
Feature 2 — Public directory at /library
Plan:
- return public library summaries for anonymous visitors
- likely replace the existing anonymous login wall directly on
/library - order results by views or recency
- preserve the owner experience for authenticated users
Feature 3 — Library cards
Plan:
- reusable
PublicLibraryCard - title, description, author, pattern count, and view count
- reuse
OwnerAvatar - support empty and skeleton states
Feature 4 — Semantic URLs
Plan:
/library-> directory/library/[username]-> default public library/library/[username]/[slug]-> specific library in multi-library phase- keep
?token=URLs working through redirects during migration - Public Libraries PRD uses
/l/{share_token}as the canonical path so this username route can alias later without colliding with tokens
Feature 5 — Dynamic OG + canonical social URLs
Completed:
- canonical share URL
/l/{share_token}(clipboard +og:url) - always-200 HTML for every UA: owner title/description, JSON-LD Collection/ItemList,
index,follow - markdown
Accept: text/markdownon/l/{token} - share cards use static
/og-library.png(per-library branded PNG deferred) - runtime sitemap
/sitemap-libraries.xml(no site rebuild on library save) robots.txtallows/l/; owner/librarystaysnoindex(static CDN, no Edge)
See Public Libraries PRD Phase 1.
Dependency
Username /library/[username] URLs depend on unique handles and, for multi-library slugs, the libraries table migration. Canonical /l/{share_token} in the Public Libraries PRD does not wait on that migration.