Repository structure

The main repository

The main ScandiPWA repository scandipwa/scandipwa is a mono-repository, containing multiple NPM packages in the packages directory. They are managed by Lerna.

โ””โ”€โ”€ ๐Ÿ“ 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/scandipwa folder, this folder structure is matching the folder structure of any other ScandiPWA project, please see below for more details.

The Composer packages

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.