Magento 2.0 is a modular system as you can see. That is why it is important to maintain all the code organized, and it couldn't be different with Magento extensions. In previous chapters you saw all the directory structure of Magento, but now let's give special attention to the basic Magento module file structure:

In order to create a new extension according to the preceding image, we must create the same directory structure. However, how will they interact with the Magento system?
Some of these directories have an important role to play in the Magento system. They are directories that are responsible for providing basic functionalities and coupling between modules and the Magento system:
Block: Blocks are View classes that are responsible for providing visualization layers between the logical and frontend layer.Controller: These control all the actions of the Magento. Web servers process the requests and Controller redirects them to specific modules according to the URL.etc: This stores all the module XML configuration files.Helper: This stores auxiliary classes that provide forms, validators, and formatters, which are commonly used in business logic.Model: This stores all business logic and the access layer to the data.Setup: Setup classes are classes that control installation and upgrading functionalities.The other directories support additional configurations and implementations of the module; these are as follows:
The files presented in the root directory are files on which you worked before. The LICENSES and README files are those available for extension distribution purposes.