About component file structure

One of the first things you can do to get started with component development is to understand and set up the file system. Each type of component has a different file structure, although all components require certain files.

In addition, you can choose the component root directory to start development. The following sections have more information.

Root directory location

data-src=/includes/component-root.md

Required files

The following files are required for all components:

Each component has an additional component-specific required file:

Component Type
Required file
Description
magento2-module
module.xml
This file defines basic information about the component, such as component dependencies and version number. Adobe Commerce and Magento Open Source use the version number to determine which schema and data to update when executing bin/magento setup:upgrade.
magento2-theme
theme.xml
Describes the theme. File specifies a theme name in the title node, a parent theme (optional), and a theme preview image (optional) in the media/preview_image node.
magento2-language
language.xml
Declares a language translation package.