Data Flow
Frontend data in Vext starts on the server. Route handlers call services, prepare JSON-safe values, and pass them into res.render().
First-screen Data
The page receives the same object during SSR and hydration:
Layout Data
Use options.layoutData for shell-level data such as navigation, user menus, workspace metadata, or admin permissions:
Layouts do not import services directly. They consume data passed by the route handler.
Locale Messages
Page copy comes from src/frontend/locales/** and optional render messages:
Client code reads a typed object:
Client API Calls
After hydration, use plain fetch for normal API calls. Generated API client artifacts are available for tooling or external frontend adapters, but first-screen data should normally flow through res.render().
Cache Boundary
Cache render payloads with route response cache when the server data can be reused. Do not add a separate browser data cache until a page actually needs client-side refetching.