Wasim's Site

Sitecore Helix Scaffolder

Scaffold a Sitecore Helix solution. Define Foundation, Feature, and Project modules and export the folder tree plus a PowerShell script that creates the full solution.

Solution

Modules

Foundation
Serialization
Feature
Navigation
Project
Website

Folder Structure Preview

Scaffold Script (PowerShell + dotnet CLI)

Creates the folders, class libraries, test projects, and the .sln. Run in an empty directory.

Scaffolding Helix Solutions Without the Setup

Standing up a new Helix-compliant Sitecore solution means creating the same structure every time: src/Foundation, src/Feature, src/Project, and inside each module a code project with Controllers, Models, Views, and App_Config patch folders — plus tests and serialization. Doing it by hand invites inconsistency; the Yeoman generators require a local Node toolchain. This scaffolder lets you design the module list in the browser and produces a single PowerShell script that builds the whole thing with the dotnet CLI.

The Three Helix Layers

  • Foundation: shared, stable frameworks (DI, serialization, indexing, ORM). Other layers build on these.
  • Feature: self-contained business features (navigation, news, search). Features must never depend on each other.
  • Project: the composition layer — site definitions, page types, design — that ties features together for a concrete website.

How to Use This Scaffolder

  1. Name the solution — it becomes the root namespace (e.g. Acme.Feature.Navigation).
  2. Add modules to each layer; toggle test projects and serialization folders.
  3. Review the folder tree to confirm the structure.
  4. Download and run the .ps1 in an empty directory — it creates folders, csproj files, and the .sln.

Frequently Asked Questions

What is Sitecore Helix?
Helix is Sitecore's official set of guidelines and recommended practices for solution architecture. Its core convention is organizing code into three layers — Foundation (shared frameworks), Feature (business features), and Project (site-specific composition) — with strict dependency rules between them.
What are the dependency rules between layers?
Dependencies flow downward only: Project modules may depend on Feature and Foundation; Feature modules may depend only on Foundation (never on other Features); Foundation modules may depend only on other Foundation modules. This keeps features isolated and swappable.
What does this scaffolder generate?
Two things: a visual folder-tree preview of the conventional Helix structure (src/<Layer>/<Module>/code|tests|serialization), and a PowerShell script using the dotnet CLI that creates the folders, class library projects, optional xUnit test projects, and the .sln file.
How does this compare to the Yeoman Helix generators?
Community Yeoman generators scaffold Helix solutions from templates but require Node.js and local setup. This tool runs in your browser — design the structure visually, then run one script. For heavily customized templates (TDS, Unicorn, Docker), use the script as a starting point.
What goes in each module's folders?
code/ holds the module's class library (Controllers, Models, Views, App_Config patch files under Include/<Layer>), tests/ holds the matching test project, and serialization/ holds serialized Sitecore items (Unicorn, TDS, or Sitecore Content Serialization).

Official Resources