└── 📁 packages
├── 📁 scandipwa # theme sources
├── 📁 m2-theme # for building a magento2 theme
├── 📁 bundle-analyzer
├── 📁 router # the frontend routing mechanism
└── 📁 framework
Lerna is symlinking packages between each other, which means if one NPM package contains a dependency on some other NPM package and there is a version of that package locally, it will be used instead of the one stored in the remote NPM package registry.
The main development happens in the
packages/scandipwafolder, this folder structure is matching the folder structure of any other ScandiPWA project, please see below for more details.
ScandiPWA extends Magento 2 BE in many different places. Almost in every aspect! We do it to ensure consistency and provide new features before the Magneto team does it, this allows us to have the broadest feature support.
- scandipwa/menu-organizer – an Open-Sourced fork of Scandiweb menu manager implementation, that allows for menu management (linking items to CMS, Category, Product, or any other URLs). It contains both implementation and GraphQl endpoints.
- scandipwa/persisted-query – a GraphQl query persistence (caching) mechanism developed prior to Magento 2 original one. Its main distinction is the usage of hashes while communicating with the server via "GET" requests. This allows using large queries without worrying about reaching the limit of characters in the URL.
- scandipwa/slider-graphql – an Open-Sourced fork of Scandiweb slider manager implementation, that allows inserting slider widgets into the CMS content. It contains both implementation and GraphQl endpoints.
- scandipwa/cms-graphql – this module allows the construction of CMS widgets on the front-end by responding with a pseudo-code of them from the server. This allows us to request the necessary data for a widget on the front-end keeping all template code reactive.
- scandipwa/catalog-graphql – the module which contains fixes and extensions to Magento 2 catalog GraphQl query definitions. This includes URL-rewrite-related fields, improvements for search performance, PLP/PDP context awareness, patches to catalog-related issues, and other GraphQl schema extensions.
- scandipwa/route717 – is responsible for the display of the ScandiPWA root template
scandipwa_root.phtmlfor most pages of the store (while in Magento theme mode). It allows bypassing requests directly to Magento 2 controllers.
- scandipwa/performance – removes the "query in the loop" issue from catalog GraphQl resolvers, making sure the entities are requested once per collection. Responsible for attribute, stocks, and image requests of products.
- scandipwa/quote-graphql – the module that contains an alternative implementation for Magento 2 quote (cart / checkout) related GraphQl endpoints. It's main difference to Magento 2 is that we only pass-in the quote ID for guest users, while logged-in users are resolved from a cookie. It also contains patches to original Magento 2 methods.
- scandipwa/urlrewrite-graphql – an extension to url-rewrites resolver that makes sure status codes returned from the server are should indeed be visible (stocks, enabled / disabled, active / inactive, etc). Also ads SKU for product URL rewrite response.
- scandipwa/cache – a granular cache control for ScandiPWA, appends cache-identity tags to GraphQl responses. It is an alternative implementation to Magento 2 original solution (which we also developer prior to them). Main difference – it is event based, so all collection, repository load events are included into the response.