all the code for STCG web-app