Skip to content

feat(frontend): prerender public pages with seo and ai crawler metadata - #164

Merged
kymanirjarrett merged 2 commits into
mainfrom
feat/163-prerender-seo
Nov 30, 2026
Merged

kymanirjarrett merged 2 commits into
mainfrom
feat/163-prerender-seo

Conversation

@kymanirjarrett

Copy link
Copy Markdown
Owner

Closes #163

AI assistants' crawlers (and most non-Google bots) read only the raw HTML. Until now every page shipped an empty <body>, so they saw only the title and one-line description.

  • Prerendering: @angular/ssr in outputMode: static. The landing, login, signup, and forgot-password pages are rendered to HTML at build time and still served as static files on Vercel; there's no server. The signed-in app and the reset link stay client-rendered. Client hydration is off, so the signed-in nav can differ from the prerendered HTML without hydration errors; Angular renders over the same markup.
  • Vercel: the SPA fallback now points at index.csr.html (Angular's docs for static output), because index.html is now the prerendered landing page.
  • Startup: the API warm-up ping and session restore run only in the browser.
  • Metadata: per-page description, canonical link, and Open Graph and Twitter tags (core/seo.ts, from route data), plus JSON-LD (WebApplication) and Open Graph site tags in index.html.
  • Crawler files: a real robots.txt that allows all crawlers on public pages and disallows /app, /reset-password, and /api/, plus a sitemap.xml. Before this, both URLs returned the app's HTML.
  • Dependencies: @angular/ssr and @angular/platform-server (Angular's own packages). The scaffold's Express server was removed.

Checked: the built index.html contains the landing copy ("Understand the fine print…", "Eight places contracts hide risk"), its description, canonical, OG tags, and JSON-LD. login/index.html has its own title and canonical. Frontend 74/74, and the dev server serves the prerendered landing page, which works in the browser.

@kymanirjarrett
kymanirjarrett merged commit 8649ace into main Nov 30, 2026
6 checks passed
@kymanirjarrett
kymanirjarrett deleted the feat/163-prerender-seo branch November 30, 2026 21:22
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.

Prerender public pages and add SEO and AI-crawler metadata

1 participant