Your First Generated Module – Mage2gen

So let’s make a Basic Module with your buddy Mage2gen! Stop writing code and start generating!

According to the Magento Docs a basic module contains:

  • etc/module.xml
  • registration.php

source: https://devdocs.magento.com/videos/fundamentals/create-a-new-module/

But as we all know with code comes documentation so when you generate a Basic Module with Mage2gen it already contains a README.md

Besides that in most cases you want to distribute your code through packagist.org or a private repo to do so a composer.json is required so this one is added for you containing you as author when you are logged in!

Generate your first module in 3 steps

  1. Go to https://mage2gen.com/
  2. Fill in your Vendor name (for example: Mage2gen)
  3. Fill in your Module name (for example: Example)

That’s it you have the base of your module!

Now you can preview the code in your browser by clicking a file in the Preview Magento 2 module section on the right hand side.