feat: implement new feature for enhanced user experience

This commit is contained in:
2026-02-11 16:36:56 +00:00
parent 62f1906276
commit dc00d24899
75 changed files with 2456 additions and 35 deletions

View File

@@ -0,0 +1,12 @@
---
name: SSR
description: Server-side rendering flow and caching.
applyTo: "api/hooks/ssr/**"
---
# SSR and Caching
- SSR request flow: `api/hooks/ssr/get_read.js` calls `api/hooks/lib/ssr-server.js` and injects `window.__SSR_CACHE__` used by `api/hooks/lib/ssr.js` on the client.
- SSR cache HTML is stored in the `ssr` collection.
- SSR builds output to `api/hooks/lib/app.server.js` via `yarn build:server`.
- SSR route validation is currently disabled and returns -1 in `api/hooks/config.js`; update this when enabling SSR per route.