Launch Week Day 5 - Replace Shopify in Your Headless CMS Stack
Tags: ecommerce, webdev, programming, headless
Published: 2023-04-07 17:09:37

## To wrap up our second launch week, we're releasing our Ecommerce starter kit. It demonstrates the strength of Payload and how it can be used to power much more than simple website content.

Today, the typical custom ecommerce build workflow is to combine a headless CMS with an ecommerce vendor like Shopify or Medusa. I refuse to discuss Woocommerce so ... you're welcome. We've built projects like that in the past, and while doable, you start to have a kaleidoscope of different vendors / functions / API requests / spaghetti.

One of the big takeaways from this week's launches is that we want to start to see the web get simpler, not more complex. We want to promote efficiency and reduce the time it takes for developers to build products, and from our own experience, building anything custom with ecommerce is quite the nightmare in today's ecosystem.

Let's take Sanity and Shopify for example (a popular combination for custom ecommerce). Is it strange to you that both platforms can manage content, but you still need both platforms regardless, even though there's a lot of overlap?
Let's consider an MVP ecommerce build. If you combine Shopify and Sanity, you're really only leveraging Shopify for a few aspects of your MVP:

- Your cart
- The checkout experience
- Processing payments
- Customer authentication

If you leverage these parts of Shopify, and then manage content in Sanity, here's how the workflow will look.

### From the engineering perspective

- Fetch data from Shopify for pricing, product meta, attributes, etc.
- Fetch product landing page content from Sanity
- Combine the two into product landing pages / archives
- Manage separate environments for dev / stage / prod in both Sanity and Shopify, and then somehow keep them in sync
- Create accounts for customers in Shopify, and build the cart from Shopify
- In the cart, merge product meta from Shopify with whatever content is necessary from Sanity

That's not too bad really. Halfway to microservices hell, but it's doable. We've done similar many times before. But now let's think about it from the marketing / business perspective.

### From the marketing / business perspective

- I need to add a new product. What do I do first? Build the product in Shopify, then go build the landing page in Sanity?
- Where do I manage product prices again? That's done in Shopify.
- Where do I manage the product thumbnail image? That's content, right? So Sanity. Wait, no, that's done in Shopify.
- I need to add a new attribute to a product. It needs a description. Content, right? OK - probably sanity. Wait. Nope, that's product meta. Gotta do that in Shopify.
- Rage due to confusion

### This is harder than it needs to be

When my team built projects like this in the past, frankly they didn't turn out great. We had a hard time ourselves bringing in new devs to the code because it was all a network of inter-connected mysteries. If it's remotely hard for engineers, it's certainly going to be hard for the admin end-users.

> But there's a better way. Payload offers so much more than a typical SaaS CMS, which makes this all significantly easier. Let's look at the following examples.

- Payload gives you authentication
- You own your APIs and your database so you can write hooks to sync product meta automatically
- You can integrate a payments provider like Stripe seamlessly
- You can use Stripe webhooks thanks to the fact that you can open your own endpoints (on your own server)
- You can do literally ALL product management directly in one place (Payload)

Payload can eliminate Shopify from the mix entirely. Replace Shopify with Stripe, and then you have literally zero overlap between the platforms.

When an admin logs in to manage products, everything is directly in Payload. When an engineer goes to build a new feature, everything is directly in Payload.

### Announcing our Ecommerce Starter Kit

Today, we're officially announcing our [Ecommerce starter kit](https://github.com/payloadcms/template-ecommerce) which gives you everything you need to get an ecommerce store up and running instantly with Payload + NextJS. Oh, and it's completely free and open-source.

No Shopify necessary. No microservices hell. You can even instantly deploy the starter to Payload Cloud, which hooks you up with everything you need to run in production.
With this starter, you get all of the following:

- Deep integration with Stripe, including automatic two-way sync via Stripe webhooks
- Manage content for your entire ecommerce store in one place
- Next.js frontend ready to go with products, attributes, pricing, and more
- Customer authentication built with Payload and tied automatically to Stripe customers
- Shopping cart out of the box
- Lots, lots more

### This is specifically cool for agencies

Coming from an agency background, I share many of the struggles that engineers in an agency face.

Each project you take on is subtly different, and you might find yourself scrambling to find the perfect tech stack for each one. You can quickly end up managing a smattering of products, each with entirely different stacks.

- Project A needs a simple donation form, so let's go with Contentful and a simple Stripe payment form
- Project B needs to sell licenses to a digital product, so let's use Sanity and Shopify for licensing and digital downloads
- Project C is just a brochure marketing site, so let's use Webflow
- Project D is an enterprise site, so let's use Contentstack
- Project E has subscriptions, so let's build a custom backend with Laravel and use Stripe Subscriptions

Each one of these projects will be a learning experience and your engineering efficiency will suffer big time. And then fast forward a year—you have to onboard new engineers into these projects completely separately, and you'll end up with a bunch of engineers that never really understand any of the projects because they're all totally different. Revisit a project a few months later and you'll need to spend 2 days getting back up to speed with the mania that you built.

> I think one of Payload's biggest shining points is that we can handle every single project in the list above. The fact that we're half application framework and half CMS is what enables all of this.

In an agency setting, imagine if you could flatten your stack. What if each project could build off the last, seamlessly? What if you could write a feature, and then the next time a client comes asking for a similar feature, you literally just re-use what you already have, but bill them as if you had to build it?\

That's the dream. And that's what we're trying to give you.

This ecommerce kit is the beginning of lots more to come, but it's one that we're very excited about. It'll make you build better products, save money, and be happy with your engineering workflow to top it all off.

> Give the new [ecommerce kit](https://github.com/payloadcms/template-ecommerce) a shot today.