This is more of a tech demo and test environment than something that would work as an alternative to server-side WordPress - since if you are using a CMS you generally want the results to be visible to people other than you!
It's very, very cool though.
https://make.wordpress.org/core/2022/09/23/client-side-webas...
To answer your questions directly:
WebAssembly is the magic sauce that transforms server-side code into client-side code. MySQL unfortunately is not yet supported by WebAssembly, so I applied a plugin that adds SQLite supports to WordPress [0]. The WebAssembly application has its own in-memory filesystem that lives in a specific browser tab and is scraped as soon as you close it.
So – technically it exposes db credentials, and even the entire DB, but that you are the only user of that DB so it's okay.
> What would the backend look like
The only backend is a static file server where the code and the database live. Your browser downloads a copy of the database and allows you to modify it in the current tab, but the updates are never saved back to the server.
The database also runs on the client in wasm (sqlite).
But it's utterly useless if you want to put a blog online as it only runs locally in the browser and nobody else will see the posts.