Skip to content

Serve /apps/:slug instead of /apps/:id - #99

Merged
v0l merged 2 commits into
mainfrom
feat/apps-by-slug
Jul 30, 2026
Merged

Serve /apps/:slug instead of /apps/:id#99
v0l merged 2 commits into
mainfrom
feat/apps-by-slug

Conversation

@v0l

@v0l v0l commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Closes #94.

No backend change needed — ApiApp.name (lnvps_api/src/api/apps.rs:65) is already documented as the URL/DNS-safe slug; the frontend just never used it as the route param.

  • src/routes.tsx/apps/:id/apps/:slug.
  • src/loaders.ts appLoader — no by-slug endpoint, so it reads the same public catalog appsLoader/homeLoader already fetch and cache (listApps()), and finds the row by name. One less endpoint hit than before, not one more.
  • src/pages/app.tsx — the client-side refresh effect needed the numeric id for getApp/deployment filtering; now reads it off the loader's already-resolved app.id instead of re-parsing the URL param. Canonical URL uses the slug.
  • src/utils/app-seo.ts appJsonLd, src/pages/account-apps.tsx AppCard, src/pages/blossom-server-hosting.tsx's CTA — all three build the app URL off app.name now instead of app.id/BlossomAppId.
  • server/gen-sitemap.ts — easy to miss since it's outside src/: fetches the raw catalog itself for the sitemap, was pulling .id. bun run build's generated sitemap.xml confirmed slug-based, not stale.

Verified server-rendered, not just the build: curl on /apps/strfry and /apps/route96 — real <title>, <h1>, canonical <link> and JSON-LD url, all slug-based. /apps listing's card links and the Blossom CTA both point at the new URLs.

One thing to flag, not decided here: old numeric URLs (/apps/2) now resolve to the same empty/noindex state as any unknown id — no redirect to the slug. If any of these are already indexed or linked externally, that's lost link equity until re-crawled. Didn't add a redirect since the issue didn't ask for one and I don't know if these URLs have any real backlinks yet.

bun test 45 pass (incl. a new appJsonLd test and updated gen-sitemap fixtures), tsc --noEmit clean, build clean at d830c60.

v0l added 2 commits July 30, 2026 20:59
@v0l
v0l merged commit 557d2b9 into main Jul 30, 2026
3 checks passed
@v0l
v0l deleted the feat/apps-by-slug branch July 30, 2026 20:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Serve apps by slug

1 participant