# 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)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.scandipwa.com/tutorials/accessing-magento-2-controllers/step-1-creating-magento-2-module.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
