Technology Blog Posts by SAP
cancel
Showing results for 
Search instead for 
Did you mean: 

Introduction

Starting a new SAP Commerce Cloud (CCv2) project often involves a lot of setup overhead: configuring the platform, creating required modules (storefront, accelerator or custom extensions), setting up dependencies, database, hotfolders/cloud integration, and ensuring the project follows best practices. That’s where ccv2-project-template comes in: a starter template that gives you a working, best-practice project layout — with backend, storefront, build scripts and local dev setup — out of the box.

Markus Perndorfer, an SAP Commerce expert and community contributor, created the ccv2-project-template — a starter template that gives you a clean, production-ready project skeleton for SAP Commerce Cloud.

GitHub: https://github.com/sap-commerce-tools/ccv2-project-template

In this blog, we’ll walk through:

  • What ccv2-project-template offers — its structure and components
  • Why using a template matters (benefits)
  • A step-by-step guide to use it to spin up your own CCv2 project
  • Some customization tips (especially useful for B2B / B2C / Spartacus setups)
  • Pitfalls / what to watch out for

What Is ccv2-project-template — At a Glance

The ccv2-project-template is a GitHub starter template for CCv2. It provides:

  • A ready-made CCv2 project structure
  • Gradle-based build using the Commerce Gradle plugin
  • core-customize folder with clean extension groupings
  • Storefront setup under js-storefront
  • Docker-based local environment (DB + hotfolder simulation)
  • Manifest-based 
  • Standardized B2C/B2B-compatible layout

Why Use a Template — Key Benefits

Using ccv2-project-template gives several advantages vs. “rolling everything yourself”:

  • Faster time to first compile/run: You don’t spend weeks manually wiring platform, extensions, storefront, DB, etc.
  • Consistency and Best Practices baked in: Since the template reflects a best-practice layout, team-to-team variability reduces; easier onboarding for developers.
  • Simpler local development: Docker + automated scripts make it easy for any dev to spin up working local instance.
  • Easier upgrades / maintenance: Starting with a standard baseline means future upgrades (patches, version bumps) are easier — fewer custom hacks/spaghetti configurations.
  • Better separation of concerns: frontend vs backend vs config vs data — neatly separated, making architecture cleaner (and compatible with CI/CD, modular builds).
  • Standard storefront integration: If you plan to use a modern JS-based storefront (Spartacus / headless / composable), the template already gives structure.
  • Given that many teams using CCv2 may have tight deadlines (especially in B2C setups), this template significantly reduces “ramp-up” overhead.

Step-by-Step: Set Up a New CCv2 Project Using ccv2-project-template:

1. Clone / Fork the template repo

git clone https://github.com/sap-commerce-tools/ccv2-project-template.git my-commerce-project  
cd my-commerce-project

You can also fork if you plan to maintain your customizations separately.

2. Explore the structure:

  • core-customize/ → your core and custom extensions
  • js-storefront/ → JS storefront 
  • docker-resources/ → DB + Azurite
  • manifest.json → platform bootstrap configuration

3. Ensure you have prerequisites

  • Java & Gradle (Gradle wrapper is included / configured; the build script uses Gradle). 
  • Database system (or you can rely on the dockerized DB setup as provided)
  • If using cloud-hotfolder simulation: make sure Docker / Azurite (or equivalent storage emulator) works on your machine.

4. Use Gradle + sap.commerce.build.ccv2 plugin to bootstrap

In core-customize/build.gradle.kts, you will see the build configured with sap.commerce.build and sap.commerce.build.ccv2 plugins. 

Basic commands to run:

CommandPurpose
./gradlew bootstrapPlatformUnpacks SAP Commerce platform + necessary extensions based on manifest.json
./gradlew installManifestAddonsInstall the addons/extensions defined in manifest.
./gradlew yclean yall(or equivalent)Build & compile all extensions (similar to ant clean all) — i.e. full build.
./gradlew setupLocalDevelopment A custom task defined by the template that orchestrates bootstrap + DB + hotfolder + addons + dev properties — basically gets local dev ready. 

5. Commit / Version Control & Team Onboarding

Because the template gives a clean, well-structured layout, it's easier to commit to Git (or your project's repo), onboard other developers, and maintain standards. Over time, your custom modules/extensions can evolve, but the scaffold remains clean.

Customizing the Template — What to Do for Real-World Projects

The ccv2-project-template is a starting point — but real projects often have specific requirements (B2B, custom extensions, integrations, multiple storefronts).

Here are some tips for customising:

  • Update the manifest.json: Add / remove platform extensions or addons as per your project needs (e.g. custom B2B modules, custom integrations, payment providers). The Gradle plugin supports manifest-based configuration. 
  • Add custom extensions in localextensions.xml: Instead of messy manual extension additions, create your own modules inside core-customize/hybris/custom, making sure they follow the standard extension packaging and build structure.
  • Front-end / storefront flexibility: Replace or extend the js-storefront with your own storefront (headless, custom UI) — since structure is modular, backend doesn’t get tangled.
  • CI / CD integration: Once local dev works, configure pipelines for builds/deploys using this structure (especially helpful for teams working with DevOps / automated deployments).
  • Database / data handling: If you use non-MS SQL DB or need custom data loads (impex, sample data, seeds), augment the setup — but the base scaffolding helps consistency.
  • Environment Configurations: Use different property files / environment-specific configs to isolate dev / QA / prod setups.

What to Watch Out / Potential Pitfalls

While ccv2-project-template is powerful, few caveats:

  • Platform version upgrade: The template is currently based on SAP Commerce 2211. If you plan to upgrade to future versions, ensure compatibility (extensions, manifest, build scripts). 
  • Dependencies / Licenses not automatically resolved: You may need to manually supply SAP Commerce platform zip or dependencies (especially if license-based).
  • Docker resource constraints: Running full SAP Commerce + DB + hotfolder + storefront locally via Docker may be resource heavy (memory, CPU) — ensure your dev machine has enough capacity.
  • Learning curve for Gradle-based build vs traditional Ant/HAC builds: For developers used to older Hybris/Commerce setups, adjusting to Gradle + manifest + modular setup needs some ramp-up.

About the Creator — Markus Perndorfer

Before getting to conclusion, it’s important to recognise the effort behind this template.

Markus Perndorfer has been a long-time SAP Commerce Consultant, Architect, and community builder. Over the years, he has published open-source tools, accelerators, patterns, and best-practice guides that simplify life for Commerce developers.

This template reflects his deep project experience and solves many of the real-world pain points teams face when starting CCv2 implementations.

Conclusion

For anyone working with SAP Commerce Cloud (CCv2), particularly teams building new projects or modernizing existing ones, ccv2-project-template is an excellent foundation. It removes a lot of boilerplate, enforces best practices, and enables faster time-to-development — letting you focus on business logic, features, and integrations rather than setup overhead.

 

SAP Commerce Cloud SAP Commerce

Labels in this area