> For the complete documentation index, see [llms.txt](https://docs.scandipwa.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.scandipwa.com/tutorials/accessing-magento-2-controllers/step-1-creating-magento-2-module.md).

# STEP-1 Creating Magento 2 Module

1. Let’s Create Empty Module Folder **app/code/ScandiPWA/Version**\
   **ScandiPWA** is **\[VENDOR]**
   1. **Let’s Create Empty Module Folder app/code/ScandiPWA/Version**\
      **ScandiPWA is \[VENDOR]** module provider\
      **Version \[MODULE]**
   2. In \[**MODULE]** create file **registration.php**

{% code title="app/code/ScandiPWA/Version/registration.php" %}

```php
<?php
\Magento\Framework\Component\ComponentRegistrar::register(
   \Magento\Framework\Component\ComponentRegistrar::MODULE,
   'ScandiPWA_Version',
   __DIR__
);
```

{% endcode %}

3\. Create **etc** folder in **\[MODULE]** and **module.xml** in it.

{% code title="app/code/ScandiPWA/Version/etc/module.xml" %}

```markup
<?xml version="1.0" ?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
   <module name="ScandiPWA_Version" />
</config>

```

{% endcode %}

4\. Now we need to run **`setup:upgrade`** and find our module in output\
if you are running[ **CMA setup**](https://docs.create-magento-app.com/) open console in **\<PROJECT ROOT>** run `npm run cli` and then \
`m set:up`you should be able to find newly created module in output

![](https://lh3.googleusercontent.com/usbz7B7dB5KLITB-ze82GrvlFlZ_vSr7htoyuuREd2bYPXm_zPU0WTdnwq-qcztmZNiZwmC70G-nNgbPhI-DyLKftddtfVFvw4U198zhIKsedbFUlV8T3tBhxvqXyD0L-ivtyUTI=s0)

**Useful Materials**\
[CMA Enter application CLI](https://docs.create-magento-app.com/getting-started/available-commands/cli#yarn-cli-or-npm-run-cli)\
[Create a New Module](https://devdocs.magento.com/videos/fundamentals/create-a-new-module/)\
[bin/magento (Open Source) Magento CLI](https://devdocs.magento.com/guides/v2.4/reference/cli/magento.html)
