Deploying a Next.js Store on Oracle CX Commerce Cloud

Deliver a sub-second Next.js website on Oracle CX Commerce Cloud with Layer0

Next.js is an open-source React-based isomorphic framework for server-side rendered applications. To ensure fast page loads, Next.js automatically splits code and dynamically generates the HTML every time a new request comes in with the use of a server. Key benefits of Next.js include: built-in server-side rendering, automatic code splitting, page caching and route prefetching, file-system routing, and CSS-in-JavaScript styling. 

Oracle CX Commerce is a popular commerce platform with an API-first architecture and has an extensive REST API that can be used to implement shopping, checkout, and storefront administration in a portable frontend, such as a progressive web app or single-page application. CX Commerce comes with three modular options: fully integrated, non-integrated and integrated. A fully integrated storefront tightly connects the UI layer and the commerce services layer, whereas a non-integrated approach is akin to a headless one where the UI layer is separated from the backend commerce platform. The third approach is a hybrid, where the UI layer is separate from the backend but still has CX Commerce capabilities, such as site design tools, personalization, and A/B testing.

Unfortunately, Oracle CX Commerce Cloud does not support SSR, PWA or AMP out of he box, significantly hindering website performance. The platform can run JavaScript server-side, however, this capability is partitioned to custom paths that do not line up with the URLs of the existing commerce experience and are built for supporting server side extensions and not SSR. To add these capabilities on your own, you'll need a backend for frontends and a fleet of Node.js servers, but this still won't get a site down to sub-second speeds.

Layer0 lets you deliver your Next.js storefront on Oracle CX Commerce in sub-seconds. Websites on Layer0 see median speeds of 320ms, as measured by Largest Contentful Paint (LCP). However, Layer0 is much more than a website accelerator. It is a Jamstack platform for eCommerce. Layer0 makes websites faster for users and simpler for frontend developers to maintain. The platform was built specifically for large-scale, database-driven websites, such as eCommerce and Travel, and provides the following benefits: 

  • Jamstack for eCommerce via both pre-rendering and just-in-time rendering
  • Zero latency networking via prefetching of data from your product catalog APIs
  • An edge that can be configured natively in your Next.js app (CDN-as-JavaScript)
  • Edge rules that can run locally, in pre-production and production environments  
  • Automated, full-stack preview URLs from GitHub, GitLab, or Bitbucket with every new branch and push
  • Performant split tests at the edge and A/B tests that do not slow down the site, canary deploys, and personalization
  • Serverless JavaScript that is much easier and more reliable than AWS Lambda

With Layer0, your Next.js CX Commerce store will run in sub-second speeds and your developers will be empowered to control edge caching and reduce rework using the various developer productivity tools that come with the platform.

Layer0 is also a main contributor to React Storefront (RSF), an open source eCommerce frontend framework built on Next.js, which powers over billion dollars in eCommerce revenue a year. Try it out if you are in the process of building a modern frontend for an eCommerce site. Or if you're already using Next.js, use the this guide to deploy your Next.js application on Layer0 and get sub-second loads in as little as 1 hour of work. 

Deploy in minutes

Moovweb XDN works with all frontends
Deploy freeTakes 2 minutes