A web application designed as a state machine and written in JavaScript