Quasar SSR Development
Use this skill with quasar-development for shared application concerns.
Establish the SSR boundary
- Inspect
quasar.config.* > ssr,src-ssr/, boot files, routes, stores, and the selected webserver. - Read the current Quasar SSR documentation.
- Add the mode with
quasar mode add ssr; honor the project's chosen webserver. - Run with
quasar dev -m ssr; build withquasar build -m ssr.
Write universal code
- Create request-scoped router, store, and mutable state. Never leak one request's data into another.
- Guard DOM, window, storage, and browser-only packages behind client execution.
- Keep server-only modules out of the client graph and secrets out of serialized state.
- Make initial server markup deterministic. Avoid time, randomness, locale, viewport, and client-storage differences during hydration.
- Use SSR context for request/response data, redirects, status codes, headers, and per-request metadata.
- Put server behavior in supported SSR middleware and webserver hooks.
- Evaluate third-party packages for SSR compatibility before importing them from universal modules.
- Use Quasar's partial CSR support intentionally for routes that do not need server rendering.
Validate both halves
- Test a direct HTTP request to every changed route in a production SSR build.
- Confirm correct HTML, metadata, status codes, redirects, cookies, and headers before hydration.
- Hydrate in a browser and check for mismatch warnings, duplicated requests, lost state, and event-handler failures.
- Test concurrent requests when changing request-scoped state.
- Run tests, typecheck, lint, and formatting checks; start the built server from
dist/ssras deployment will.