1.8 KiB
1.8 KiB
0026 The landing is prerendered and revalidated
Status: Accepted · Area: architecture · Date: 2026-10-07 · Decided by: user
Context
/ became the guest landing (design, Oct 2026). It changes rarely, reads no session, and its only live data is the featured analysts. The skill renders every page fresh per request with no server cache, and both root layouts declared dynamic = 'force-dynamic', which made any static page impossible.
Decision
(landing)/page.tsxin bull and bear declaresdynamic = 'force-static'andrevalidate = 600: the page is prerendered and its featured analysts are read again every 10 minutes.force-dynamicmoves from the root layouts to each route group's layout ((main),(auth),(flow),(onboarding)), so every other route still renders fresh per request.- A failed read of the featured analysts (
loadLandingPage) hides their section duringnext build(the app passesNEXT_PHASEfrom its server env), so the build never depends on the API; at a revalidation it throws, so Next keeps serving the last good page.
Alternatives
- Render it fresh per request like every other page: rejected by the user; the page is the same for everyone and rarely changes.
- Static with no revalidation: rejected; the featured analysts are live.
Consequences
- An exception to the skill's "no server cache" and "fresh page per request" rules, for
/only. The response carriess-maxage=600, so a CDN may cache it too. - A new route group must declare
force-dynamicin its own layout; the root layout no longer does. The rootnot-foundpage is now static. - A page built while the API was down has no analysts section until the first successful revalidation.
- The
landingnamespace is server-only (SERVER_RESOURCES), added to the i18n instance by each app's server bootstrap, so no client bundle carries it.