Backend Rails code to support Front End Project