maybe take something from js world the mainstream hydration or etc like this <https://fresh.deno.dev/>
that means you can generate not only static js code for running SPA, but also a version with prefilled values and raw html, that after sending to web comes alive.
