Skip to content

npm decoupled website

npm wanted a decoupled WordPress website with a JavaScript front-end.

npm (node package manager) is a packet manager for Node.js. They brought in Human Made to provide WordPress development for their new decoupled website. Human Made worked on the API and back-end, ensuring data was delivered to the front-end.

We created a custom API to deliver data over the API. The content was structured by a modular page builder that we had created for a previous project. In addition to sending content and media, the API delivers rendered HTML and scripts and stylesheets. This is all cached on a Node.js server and delivered from there to the front-end. This means that even if WordPress isn’t available the site still stays up. It also means that the website is fast without having to expend effort scaling the database.

In a fully decoupled website, WordPress is just used for data collection and delivery. This means that much of the native functionality, such as post previews, isn’t available. The client wanted its authors to be able to preview their content before publishing it. We built a new post previews feature: this was a basic WordPress theme built using parts of the CSS templates and the handlebars front-end.

“One of things we could not compromise on was the integration with the WordPress REST API. From a security perspective, we felt as if there were only a few agencies that would even have the knowledge to integrate such a thing at the level of traffic we receive. Having been a part of the steering committee, as well as given talks about WPs REST API, we felt that Human Made was well positioned to help lead us.”

— Nick Cawthon, Head of Design & UX, npm

Talk to us about your next project