move API resources and routes to separate packages