generate controller and index page