Moved server api code to app folders