[r] set up basic routing and templating