You might have a look at LiveState. Full disclosure, I am the author I think it shares several of your goals (no iframe needed, etc) and has multiple apps in production, some for years.
Related to that, I’m working on a way to take this a step further and use LiveView for embedded widgets. The difference in that approach is that the owner of the main page would be a third party. Maybe there is some overlap and it could solve both problems. You can take a look at the proposal here.
The client js lib is a very thin wrapper around the phoenix channels js client. It definitely works fine for react, I wrote a react hook in <30 lines. It should work anywhere I would think
I had not heard of microfrontends before. I suppose an example would be something like the AWS console, where there are a thousand services with their own frontend which are developed independently?
Makes me wonder - what are the limits (on the client) for opening tons of sockets for the different LiveViews? Has anyone actually tried opening, say, 100 LiveViews on one page? Is it a problem?
If so, I wonder if you could multiplex them over one socket or something.
Modern ad-riddled websites already open lots of connections at once, although mostly not websockets. There are various patterns of UI composition for microfrontends. I think, indeed, using one connection should be sufficient, thus the experiment.
The nice thing is that it uses events so it doesn’t matter where in the DOM the consumer and provider are, they just discover one another and stuff just works.