webdev-ssr-conversion

Convert a React 19 + Vite + Express + tRPC SPA into a server-side rendered app with per-route SEO meta tags.

1|Updated Jul 17, 2026
One-click install
npx skills add https://github.com/waiyanphyo999/telegram-bot-deploy --skill webdev-ssr-conversion-waiyanphyo999
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: webdev-ssr-conversion
Source: https://github.com/waiyanphyo999/telegram-bot-deploy/tree/main/skills/webdev-ssr-conversion
Command: npx skills add https://github.com/waiyanphyo999/telegram-bot-deploy --skill webdev-ssr-conversion-waiyanphyo999

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve? Client-rendered single-page apps built on the Manus web-db-user template serve an empty HTML shell to crawlers and social scrapers, so pages get no search indexing and no link-preview cards. This Skill converts that template into a server-side rendered app so crawlers receive fully populated first-paint HTML with correct per-route titles, meta tags, canonical URLs, and real 404 status codes. ## Core Features & Use Cases - Full SSR conversion checklist: Split the app into entry-server/entry-client, prefetch tRPC queries into a dehydrated TanStack Query cache, and wire Express to render and inject head tags per route. - SEO parity built in: Per-route title, description, Open Graph, Twitter Card, canonical links, noindex handling for gated routes, and real 404 responses for missing slugs. - Pitfall-driven debugging: A references playbook and pitfalls guide covering hydration mismatches, browser-global crashes, build configuration, and caching hazards, plus a verify-ssr.sh crawler test harness. - Use Case: A law-firm site built on the template needs Google to index its news articles and WeChat to render share cards; follow the checklist to add SSR, then run the verification script to confirm every route returns correct status, content, and meta tags. ## Quick Start Ask the AI to convert your Manus web-db-user template project to server-side rendering so crawlers can see the page content and meta tags.

Frequently Asked Questions about webdev-ssr-conversion

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add SSR to a React + Vite + tRPC app?

Split the app into entry-server.tsx (renderToString with prefetched queries) and entry-client.tsx (hydrateRoot with HydrationBoundary), then have Express render each route and inject per-route head tags and dehydrated state into the HTML template. The Skill provides a step-by-step checklist and full annotated source for every file.

Why do crawlers see an empty page on my Vite React SPA?

Client-rendered SPAs serve an empty div and rely on JavaScript to render content, which crawlers that do not execute JS never see. Server-side rendering produces the full HTML on the server with data already fetched, so crawlers and social scrapers receive populated first-paint markup.

Does this SSR conversion work with Next.js or Remix apps?

No. The conversion targets only the Manus web-db-user template stack: React 19, Vite 7, Express 4, tRPC 11, wouter, TanStack Query 5, and superjson. Next.js, Remix, and Astro already render on the server and need no conversion.

Why does SSR fail with 'window is not defined'?

Browser globals like window, document, and localStorage are undefined in Node, so any access on the render path crashes the server render. Guard app code with typeof window checks, and keep dependencies that touch browser globals at module scope out of the server import graph via lazy loading or client gating.

Why does my SSR page flash or refetch after hydration?

The prefetched query key must exactly match the component's useQuery key, including input shape and types, and the client QueryClient needs a staleTime so hydrated data is not instantly stale. Also deserialize the embedded state with superjson before passing it to HydrationBoundary.

When should a route return 404 instead of the SPA shell?

Only a genuine miss, such as a null result or a NOT_FOUND error from the procedure, may return 404 with noindex. Transient backend errors must degrade to the 200 shell, or search engines will deindex real pages during outages.