citizennet/frontend-engineering-challenge — pull request #6 by raptrex (2014-01-02 22:12:50+00:00)
Title: Jonathan Yee's fork

I have a Cache.php as an interface and DiskCache which implements it. DiskCache reads and writes the post or likes.json file to disk. Api.php will first try to get the json through your servers, and if there is a 503, or the json returns an error message, it will serve the json from the disk cache. If the Api.php does get a successful response from your servers, it will save the json to disk.

For the frontend, I tried to create a overview/dashboard type layout to quickly look at all the posts and likes on one page. It will display all of the likes and posts, as well as the most commented and most liked post.