Look at modelverse_gui
Create SCCD states to represent GUI
Or
Use modelverse.py (port to Javascript)

Port http_client.xml and modelverse.xml to Javscript (in modelverse_gui) - This is SCCD

Statecharts is better modelling, but HTTP requests will be faster

modelverse.py is wrapper around SCCD classes
SCCD is connected to HTTP client connected to modelverse

First step:
Port modelverse_gui to Javscript by porting http_client.xml and modelverse.xml
