this seems to be using gotty [1] to run spacemacs and serve it up as a web app.
- Gotty is a tool that allows accessing any TTY app as a web page (also allows forwarding input)
- We use Gotty to run emacsclient --tty -a '' command, that connects to the existing Emacs instance or starts a new one. That makes the session persist tab closing, connection problems etc.
- Your Emacs configs and files you want to expose to Cloudmacs are mapped in docker-compose.yml file.
Rest of the setup is basically dirty business of setting up Docker container, permissions etc.
There is WeTTY, too, that is based on xterm.js, which seems interesting. This one is listed in the readme of Gotty.