implement new REST API for admin-http and front page as single page application

As you can see I implemented REST api for routes and rewrite front application.
What do you think, would it be good to merge?
can you add a comment why we need to make a new map here, what is it used for?