js model & main and public page