Headless content management or Headless CMS, is a great way to get a frontend that is light, easy to change, and more scalable system. In this article we are going to talk about the tools and platforms we incorporated into our headless content management.
Our first piece is wordpress, we use wordpress to hold all our articles, products or any content / media relating to the site we are building. Wordpress is quite heavy and expensive to scale up. The pros of wordpress are the plugins it supports as well as core features such users, admin panel and APIs both in rest as well as graphql plugin. It also very extensible using code, we need a feature or a custom post, build an easy plugin. Wordpress houses all our data in a clear view, now you can use a SAAS product, but we have seen a lot of compromise compared to price, wordpress allows us to handle any complex logic our customers care about.
The next part of our stack is nextjs, this what we used to build an awesome light frontend. This frontend allows us to take away the heaviness of wordpress and when combined with lambda, we can scale to any level our clients require. We have run 1 million hits per day with this frontend. While some of our clients do require constant connections to wordpress. Nextjs does have an API section that we can use to proxy the calls to wordpress and still use caching techniques.
Below is the common pattern we use when developing using wordpress as our headless content manager. With some special sauce like docker and things of that nature when using AWS lambda.