set up api and client routing infrastructure