The enduser couldn't care less what if-else nightmare logic you ran in your "application engine" in order to reach the current framebuffer, they care only about the framebuffer. Following this logic, that tidy codebase should perhaps be also tiny: in the extreme case, just thinking on a whim right now, it should be comprised of only one "module": a stable diffusion-like algorithm which ingests the HTML/CSS/JS specification documents and the requested website response and "simply" outputs the adequate framebuffer, with which the enduser interacts accordingly. This kind of approach probably reduces the cost from billions to only a few millions for the GPUs training time. Sort of a "generative browser", a "genser", if you will.