Blogs

Headless vs monolithic commerce architecture compared

Headless vs monolithic commerce architecture comes down to one design choice: whether your storefront and your commerce logic ship as one application or as two that talk through APIs. Neither is modern or outdated in itself. Each suits a different pace of change and a different team.

Headless and monolithic commerce architecture compared on a whiteboard

Key takeaways

1

A monolith ships storefront and commerce logic in one release; headless splits them.

2

Headless adds a second application whose main cost is the team that runs it.

3

A monolith still wins when the storefront changes rarely and the team is small.

Heading 1

Heading 2

Heading 3

Heading 4

Heading 5
Heading 6

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.

Block quote

Ordered list

  1. Item 1
  2. Item 2
  3. Item 3

Unordered list

  • Item A
  • Item B
  • Item C

Text link

Bold text

Emphasis

Superscript

Subscript

The decision on the table is which architecture your next storefront is built on, and it is hard to reverse. A storefront carries years of custom work, integrations and content. Moving it later means rebuilding the front end, so the choice should follow how your business changes its shop, how many people will maintain it and what that operating model costs over its lifetime.

A monolith keeps storefront and commerce logic together

In a monolithic set-up, the pages customers see and the logic behind them, such as baskets, prices and promotions, live in one application and go live in one release. On Salesforce B2C Commerce, SFRA works this way: the storefront code runs on the commerce platform itself as cartridges, the modules that extend it.

That coupling has a clear upside. One codebase, one deployment and one set of skills keep the operation simple. Its cost shows when the storefront needs to change often, because every front-end change travels through the same release, test and approval cycle as the commerce logic.

Headless puts an API layer between the two

A headless architecture splits the storefront into its own application that asks the commerce engine for data through APIs. On Salesforce, Composable Storefront (PWA Kit) is that separate front end, and it calls B2C Commerce through the Salesforce Commerce API. The same APIs can serve an app, in-store screens or other touchpoints.

Headless does not require microservices, a point the two terms often blur. The commerce engine behind a headless storefront can remain one platform, which is the usual case on Salesforce. The full picture of headless commerce on Composable Storefront covers how the pieces fit together.

Release cycles show the difference first

The first practical difference is how often you can release. With headless, the front-end team can ship on its own schedule, while back-end changes follow theirs. A monolith releases everything together, which is slower but keeps testing to one moment.

Independent releases bring a new discipline. The storefront depends on API behaviour, so every back-end change has to respect what the front end expects. Teams that manage this well version their integrations and test the contract between the two. Teams that skip it trade release queues for production incidents. Our Build teams stay on a project from start to finish, with no rotations, so the people who defined those contracts are still there when the first back-end change tests them.

Hosting and operating cost follow the architecture

A monolith on Salesforce runs on one hosted platform, so there is one environment to operate. A headless storefront adds a second runtime. Salesforce Managed Runtime hosts Composable Storefront and takes care of servers and scaling, as explained in what Managed Runtime takes over.

Hosting is rarely the large line. The cost that grows is people: front-end developers, test automation and monitoring for a second application, for as long as it runs. It scales with the amount of custom front-end code, which is why a lean component set matters more in headless than in a monolith.

Thomas Theunen
Head of Commerce

Hosting is rarely the large line.

Thomas Theunen

|

Head of Commerce

Where a monolith still wins

A monolithic storefront remains the stronger choice for many businesses. If your storefront changes a few times a year, your team is small or your roadmap relies on ready-made integrations, SFRA gets you there with less to operate. Search engines read its server-rendered pages without extra work, and many payment and tax providers offer a cartridge for it.

Scale is not a reason to leave it. B2C Commerce runs as a hosted service that handles peak traffic whichever storefront you choose. The monolith's limit is the pace of front-end change, which is a business question more than a technical one.

Composable goes one step further

Composable architecture extends the headless idea from the storefront to individual capabilities. Search, content or payments each become a separate service you can replace on its own. That adds choice and adds contracts to manage. The business case for it differs from the headless one and is set out in what composable commerce delivers.

Moving from one architecture to the other

Many moves from monolith to headless happen in stages. The new storefront takes over selected pages, often product listing and product detail pages, while the existing storefront keeps checkout until the new one is ready. Product data, promotions and customer accounts on the platform serve both, so that work keeps its value whatever happens to the front end.

The integration between the two storefronts is where these moves go wrong. Sessions, baskets and tracking have to carry across without the shopper noticing. We take responsibility for that integration as one accountable party, covering every Salesforce product involved. Nobody has to referee between suppliers when a basket goes missing.

Explore Commerce Cloud
About the Author
Thomas Theunen
Head of Commerce

Our insights

Button Text
No items found.
No items found.
No items found.