The Storefront component, conceptually like the Administration sits on top of the Core. Contrary to the Administration the Storefront is a SalesChannel and executes in the same process as the Core. It is architecturally in part a Backend for Frontends and a classical PHP application with HTML rendering, JavaScrip enhancements (along the lines of gracefull degragation) and SASS styling as an extension of the Bootstrap Framework.
The Storefront is the least fancy of the components of Shopware 6. If you did some backend development in PHP in the last few years you should find yourself instantly familiar with its structure. The Storefronts main concerns are:
Twigtemplates to display a fully functional shop.
These concerns are mapped to a Web-MVC structure:
Core in this case acts as if it were the domain model wrapping all the sales channel logic. The
Pagelet represent the read model, the
PageletController work directly on core services and are the write model.
Contrary to the core that just contains php logic the storefronts template represents a vast part of the functionality of the component. It is worth looking a little deeper into the
/Resources directory to gain a deeper understanding how the storefront works. When opening the directory you find these subfolders.
<platform/src/Storefront/Resources> └── assets └── build └── config └── src └── script └── style └── tests └── views └── .babelrc.js └── .browserlistrc └── .eslintignore └── .eslintrc.js └── .gitignore └── jest.config.js └── package-lock.json └── package.json └── postcss.config.js └── stylelint.config.js └── webpack.config.js
It is a node application, but for build purposes only! Again long time webdevelopers find a familiar structure, with
assets (Static images and icons),
views (Twig) and