Actual SSR
As a visitor, I want to enjoy the smallest download size possible and the quickest receiving in order to feel delight and stay in the flow.
As a developer, I want to write the app declaratively, once, and let the compiler pretender static assets where possible so that I have less work and maintenance to do.
--
current situation: SPA hydrates on a (fake) static site. Elm is great for frontends but the only mature solution for SSR is proprietary (the Lamdera compiler).
--
-
developers develop the site declaratively; static routes are rendered automatically at build-time -
Static assets are shipped on every route. Where necessary, a Spa ("hydration") or some other form of client-side logic is added -
FOSS stack -
No regression: Page load speed and bundle size decrease vs. the current situation
--
Idea: So, Gleam is basically Elm for the Erlang VM ("Beam"). Lustre is basically a simple version of LiveView in Gleam.
I checked out https://github.com/lustre-labs/lustre and the example is quasi Elm.
So I figured it will take me 3 hours to switch this site from Elm to Gleam/Lustre and reap all the benefits:
- the acceptance criteria listed above
- plus we can mix in Erlang/Phoenix code (all the best stuff on the internets)