structuring front-end JS apps to scale