{"id":20087,"date":"2023-02-09T09:18:00","date_gmt":"2023-02-09T08:18:00","guid":{"rendered":"https:\/\/www.codemotion.com\/magazine\/?p=20087"},"modified":"2024-05-22T18:11:48","modified_gmt":"2024-05-22T16:11:48","slug":"how-to-guide-integrating-spartacus-into-a-multi-project-angular-setup","status":"publish","type":"post","link":"https:\/\/www.codemotion.com\/magazine\/devops\/cloud\/how-to-guide-integrating-spartacus-into-a-multi-project-angular-setup\/","title":{"rendered":"How To Guide: Integrating Spartacus Into a Multi-Project Angular Setup"},"content":{"rendered":"\n<p>Spartacus is a composable Javascript storefront for<a href=\"https:\/\/www.sap.com\/products\/crm\/commerce-cloud.html\" class=\"ek-link\"> SAP Commerce Cloud<\/a>, a widely-used e-commerce solution suitable for omnichannel business ecosystems. <strong>Spartacus is developed with Angular, Google&#8217;s <a href=\"https:\/\/www.codemotion.com\/magazine\/backend\/why-you-should-use-typescript-for-your-next-project\/\" target=\"_blank\" aria-label=\"Typescript-based (opens in a new tab)\" rel=\"noreferrer noopener\" class=\"ek-link\">Typescript-based<\/a><\/strong>, <strong>open-source web framework<\/strong>. It is designed to be lightweight, customizable, and modern, with the ability to support the most recent architectural and development practices.<\/p>\n\n\n\n<p>Spartacus makes it easy to design and deploy the necessary functionalities for an e-commerce website, such as personalized storefronts, headless capabilities, progressive web application support, SEO friendly, and multi-language and multi-site support. Its<a href=\"https:\/\/talks.codemotion.com\/the-future-is-composable\" target=\"_blank\" aria-label=\" (opens in a new tab)\" rel=\"noreferrer noopener\" class=\"ek-link\"> composable architecture<\/a> allows for clean infrastructure design and deployment and makes it particularly suitable for multi-platform and multi-project solutions.<\/p>\n\n\n\n<p>For this guide, we&#8217;ve teamed up with<a href=\"https:\/\/www.aswatson.com\/innovation\/a-culture-of-innovation\/\" target=\"_blank\" aria-label=\" (opens in a new tab)\" rel=\"noreferrer noopener\" class=\"ek-link\"> A.S. Watson<\/a>, who understand the challenges that a multi-brand, multi-country ecosystem poses for e-commerce infrastructures. <strong>Our guide will look at how Spartacus can be used to leverage complex international e-commerce<\/strong>, gaining insights from A.S. Watson&#8217;s own integration of Spartacus into their multi-project Angular setup.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-introduction-to-spartacus\"><strong>Introduction to Spartacus<\/strong><\/h2>\n\n\n\n<p>Spartacus is a lean, Angular-based storefront for SAP Commerce Cloud. <strong>It was originally introduced in 2018 <\/strong>as part of a drive to integrate toolsets for different platforms into a single-page storefront interface. It began as an open-source project and has since been adopted as part of SAP Commerce Cloud itself.&nbsp;<\/p>\n\n\n\n<p><strong>The ABC of Spartacus<\/strong><\/p>\n\n\n\n<p>Spartacus offers a clean, composable storefront interface to accelerate and simplify SAP Commerce systems. Its single-page setup communicates with SAP Commerce using a REST API (Omni Commerce Connect). This means that user interface layers are fully decoupled from SAP Commerce, allowing flexible and secure integration without direct concern for backend components. Spartacus, being a headless storefront built on top of SAP Commerce, allows for <strong>more flexibility and agility in the frontend development<\/strong>, as the two can have independent release cycles. This means that frontend updates can be implemented more frequently and independently from the backend, resulting in faster innovation and a better customer experience<\/p>\n\n\n\n<p>Spartacus is based on Angular, Google&#8217;s lean and extensible web framework. This makes it easy to start small and extend as required, to huge multi-project, multi-platform internationalised systems if desired. And Angular also provides excellent security and accessibility tools from the ground up, plus an extensive and supportive global developer community.<\/p>\n\n\n\n<p>With a decoupled architecture, users benefit from rapid extensions and upgrades to the libraries as soon as they appear. The technology is forward-focused, aiming to offer a consistently high-quality user interface across any supported device. It aims towards full compliance with the<a href=\"https:\/\/talks.codemotion.com\/progressive-web-apps-pwas-the-future-of-\" target=\"_blank\" aria-label=\" (opens in a new tab)\" rel=\"noreferrer noopener\" class=\"ek-link\"> PWA (Progressive Web Application)<\/a> standards being developed by many major technology providers, including the<a href=\"https:\/\/www.w3.org\/groups\/wg\/webapps\" class=\"ek-link\"> W3C<\/a>.<\/p>\n\n\n\n<p>Spartacus provides all the core components for storefront interfaces that we&#8217;d expect such as navigation, product listing, product detail pages, shopping cart, checkout flows, and also advanced features like personalization, search and filtering, and dynamic content.<\/p>\n\n\n\n<p>Spartacus allows integration with various PSP, such as <a href=\"https:\/\/help.sap.com\/docs\/DIGITALPAYMENTS\" target=\"_blank\" aria-label=\" (opens in a new tab)\" rel=\"noreferrer noopener\" class=\"ek-link\">SAP Digital Payments<\/a> or any other external provider, to offer a wide range of payment options. This flexibility ensures that the e-commerce platform can adapt to the specific needs of the business and its customers. Furthermore, it includes many features for improving e-commerce interfaces, such as cart validation, product zoom, and dynamic configurations for site themes and guided-selling scenarios<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-what-s-spartacus-good-for\"><strong>What\u2019s Spartacus good for?<\/strong><\/h3>\n\n\n\n<p>By separating the user interface from SAP Commerce, Spartacus provides benefits for complex e-commerce systems. This means that core functionality can evolve independently of the shopfront interface, which can then use this functionality in various ways to meet different needs. <strong>Additional frontends can also be added to support multi-brand solutions<\/strong>. The modular interface allows for views to be created to meet the requirements of different languages or locations, as well as highly customized commercial specifications.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"960\" height=\"619\" src=\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2021\/09\/ecommerce-4849055_960_720.jpg\" alt=\"black friday\" class=\"wp-image-16663\" srcset=\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2021\/09\/ecommerce-4849055_960_720.jpg 960w, https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2021\/09\/ecommerce-4849055_960_720-300x193.jpg 300w, https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2021\/09\/ecommerce-4849055_960_720-768x495.jpg 768w\" sizes=\"auto, (max-width: 960px) 100vw, 960px\" \/><figcaption class=\"wp-element-caption\">Spartacus provides benefits for complex e-commerce systems.<\/figcaption><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-setting-up-a-multi-project-structure\"><strong>Setting up a multi-project structure<\/strong><\/h2>\n\n\n\n<p>Spartacus&#8217;s decoupling and composability draw on Angular&#8217;s inherent capabilities for modularity and extensibility. In particular, this makes it ideal for multi-project workspaces. <strong>This development approach is used by enterprises that have multiple projects but need to maintain core libraries<\/strong>, configurations or other shared aspects of their technology ecosystem.<\/p>\n\n\n\n<p>Enterprise development teams have various options for administering multi-project setups. The choice is reflected in the strategies they use to host and manage code using<a href=\"https:\/\/talks.codemotion.com\/github-stories-how-to-manage-a-big-side-\" target=\"_blank\" aria-label=\" (opens in a new tab)\" rel=\"noreferrer noopener\" class=\"ek-link\"> Git<\/a>. Thousands of libraries, a wide range of implementations and globally-dispersed development teams can mean administrative complexity. So organised flexibility is crucial.<\/p>\n\n\n\n<p>There are two main options for managing multi-project codebases: <strong>multi-repo and mono-repo<\/strong>. The multi-repo approach uses a different repository for each project or collection of libraries required for reusable components, standalone applications or microservices. This can help with defining access, autonomous working and independent release cycles. But it also leads to more fragmented projects and may ultimately require more reintegration work for complex setups.<\/p>\n\n\n\n<p>By contrast, a mono-repo setup uses a single repository for all code. This makes it easier to navigate shared aspects of the project ecosystem, making code quicker to find and issues more straightforward to trace. Refactorings and fixes require fewer cross-repository dependency checks and collaborations face fewer interruptions.<\/p>\n\n\n\n<p>And last but not least, Angular makes it easy to set up multi-project systems by skipping initial application generation when creating workspaces.&nbsp;<\/p>\n\n\n\n<p><strong>Integrating Spartacus: How A.S. Watson does it<\/strong><\/p>\n\n\n\n<p>With a huge international presence across thousands of stores, A.S. Watson needs to leverage complex technology to serve many different e-commerce applications. The size of operations means that a set of robust core modules is essential to ensure quality across all brand representations. <strong>But needless to say, with brands based across the globe, serving different marketplaces with multiple product ranges, the storefront interfaces may vary extensively<\/strong>. Seeing how A.S. Watson approaches multi-project ecosystems is a helpful guide for your own project setups.<\/p>\n\n\n\n<p>Since 2017, A.S. Watson has used SAP Commerce Cloud for the backend of their e-commerce operations. Their multi-project infrastructure uses a mono-repo Angular setup to handle the sophisticated feature sets that drive each brand&#8217;s frontend. The setup comprises two main libraries, which contain code modules as well as commerce feature modules representing the customised multi-project configuration.<\/p>\n\n\n\n<p>To get a clearer idea of how A.S. Watson implements this functionality, let&#8217;s take a peek inside their project structure:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>ci-script<\/strong> &#8211; this folder contains the build scripts for each brand implementation. They feed into the full build system, helping to streamline continuous integration.<br><\/li>\n\n\n\n<li><strong>lib<\/strong> &#8211; this is the main folder that contains the libraries which have already been implemented. It also stands as a placeholder for the remaining libs which will eventually be implemented by ASW.<br><\/li>\n\n\n\n<li><strong>mock-proxy-server<\/strong> &#8211; in here is a mock server used to run ASW&#8217;s Angular applications during development. This is helpful in case the API on the BE side is not yet ready for deployment.<br><\/li>\n\n\n\n<li><strong>projects<\/strong> &#8211; in the projects folder, we find one folder for each of the ASW brands implemented in the system. Within this folder there is a <strong>src<\/strong> folder for each brand, containing the specific implementations for that BU.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-best-practices-with-spartacus\"><strong>Best practices with Spartacus<\/strong><\/h2>\n\n\n\n<p>With A.S. Watson&#8217;s implementation as our guide, it&#8217;s worth considering some best practices for projects using Spartacus. Using best practices can boost your <strong>app&#8217;s performance<\/strong> and help you gain better Google Lighthouse and Core Web Vitals scores.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"590\" src=\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2021\/12\/headless-ecommerce-e1640018954352-1024x590.webp\" alt=\"Headless CMS Ecommerce\" class=\"wp-image-16643\" srcset=\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2021\/12\/headless-ecommerce-e1640018954352-1024x590.webp 1024w, https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2021\/12\/headless-ecommerce-e1640018954352-300x173.webp 300w, https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2021\/12\/headless-ecommerce-e1640018954352-768x442.webp 768w, https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2021\/12\/headless-ecommerce-e1640018954352-1536x885.webp 1536w, https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2021\/12\/headless-ecommerce-e1640018954352-2048x1179.webp 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\">Spartacus&#8217; composable architecture allows for clean infrastructure design and deployment and makes it a great choice for multi-platform and multi-project solutions<\/figcaption><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-use-a-pwa-checklist\"><strong>Use a PWA checklist<\/strong><\/h3>\n\n\n\n<p>Earlier on we mentioned Spartacus&#8217;s alignment with <strong>Progressive Web App<\/strong> aims. You can do your bit by using a<a href=\"https:\/\/web.dev\/pwa-checklist\/\" target=\"_blank\" aria-label=\" (opens in a new tab)\" rel=\"noreferrer noopener\" class=\"ek-link\"> PWA checklist<\/a>. For example, make sure your customisations retain universal accessibility and responsiveness. Implement caching strategies to keep speeds high and ensure that offline browsing can work seamlessly with online to keep users in your app.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-reduce-resource-requests\"><strong>Reduce resource requests<\/strong><\/h3>\n\n\n\n<p>In short, only request what you need. For example, keep CSS and Javascript includes specific to each page. Don&#8217;t download full-res images if you only need thumbnails. Optimise your asynchronous HTTP requests to avoid unnecessary server calls. Also, when accessing the SAP Commerce backend through the REST API (OCC), make sure you only request the data you need for the current operation.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-use-caching-to-improve-speed\"><strong>Use caching to improve speed<\/strong><\/h3>\n\n\n\n<p>Caching frequently used assets can significantly improve your storefront&#8217;s performance. Keep an L2 cache for all scripts, images, fonts and so on that don&#8217;t change much. You can also cache OCC calls for anonymous users (which change infrequently). And don&#8217;t forget to optimise browser cache policies to boost page load times on user devices.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-consider-seo\"><strong>Consider SEO<\/strong><\/h3>\n\n\n\n<p>SEO is vital if you want your storefront to succeed in a crowded marketplace. As well as top-notch content, there are a few technical steps you can take to <strong>improve your site&#8217;s discoverability<\/strong>. Server-side rendering will help to make sure your pages are properly indexed. Make sure you include a valid robots.txt to allow robots to crawl your site. And check that your meta-tags are present and correct across all your pages.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-conclusions\"><strong>Conclusions<\/strong><\/h2>\n\n\n\n<p>In this article, we&#8217;ve taken A.S. Watson&#8217;s global technological operations as our guide. We outlined how Spartacus and Angular are perfectly suited to developing and maintaining complex multi-site ecosystems. A<strong> lean approach, combined with composable architecture makes it much easier to implement modular customisations<\/strong> with core common functionality, allowing the multi-project, multi-brand systems required by major global operations.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/www.aswatsoncareers.com\/jobs\/?jobTitle=&amp;jobLocation=ITA\" target=\"_blank\" rel=\"noreferrer noopener\"><img loading=\"lazy\" decoding=\"async\" width=\"976\" height=\"251\" src=\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2023\/02\/BANNER_asWatson_gen23.png\" alt=\"Find open positions at AS WATSON\" class=\"wp-image-20091\" srcset=\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2023\/02\/BANNER_asWatson_gen23.png 976w, https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2023\/02\/BANNER_asWatson_gen23-300x77.png 300w, https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2023\/02\/BANNER_asWatson_gen23-768x198.png 768w\" sizes=\"auto, (max-width: 976px) 100vw, 976px\" \/><\/a><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>Spartacus is a composable Javascript storefront for SAP Commerce Cloud, a widely-used e-commerce solution suitable for omnichannel business ecosystems. Spartacus is developed with Angular, Google&#8217;s Typescript-based, open-source web framework. It is designed to be lightweight, customizable, and modern, with the ability to support the most recent architectural and development practices. Spartacus makes it easy to&#8230; <a class=\"more-link\" href=\"https:\/\/www.codemotion.com\/magazine\/devops\/cloud\/how-to-guide-integrating-spartacus-into-a-multi-project-angular-setup\/\">Read more<\/a><\/p>\n","protected":false},"author":64,"featured_media":20018,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_editorskit_title_hidden":false,"_editorskit_reading_time":6,"_editorskit_is_block_options_detached":false,"_editorskit_block_options_position":"{}","_uag_custom_page_level_css":"","_genesis_hide_title":false,"_genesis_hide_breadcrumbs":false,"_genesis_hide_singular_image":false,"_genesis_hide_footer_widgets":false,"_genesis_custom_body_class":"","_genesis_custom_post_class":"","_genesis_layout":"","footnotes":""},"categories":[5244],"tags":[4141,9996],"collections":[],"class_list":{"0":"post-20087","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-cloud","8":"tag-angular","9":"tag-spartacus","10":"entry"},"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v26.9 (Yoast SEO v27.5) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Integrating Spartacus Into a Multi-Project Angular Setup<\/title>\n<meta name=\"description\" content=\"A guide for integrating Spartacus into an Angular multi-brand, multi-country ecosystem e-commerce infrastructure\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.codemotion.com\/magazine\/devops\/cloud\/how-to-guide-integrating-spartacus-into-a-multi-project-angular-setup\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How To Guide: Integrating Spartacus Into a Multi-Project Angular Setup\" \/>\n<meta property=\"og:description\" content=\"A guide for integrating Spartacus into an Angular multi-brand, multi-country ecosystem e-commerce infrastructure\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.codemotion.com\/magazine\/devops\/cloud\/how-to-guide-integrating-spartacus-into-a-multi-project-angular-setup\/\" \/>\n<meta property=\"og:site_name\" content=\"Codemotion Magazine\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/Codemotion.Italy\/\" \/>\n<meta property=\"article:published_time\" content=\"2023-02-09T08:18:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-05-22T16:11:48+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2023\/01\/iStock-1431034853.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1386\" \/>\n\t<meta property=\"og:image:height\" content=\"756\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Codemotion\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@CodemotionIT\" \/>\n<meta name=\"twitter:site\" content=\"@CodemotionIT\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Codemotion\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"8 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.codemotion.com\\\/magazine\\\/devops\\\/cloud\\\/how-to-guide-integrating-spartacus-into-a-multi-project-angular-setup\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.codemotion.com\\\/magazine\\\/devops\\\/cloud\\\/how-to-guide-integrating-spartacus-into-a-multi-project-angular-setup\\\/\"},\"author\":{\"name\":\"Codemotion\",\"@id\":\"https:\\\/\\\/www.codemotion.com\\\/magazine\\\/#\\\/schema\\\/person\\\/201bb98b02412383686cced7521b861c\"},\"headline\":\"How To Guide: Integrating Spartacus Into a Multi-Project Angular Setup\",\"datePublished\":\"2023-02-09T08:18:00+00:00\",\"dateModified\":\"2024-05-22T16:11:48+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.codemotion.com\\\/magazine\\\/devops\\\/cloud\\\/how-to-guide-integrating-spartacus-into-a-multi-project-angular-setup\\\/\"},\"wordCount\":1538,\"publisher\":{\"@id\":\"https:\\\/\\\/www.codemotion.com\\\/magazine\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.codemotion.com\\\/magazine\\\/devops\\\/cloud\\\/how-to-guide-integrating-spartacus-into-a-multi-project-angular-setup\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.codemotion.com\\\/magazine\\\/wp-content\\\/uploads\\\/2023\\\/01\\\/iStock-1431034853.jpg\",\"keywords\":[\"Angular\",\"Spartacus\"],\"articleSection\":[\"Cloud\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.codemotion.com\\\/magazine\\\/devops\\\/cloud\\\/how-to-guide-integrating-spartacus-into-a-multi-project-angular-setup\\\/\",\"url\":\"https:\\\/\\\/www.codemotion.com\\\/magazine\\\/devops\\\/cloud\\\/how-to-guide-integrating-spartacus-into-a-multi-project-angular-setup\\\/\",\"name\":\"Integrating Spartacus Into a Multi-Project Angular Setup\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.codemotion.com\\\/magazine\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.codemotion.com\\\/magazine\\\/devops\\\/cloud\\\/how-to-guide-integrating-spartacus-into-a-multi-project-angular-setup\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.codemotion.com\\\/magazine\\\/devops\\\/cloud\\\/how-to-guide-integrating-spartacus-into-a-multi-project-angular-setup\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.codemotion.com\\\/magazine\\\/wp-content\\\/uploads\\\/2023\\\/01\\\/iStock-1431034853.jpg\",\"datePublished\":\"2023-02-09T08:18:00+00:00\",\"dateModified\":\"2024-05-22T16:11:48+00:00\",\"description\":\"A guide for integrating Spartacus into an Angular multi-brand, multi-country ecosystem e-commerce infrastructure\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.codemotion.com\\\/magazine\\\/devops\\\/cloud\\\/how-to-guide-integrating-spartacus-into-a-multi-project-angular-setup\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.codemotion.com\\\/magazine\\\/devops\\\/cloud\\\/how-to-guide-integrating-spartacus-into-a-multi-project-angular-setup\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.codemotion.com\\\/magazine\\\/devops\\\/cloud\\\/how-to-guide-integrating-spartacus-into-a-multi-project-angular-setup\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.codemotion.com\\\/magazine\\\/wp-content\\\/uploads\\\/2023\\\/01\\\/iStock-1431034853.jpg\",\"contentUrl\":\"https:\\\/\\\/www.codemotion.com\\\/magazine\\\/wp-content\\\/uploads\\\/2023\\\/01\\\/iStock-1431034853.jpg\",\"width\":1386,\"height\":756,\"caption\":\"Distributed Cloud Computing Concept - Multiple Distributed Clouds Used to Meet Computing Needs and Support Edge Computing - 3D Illustration\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.codemotion.com\\\/magazine\\\/devops\\\/cloud\\\/how-to-guide-integrating-spartacus-into-a-multi-project-angular-setup\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.codemotion.com\\\/magazine\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"DevOps\",\"item\":\"https:\\\/\\\/www.codemotion.com\\\/magazine\\\/devops\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Cloud\",\"item\":\"https:\\\/\\\/www.codemotion.com\\\/magazine\\\/devops\\\/cloud\\\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"How To Guide: Integrating Spartacus Into a Multi-Project Angular Setup\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.codemotion.com\\\/magazine\\\/#website\",\"url\":\"https:\\\/\\\/www.codemotion.com\\\/magazine\\\/\",\"name\":\"Codemotion Magazine\",\"description\":\"We code the future. Together\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.codemotion.com\\\/magazine\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.codemotion.com\\\/magazine\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.codemotion.com\\\/magazine\\\/#organization\",\"name\":\"Codemotion\",\"url\":\"https:\\\/\\\/www.codemotion.com\\\/magazine\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.codemotion.com\\\/magazine\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.codemotion.com\\\/magazine\\\/wp-content\\\/uploads\\\/2019\\\/11\\\/codemotionlogo.png\",\"contentUrl\":\"https:\\\/\\\/www.codemotion.com\\\/magazine\\\/wp-content\\\/uploads\\\/2019\\\/11\\\/codemotionlogo.png\",\"width\":225,\"height\":225,\"caption\":\"Codemotion\"},\"image\":{\"@id\":\"https:\\\/\\\/www.codemotion.com\\\/magazine\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/Codemotion.Italy\\\/\",\"https:\\\/\\\/x.com\\\/CodemotionIT\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.codemotion.com\\\/magazine\\\/#\\\/schema\\\/person\\\/201bb98b02412383686cced7521b861c\",\"name\":\"Codemotion\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.codemotion.com\\\/magazine\\\/wp-content\\\/uploads\\\/2019\\\/11\\\/cropped-codemotionlogo-150x150.png\",\"url\":\"https:\\\/\\\/www.codemotion.com\\\/magazine\\\/wp-content\\\/uploads\\\/2019\\\/11\\\/cropped-codemotionlogo-150x150.png\",\"contentUrl\":\"https:\\\/\\\/www.codemotion.com\\\/magazine\\\/wp-content\\\/uploads\\\/2019\\\/11\\\/cropped-codemotionlogo-150x150.png\",\"caption\":\"Codemotion\"},\"description\":\"Articles wirtten by the Codemotion staff. Tech news, inspiration, latest treends in software development and more.\",\"sameAs\":[\"https:\\\/\\\/x.com\\\/CodemotionIT\"],\"url\":\"https:\\\/\\\/www.codemotion.com\\\/magazine\\\/author\\\/codemotion-2\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Integrating Spartacus Into a Multi-Project Angular Setup","description":"A guide for integrating Spartacus into an Angular multi-brand, multi-country ecosystem e-commerce infrastructure","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.codemotion.com\/magazine\/devops\/cloud\/how-to-guide-integrating-spartacus-into-a-multi-project-angular-setup\/","og_locale":"en_US","og_type":"article","og_title":"How To Guide: Integrating Spartacus Into a Multi-Project Angular Setup","og_description":"A guide for integrating Spartacus into an Angular multi-brand, multi-country ecosystem e-commerce infrastructure","og_url":"https:\/\/www.codemotion.com\/magazine\/devops\/cloud\/how-to-guide-integrating-spartacus-into-a-multi-project-angular-setup\/","og_site_name":"Codemotion Magazine","article_publisher":"https:\/\/www.facebook.com\/Codemotion.Italy\/","article_published_time":"2023-02-09T08:18:00+00:00","article_modified_time":"2024-05-22T16:11:48+00:00","og_image":[{"width":1386,"height":756,"url":"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2023\/01\/iStock-1431034853.jpg","type":"image\/jpeg"}],"author":"Codemotion","twitter_card":"summary_large_image","twitter_creator":"@CodemotionIT","twitter_site":"@CodemotionIT","twitter_misc":{"Written by":"Codemotion","Est. reading time":"8 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.codemotion.com\/magazine\/devops\/cloud\/how-to-guide-integrating-spartacus-into-a-multi-project-angular-setup\/#article","isPartOf":{"@id":"https:\/\/www.codemotion.com\/magazine\/devops\/cloud\/how-to-guide-integrating-spartacus-into-a-multi-project-angular-setup\/"},"author":{"name":"Codemotion","@id":"https:\/\/www.codemotion.com\/magazine\/#\/schema\/person\/201bb98b02412383686cced7521b861c"},"headline":"How To Guide: Integrating Spartacus Into a Multi-Project Angular Setup","datePublished":"2023-02-09T08:18:00+00:00","dateModified":"2024-05-22T16:11:48+00:00","mainEntityOfPage":{"@id":"https:\/\/www.codemotion.com\/magazine\/devops\/cloud\/how-to-guide-integrating-spartacus-into-a-multi-project-angular-setup\/"},"wordCount":1538,"publisher":{"@id":"https:\/\/www.codemotion.com\/magazine\/#organization"},"image":{"@id":"https:\/\/www.codemotion.com\/magazine\/devops\/cloud\/how-to-guide-integrating-spartacus-into-a-multi-project-angular-setup\/#primaryimage"},"thumbnailUrl":"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2023\/01\/iStock-1431034853.jpg","keywords":["Angular","Spartacus"],"articleSection":["Cloud"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.codemotion.com\/magazine\/devops\/cloud\/how-to-guide-integrating-spartacus-into-a-multi-project-angular-setup\/","url":"https:\/\/www.codemotion.com\/magazine\/devops\/cloud\/how-to-guide-integrating-spartacus-into-a-multi-project-angular-setup\/","name":"Integrating Spartacus Into a Multi-Project Angular Setup","isPartOf":{"@id":"https:\/\/www.codemotion.com\/magazine\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.codemotion.com\/magazine\/devops\/cloud\/how-to-guide-integrating-spartacus-into-a-multi-project-angular-setup\/#primaryimage"},"image":{"@id":"https:\/\/www.codemotion.com\/magazine\/devops\/cloud\/how-to-guide-integrating-spartacus-into-a-multi-project-angular-setup\/#primaryimage"},"thumbnailUrl":"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2023\/01\/iStock-1431034853.jpg","datePublished":"2023-02-09T08:18:00+00:00","dateModified":"2024-05-22T16:11:48+00:00","description":"A guide for integrating Spartacus into an Angular multi-brand, multi-country ecosystem e-commerce infrastructure","breadcrumb":{"@id":"https:\/\/www.codemotion.com\/magazine\/devops\/cloud\/how-to-guide-integrating-spartacus-into-a-multi-project-angular-setup\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.codemotion.com\/magazine\/devops\/cloud\/how-to-guide-integrating-spartacus-into-a-multi-project-angular-setup\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.codemotion.com\/magazine\/devops\/cloud\/how-to-guide-integrating-spartacus-into-a-multi-project-angular-setup\/#primaryimage","url":"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2023\/01\/iStock-1431034853.jpg","contentUrl":"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2023\/01\/iStock-1431034853.jpg","width":1386,"height":756,"caption":"Distributed Cloud Computing Concept - Multiple Distributed Clouds Used to Meet Computing Needs and Support Edge Computing - 3D Illustration"},{"@type":"BreadcrumbList","@id":"https:\/\/www.codemotion.com\/magazine\/devops\/cloud\/how-to-guide-integrating-spartacus-into-a-multi-project-angular-setup\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.codemotion.com\/magazine\/"},{"@type":"ListItem","position":2,"name":"DevOps","item":"https:\/\/www.codemotion.com\/magazine\/devops\/"},{"@type":"ListItem","position":3,"name":"Cloud","item":"https:\/\/www.codemotion.com\/magazine\/devops\/cloud\/"},{"@type":"ListItem","position":4,"name":"How To Guide: Integrating Spartacus Into a Multi-Project Angular Setup"}]},{"@type":"WebSite","@id":"https:\/\/www.codemotion.com\/magazine\/#website","url":"https:\/\/www.codemotion.com\/magazine\/","name":"Codemotion Magazine","description":"We code the future. Together","publisher":{"@id":"https:\/\/www.codemotion.com\/magazine\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.codemotion.com\/magazine\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.codemotion.com\/magazine\/#organization","name":"Codemotion","url":"https:\/\/www.codemotion.com\/magazine\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.codemotion.com\/magazine\/#\/schema\/logo\/image\/","url":"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/11\/codemotionlogo.png","contentUrl":"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/11\/codemotionlogo.png","width":225,"height":225,"caption":"Codemotion"},"image":{"@id":"https:\/\/www.codemotion.com\/magazine\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/Codemotion.Italy\/","https:\/\/x.com\/CodemotionIT"]},{"@type":"Person","@id":"https:\/\/www.codemotion.com\/magazine\/#\/schema\/person\/201bb98b02412383686cced7521b861c","name":"Codemotion","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/11\/cropped-codemotionlogo-150x150.png","url":"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/11\/cropped-codemotionlogo-150x150.png","contentUrl":"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/11\/cropped-codemotionlogo-150x150.png","caption":"Codemotion"},"description":"Articles wirtten by the Codemotion staff. Tech news, inspiration, latest treends in software development and more.","sameAs":["https:\/\/x.com\/CodemotionIT"],"url":"https:\/\/www.codemotion.com\/magazine\/author\/codemotion-2\/"}]}},"featured_image_src":"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2023\/01\/iStock-1431034853-600x400.jpg","featured_image_src_square":"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2023\/01\/iStock-1431034853-600x600.jpg","author_info":{"display_name":"Codemotion","author_link":"https:\/\/www.codemotion.com\/magazine\/author\/codemotion-2\/"},"uagb_featured_image_src":{"full":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2023\/01\/iStock-1431034853.jpg",1386,756,false],"thumbnail":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2023\/01\/iStock-1431034853-150x150.jpg",150,150,true],"medium":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2023\/01\/iStock-1431034853-300x164.jpg",300,164,true],"medium_large":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2023\/01\/iStock-1431034853-768x419.jpg",768,419,true],"large":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2023\/01\/iStock-1431034853-1024x559.jpg",1024,559,true],"1536x1536":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2023\/01\/iStock-1431034853.jpg",1386,756,false],"2048x2048":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2023\/01\/iStock-1431034853.jpg",1386,756,false],"small-home-featured":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2023\/01\/iStock-1431034853.jpg",100,55,false],"sidebar-featured":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2023\/01\/iStock-1431034853-180x128.jpg",180,128,true],"genesis-singular-images":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2023\/01\/iStock-1431034853-896x504.jpg",896,504,true],"archive-featured":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2023\/01\/iStock-1431034853-400x225.jpg",400,225,true],"gb-block-post-grid-landscape":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2023\/01\/iStock-1431034853-600x400.jpg",600,400,true],"gb-block-post-grid-square":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2023\/01\/iStock-1431034853-600x600.jpg",600,600,true]},"uagb_author_info":{"display_name":"Codemotion","author_link":"https:\/\/www.codemotion.com\/magazine\/author\/codemotion-2\/"},"uagb_comment_info":0,"uagb_excerpt":"Spartacus is a composable Javascript storefront for SAP Commerce Cloud, a widely-used e-commerce solution suitable for omnichannel business ecosystems. Spartacus is developed with Angular, Google&#8217;s Typescript-based, open-source web framework. It is designed to be lightweight, customizable, and modern, with the ability to support the most recent architectural and development practices. Spartacus makes it easy to&#8230;&hellip;","lang":"en","_links":{"self":[{"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/posts\/20087","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/users\/64"}],"replies":[{"embeddable":true,"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/comments?post=20087"}],"version-history":[{"count":3,"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/posts\/20087\/revisions"}],"predecessor-version":[{"id":27786,"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/posts\/20087\/revisions\/27786"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/media\/20018"}],"wp:attachment":[{"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/media?parent=20087"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/categories?post=20087"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/tags?post=20087"},{"taxonomy":"collections","embeddable":true,"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/collections?post=20087"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}