Spartacus is an Angular-based JavaScript storefront for SAP Commerce Cloud. It is an opensource project that anyone can access by downloading the source code freely. It is also published as a set of libraries that can be used to create a branded storefront app - import the published Spartacus libraries into the custom app, change styling, add features and publish the branded storefront!
Spartacus storefront pulls products and content from the back-end as needed. It is a single page application where the first page loads and the rest is driven by code. This has inherently good performance as Spartacus only loads the parts of the page that require updating. The whole page is not reloaded whenever something changes. This also provides a good user experience not just because of the speed, but also because you control everything in the UI.
There are some prerequisites to create a Spartacus storefront. Have an SAP Commerce Cloud Backend running, preferably from 1905, but you can also use 1811. It is configured to accept OCC (Omni-Commerce Connect) REST API calls to communicate with SAP Commerce Cloud environments. Your development environment is to be set up for angular coding.
The endpoints used in OCC adapters can be configured so that the customization of Spartacus can be very lightweight.
The primary step in creating the first Spartacus app is to create an angular app, add the dependencies that Spartacus requires to configure the app to use the Spartacus storefront module, and then add the default styling localization. It is better to use libraries to maintain upgradability.
With Commerce Cloud out-of-the-box accelerator, you get JSP-based templates that are provided as part of the Accelerator storefronts. Then why would you move or start your project with a Spartacus based storefront?
Decoupled Architecture - Spartacus storefronts are decoupled from SAP Commerce Cloud instances, allowing you to completely separate front-end and back-end development. Spartacus app runs on its own server node and makes OCC REST API calls to SAP Commerce Cloud backend servers. The benefit is that you can update Spartacus app separately when you update the platform, and you can also scale and cache different servers independently from each other.
Upgradable - Since Spartacus is published as libraries, upgrades are totally under the user’s control. The architecture of Spartacus ensures compatibility. It is configurable and extendable. That means you can add your functionalities or hide the existing ones based on your needs.
Faster Implementation - Spartacus is fast to develop and it is a PWA, a Progressive Web App. It supports SEO even though that it is a single page application.
Extensibility - Developers can easily add, remove, or replace any feature or component in the storefront without affecting the core functionality. They can also leverage existing Angular libraries and tools to enhance the storefront. Moreover, they can use micro frontends to split the storefront into smaller and independent modules that can be developed and deployed separately.
Progressive Web App (PWA) -he storefront is designed to be a PWA, which means it can provide a fast, reliable, and engaging user experience across different devices and platforms. Users can access the Spartacus PWA storefront offline, receive push notifications, and install it on their home screens.
Server-Side Rendering (SSR) - It supports SSR, which means it can render the initial page on the server side before sending it to the browser. This can improve the performance, SEO, and accessibility of the storefront.
Internationalization (i18n) - The storefront supports i18n, which means it can display content in different languages and formats based on the user’s preferences and location. The storefront uses Angular i18n tools to handle translations, currencies, dates, numbers, and units.
Open Source Development - The Composable Storefront is open source and hosted on SAP GitHub Spartacus, which means developers can contribute to the SAP Spartacus development, report issues, request features, and access SAP documentation. The storefront also follows the Semantic Versioning (SemVer) convention to ensure compatibility and stability.
SEO optimization - he storefront supports SEO optimization, which means it can improve the visibility and ranking of the storefront in search engines. Spartacus uses Angular Universal to generate static HTML pages for each route, which can be crawled and indexed by search engines. The storefront also uses schema.org markup to provide structured data for each page, which can enhance the appearance and relevance of the storefront in search results.
Accessibility - SAP Spartacus supports accessibility, which means it can provide a user-friendly and inclusive experience for all users, regardless of their abilities or disabilities. It follows the Web Content Accessibility Guidelines (WCAG) 2.1 to ensure that the storefront is perceivable, operable, understandable, and robust. Spartacus also uses ARIA (Accessible Rich Internet Applications) attributes to provide semantic information for screen readers and other assistive technologies.
Versatility - Like other SAP tools, SAP Commerce Cloud, Composable Storefront is versatile and allows customization for various industries including automotive, consumer goods, medical, chemical, industrial equipment, and retail industries.
SAP Spartacus was first released in 2019 and has been updated regularly with new features and improvements. Here is a brief SAP Spartacus timeline that presents its rapid evolution:
SAP Spartacus was launched as an open-source project on GitHub, with the first version (1.0) released in July. It supported features such as server-side rendering, progressive web app, internationalization, and accessibility. It also provided a sample data extension and a B2C storefront template.
SAP Spartacus released several minor and major versions, such as 1.1, 1.2, 1.3, 1.4, 2.0, 2.1, and 3.0. It added features such as lazy loading, schematics, outlets, feature flags, CMS-driven dialogs, and B2B storefront template. It also introduced the Spartacus Storefront Library to provide more components and modules for the storefront.
It released further versions, going up to version 4.0. In these releases, it added features such as web components, micro frontends, schema.org markup, data isolation, and B2B organization management. It also rebranded itself as SAP Commerce Cloud, Composable Storefront.
SAP Spartacus released versions 4 and beyond to version 5.1. The features added included personalization, promotions, loyalty programs, and B2B cost center management. It was renamed to SAP Commerce Cloud, Composable Storefront since version 5.03. In these updates, it integrated with other SAP products and services, such as SAP Customer Data Platform, SAP Marketing Cloud, and SAP Upscale Commerce.
SAP Commerce Cloud, Composable Storefront released further versions and went up to version 6.0 in 2023. It has now added features such as voice assistant, emotion recognition, predictive analytics, and B2B approval workflow. It also adopted the latest Angular version and technologies, such as Angular Ivy, Angular Elements, and Angular Material.