Designing software stack for remote GUI application

Imagine you are writing an electron application that will act as graphic user interface for another software (let’s call it “B”) that is running on localhost or on a remote machine exposed on internet.
B is a software that runs scientific calculus, and the GUI has to show what is doing and some light graphic.
The user has to login to get access to B and the communication channel should be secure
Which technologies would you use to design the software stack in order to achieve this?
Note: B software is an existing software but can be modified to implement support for this new approach

Thank you

I imagine you’d want to set up a server on your remote machine that will accept HTTPS requests from the Electron client and return JSON with the appropriate data. Alternatively, you could set up a server that renders the website interface itself (this might be easiest to do with a Python server like Flask) and just use your Electron app as a browser.

Thank you, the JSON approach seems to be good. What about using Websockets Secure with TLS rather than HTTPS?

Sure, whatever you’re familiar with. The specific messaging protocol is pretty irrelevant.