CMS extension boilerplates

Generate your extension boilerplates here for rapid development kick-off. All extension boilerplates are configurable and can provide support for Composer, auto-loading and comfort functions.

Generate TYPO3 Extension

About

As I started deep-diving into extension development for TYPO3 and WordPress at work, I quickly realised creating extension base code was quite tedious and repetitive.

TYPO3

The idea to create the extension boilerplate for TYPO3 extensions came from using the Sitepackage-Builder by Benjamin Kott. This builder lets you generate a site package to easily set up your TYPO3 page.

So why not create a generator for basically every extension you ever need? Of course, the boilerplate contains only base files needed by every extension, but maybe a future release will provide more customization options to make kickstarting extension development even more comfortable.

WordPress

Regarding WordPress I soon discovered the WordPress Plugin Boilerplate Generator by Enrique Chávez which is actually based on Tom MacFarlin's WPPB foundation plugin.
Start point for theme development has been underscores or _s by Automattic.

Now, the WPPB Generator has seen some time as it launched in 2014, which feels like decades ago. So with the whole world in lock-down I decided to create a 2020 version of the plugin generator and combine it with a theme generator too.

"Why do we need yet another plugin or theme generator for WordPress?", you might ask. And right so, that is a legitimate question. First of all this project is going to make my life as a developer a lot easier. I have a single source of plugin and theme boilerplate generation. That's why everything happening here (and in the generated plugins and themes) is based on my point of view and method of developing WordPress themes and plugins, although I tried to incorporate best practises as well as some comfort functionality.

The next goal is to provide you with a starting point for your WordPress plugins and themes. I did search some time and compared different generators. Mostly the theme generators came up with some libraries/plugins needed or lacked some files essential for theming.
This generator concentrates on its single task: provide boilerplates for plugins and themes (and only that). No plugins needed, no assertions made about styling framework, simply WordPress.

Features TYPO3 extension

Composer support

Composer is a tool for dependency management in PHP. As Composer is the preferred way to install TYPO3 and extensions every extension is Composer-based.

TYPO3 Coding Conventions

The generated code follows the TYPO3 Coding Conventions and is based on the most recent versions 11.5 LTS and 12.4 LTS. It includes all basic files to install the extension and start developing custom business logic.

Features WordPress

Composer support

Composer is a tool for dependency management in PHP. Every plugin and theme can be configured to provide Composer support. Either to be installed in an Composer based WordPress (e. g. Bedrock) or for requiring packages of its own.

PSR-2/PSR-12

Despite the fact that WordPress does not use PSR-2/PSR-12 and is using its own coding standard instead, I decided to use PSR-2/PSR-12 anyway as I think the code is completely encapsulated in the respective theme or plugin and every (serious) PHP developer is familiar with PSR-2/PSR-12.

View system

Every now and then I came across themes and plugin which were using direct HTML output in PHP files or even in the body of function declaration. To avoid mixing of concerns the generated themes and plugin come with a view system for WP admin area and front end.

Helpers

Utilizing the options mechanism of WordPress every theme and plugin comes with helper classes to access, store and delete options and post meta data. All options and meta key are prefixed with a string derived from the slug you provide.

Translation-ready

To kick-off the localization of your plugin or theme, a text domain is configured and loaded. A language folder resides in the plugin/theme which holds a pot file to be the starting point for your translations (i. e. for use with programs like Poedit).

FAQ

How does the generator work?

First go to the theme configuration or plugin configuration page and provide the necessary fields. In the next step you can preview the data (and correct it if needed). After hitting the generate button, your theme or plugin will be created and you can download it as a zip file.

What happens to the data I provide?

Your data is stored in the database for a short period of time (15 minutes) from the moment of generating the preview. After that time it will be automatically deleted by a script and cannot be restored. This means: if you do not download the plugin or theme generated, you will have to start over.

And of course your data is never shared with any third parties (except any third party proving legitimate interest). Please have a look at the privacy page.

How can I support you?

If you want to submit a bug report or have a feature request, please open an issue over at GitHub.

Maybe you even consider making a donation to support maintenance and further development.