Payload 2.0 released, TypeScript headless CMS and app framework
Hey HN, Dan here from Payload (YC S22), an open-source headless CMS that closes the gap between CMS and traditional app frameworks. We’re excited to announce Payload 2.0!

https://github.com/payloadcms/payload

If you’ve not heard of Payload you’re probably wondering why the world needs another CMS. Payload connects to your database and runs without the vendor lock-in and black box of SaaS based CMS solutions, and it’s far more extensible than off-the-shelf SaaS options. Enterprises in specific have been finding value in this control, and they’re using Payload to power content infrastructure that simply isn’t possible through integrating with SaaS webhooks alone.

Today’s announcement is all about features that strike at two neglected areas in the world of CMS. The first is application framework level control over your database that you’d expect with tools like Ruby on Rails or Laravel and the second area is making content editors effective by seeing their edits in realtime.

Here are the highlights on what we’ve been working on:

*Postgres Support*—in the same week we launched about two years ago,people asked for Postgres support. It brings me pure cathartic joy to finally give this to our community. To be fair, MongoDB has been a perfect solution for our architecture and it’s still recommended. But with a new adapter pattern for databases, you can stand your Payload project up on Postgres and run the same functionality as you can with MongoDB now. The crazy part is that we didn’t compromise on how nesting complex fields works. We could have taken the “easy” road and wrote things to JSON, but we leaned fully into the relational way and built the right tables and native column types for fields all the way throughout.

*Database Migrations*—maintaining a production app while deploying schema changes is something you come to expect from ORMs and backend frameworks, but rarely CMS. Payload 2.0 delivers full, first-party migration support all in TypeScript. We took a lot of care on the developer experience here so that when working with Postgres, thanks to our friends at Drizzle, we generate the migration files in TS that add the tables and fields for you. If you have to manipulate data before or after, you have a clear way forward now.

*Database Transactions*—when a request involves multiple inserts, updates or deletes to the database, you need control to rollback all changes when one part fails. The built-in Payload CRUD operations do this now for you and your custom hooks and other code can too.

*Live Preview*—the ability to quickly draft content and see it in context of a website is a literal game changer. We have taken the best dev experience of any headless CMS and given the editors a reason to demand Payload over the others.

*Lexical Richtext Editor*—our original Slate based editor has seen some great features added, like storing related documents directly in the JSON, uploads and any customizations. Unfortunately Slate leaves a lot to be desired on how to extend it, especially compared to Lexical. In a few short weeks we’ve built up a new editor experience inspired by Medium and Notion. Now type “/” and have embedded relationships, uploads, and custom blocks popping right up to be dropped in. Then drag and drop them to reorder your content. If you still want Slate, we continue to support that too.

We’re not compromising on editor experience. This is how we’re bringing the “head” to the headless CMS.

Building critical applications on top of a CMS may sound like blasphemy but it doesn’t have to be that way.

Thanks for reading! I look forward to hearing what you think.