Four Kitchens
Insights

TWiT.tv launches content API and headless Drupal site

2 Min. ReadClient stories

Do you ever watch This Week in Tech with Leo Laporte? If you don’t maybe now is the time to start. Last week, Four Kitchens helped TWiT with the launch of their new content API based on Drupal 7, with a headless website that is the first of many new TWiT apps sure to be appearing.

Content as a Service

It’s no news that for content to be truly portable, it needs to come from an API. TWiT recognized that fact long ago, and during their latest website redesign they decided to jump feet first into a new system for publishing their content. They’ve long been on Drupal (since Drupal 4!) and so naturally Drupal 7 was their CMS of choice. D7 combined with the RESTful module makes for a flexible, easily maintainable content API. The API itself was designed by our very own API Maestro David Diers.

If you’d like to consume TWiT the same way their website does, the API documentation is available on Apiary.

View TWiT API documentation

Headless Drupal

Instead of using all of Drupal, TWiT opted to use only the robust content management tools, and left other pieces like the theme system untouched. Instead, Four Kitchens built a lighter, decoupled frontend using Node.JS and a Redis cache that can handle more requests per second, with a median response time of 10ms during their busy live-stream hour. Both the Redis cache and Varnish are intelligently cleared as Drupal is updated, meaning that content is always fresh while remaining quick to download.

The front end is an Express app using Dust to render templates. This mix of libraries allows pages to be constructed on the server (to provide faster page loads) while easily allowing the templates to be reused for client-side updates once the page is initialized.

Powered by open source

Because TWiT values the open source process, they allowed Four Kitchens to release a framework based on the front end of their new site. Based on Express, it contains some scaffolding to quickly bootstrap a front end for your content API.

Saucier on GitHub

Check out the case studies

Want to find out more about how this site was built? We have a more detailed story up on our main site, and Michal Minecki recently talked about it in a webinar focusing on different approaches to Content as a Service sites, featured on Pantheon’s decoupled CMS page.

Four Kitchens’ case study   Content as a Service Webinar