Directory Structure

A high-level overview of how files are organized in Scandi

When creating an app for the first time, the folder structure of the application will look as follows:

πŸ“  my-app
β”œβ”€β”€ πŸ“„  README.md
β”œβ”€β”€ πŸ“„  composer.json
β”œβ”€β”€ πŸ“  i18n
β”œβ”€β”€ πŸ“  magento
|  β”œβ”€β”€ πŸ“  etc
|  |  └── πŸ“„  view.xml
|  β”œβ”€β”€ πŸ“„  registration.php
|  └── πŸ“„  theme.xml
β”œβ”€β”€ πŸ“  node_modules
β”œβ”€β”€ πŸ“„  package.json
β”œβ”€β”€ πŸ“  public
β”œβ”€β”€ πŸ“  src
└── πŸ“„  yarn.lock

There publicand src folders are empty. Do not panic! You will use them to create overrides. The application should compile with them being empty!

ScandiPWA theme src structure

ScandiPWA theme (aka. your parent theme) has the same root folder structure, but much more files in the src folder. They are structured as follows:

πŸ“  src
β”œβ”€β”€ πŸ“  component # a place for all components
β”œβ”€β”€ πŸ“  query # a place for GraphQL queries
β”œβ”€β”€ πŸ“  route # a place for all root pages
β”œβ”€β”€ πŸ“  store # a Redux store declarations
β”œβ”€β”€ πŸ“  type # a PropType declarations
β”œβ”€β”€ πŸ“  util # all utility functions
β”œβ”€β”€ πŸ“„  index.js # application entrypoint
└── πŸ“„  service-worker.js # service worker entrypoint

More information about the structure and contents of these folders:

CMA (Create Magento App) structure

CMA structure is similar to the default Magento folder structure, but with a package.json file in the root directory. For more details, refer to the official CMA guide.

Last updated