Problem
SSR currently requires developers to manually construct the HTML shell — doctype, head, meta tags, OG tags, scripts, styles. This is boilerplate that should be handled by the framework.
See the current Cloudflare example (examples/ssr-cloudflare/src/app.ts) — 50+ lines of raw HTML string.
Solution
renderPage(component, options?) in @vertz/ui-server that returns a complete Response:
renderPage(App, {
title: 'My App',
og: { image: '/og.png' },
scripts: ['/app.js'],
})
Two-layer API:
renderPage → returns Response (90% of cases)
renderToStream → returns ReadableStream (escape hatch for custom headers)
Design Doc
See plans/render-page.md
Blocks
Problem
SSR currently requires developers to manually construct the HTML shell — doctype, head, meta tags, OG tags, scripts, styles. This is boilerplate that should be handled by the framework.
See the current Cloudflare example (
examples/ssr-cloudflare/src/app.ts) — 50+ lines of raw HTML string.Solution
renderPage(component, options?)in@vertz/ui-serverthat returns a completeResponse:Two-layer API:
renderPage→ returns Response (90% of cases)renderToStream→ returns ReadableStream (escape hatch for custom headers)Design Doc
See
plans/render-page.mdBlocks