Survey: API-Based Content Management and Distribution for Laravel

Posted by Adam Engebretson on December 5, 2013

While Prismic.io does a phenomenal job at out-sourcing content management to a third-party service (as do a few other options, including Osmek and Contentful ), I feel as though it does not serve its content in an efficient manner through its API. Furthermore, its "writing-room" and repository management does not satisfy my needs with respect to content relationships, access management, etc. So here's the idea: a cloud-based CMS for the masses.

So, you might be asking, what would this service do that Prismic.io doesn't? Well, in the end, I can't say it would do much more. My hope is to do it better.

First, and foremost, my plan is to simplify the content type (known as document masks at Prismic.io) declaration process. I will probably preserve the JSON-based configuration provided by Prismic.io, however the structure of the configuration will be much simpler! Next, an obvious necessity, simple yet complex access management. Prismic.io, admittedly still in beta, does not provide any access management. This will be an intrinsic feature of the new system from the start.

Now, let's talk about the API. We all know that making API requests for every single page is simply not an option. Therefore, the new system's API wrapper (written in PHP as a composer package, including Laravel Service Providers and Facades), will have built-in and customizable caching. While it's simple enough to cache the entire response from your application, that's not always the ideal solution. Thus, we'll be caching at the API-response level instead. Furthermore, the API will allow searching, querying, and selecting like any other database system would. In fact, the new system will release an alternative driver for Eloquent to integrate seamlessly with Laravel's ORM.

Finally, the experience for the end-user (aka your client who manages the content) will be incredibly simple, as well as customizable. You will be able to customize your repository access and dashboards for various access levels, making it designed specifically for each end user.

Of course, this is a lot to promise, however I'm finding it more and more important to have a system ready for me to spin up a new content-based site extremely quickly. Building a custom CMS on the fly is not a simple task, nor is it one that we developers would like to do repeatedly. So let's do it once, do it right, and make our lives much easier!

This blog is intended to retreive feedback from the community on this issue. Please share your ideas, thoughts, concerns, considerations, etc. in the comments below. This will be built with the community in mind, so speak up and you can influence the product. I also plan to share the profits with those who contribute to the concept!