Repository structure
Last updated
Last updated
The main ScandiPWA repository scandipwa/scandipwa
is a mono-repository, containing multiple NPM packages in the packages
directory. They are managed by Lerna.
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/scandipwa
folder, 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/service-worker – the module allows reaching the /serwice-worker.js
in Magento 2.
scandipwa/installer – prior to version 4, this module was responsible for registering ScandiPWA as Magento 2 theme. Now, it only supplies the support for custom "ScandiPWA" theme type 4
.
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.phtml
for 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/customer-graph-ql – customer information GraphQl endpoints developed prior to Magento 2 original ones. Provides email confirmation, forgot password, and reset password mutations.
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/wishlist-graphql – an alternative wishlist endpoints for Magento 2 which we developed before original Magento 2 GraphQl for wishlist appeared.
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/store-graphql – an extensions to Magento 2 store configuration GraphQl. Provides 20+ missing configurations.
scandipwa/customization – look and feel configurations for ScandiPWA installed in the Magento theme mode. Allows to change colors, CMA blocks, favicons from the Magento 2 admin pannel.
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.
scandipwa/locale – switches the langauge code for ScandiPWA .phtml
template (while installed in Magento theme mode).
scandipwa/contact-graphql – GraphQl endpoints for a contact form display and handling.
scandipwa/klarna-graphql – GraphQl endpoints for Klarna payment method. Will be removed from core dependecies in the future and moved to a separate extension.
scandipwa/compare-graphql – an alternative compare endpoints for Magento 2 which we developed before original Magento 2 GraphQl for compare appeared.
scandipwa/customer-downloadable-graphql – GraphQl endpoints that provide downloadable product preview and download in customer account.
scandipwa/directory-graphql – an extensions to Magento 2 country confiurations, providing is_state_required
and localized country names.
ScandiPWA GitHub organization contains more than 65 repositories, where most of them are Magento 2 modules that were previously used or are used by ScandiPWA / ScandiPWA OS extensions.