Prerequisites

Before proceeding, ensure you have the following:

  1. An Amplication workspace with a project that is connected to a Git organization and has a plugin repository configured as explained here.

Download and Register the “Blueprint Plugin Template” Plugin

1

Download the Plugin Template

Download the Amplication Blueprint Plugin Template, which provides the foundational structure for plugin development.

You can find the template in the official Amplication plugins repository:
Blueprint Plugin Template Repository.

To download the folder, use the GitHub Directory Downloader or download it directly:
Download Plugin Template.

2

Copy the Template into the Plugin Repository

After downloading the ZIP file, extract its contents and copy them into your plugin repository under a folder named blueprint-plugin-template.

blueprint-plugin-template folder

3

Install Dependencies and Build the Plugin

Execute the following commands to install dependencies and build the plugin

cd blueprint-plugin-template
npm i
npm run build
4

Commit and Push the Changes

Commit the copied template files to Git and push them to the repository:

git add blueprint-plugin-template
git commit -m "Added blueprint plugin template"
git push origin main
5

Create a New Blueprint in Amplication

In Amplication, create a new blueprint named “Amplication Plugin”. This blueprint will serve as a foundation for generating new plugins.

6

Register the Plugin in the Private Plugins List

Register the newly created plugin in the private plugins list and associate it with the “Amplication Plugin” blueprint.

Then, either add a new version of the plugin, or enable the @dev version - and publish the plugin.


Create New Plugins Using the Registered Plugin

Follow these steps to create a new plugin using the registered Blueprint Plugin Template.

1

Navigate to the Catalog

Go to the Catalog in Amplication.

2

Create a New Resource

Create a new resource using the “Amplication Plugin” blueprint.

Create Amplication Plugin

3

Name Your Plugin and create the resource

Provide a name for the new plugin, e.g., Java Redis.

Click on Create Resource

The plugin name can include spaces and will be automatically formatted appropriately during the generation process.

4

Install the Required Plugin

Go to the Plugins tab in the new resource and install the Blueprint Plugin Template plugin.

5

Generate the Code

Click Generate Code to have Amplication generate the boilerplate for your new plugin in your plugin repository.

6

Customize Your Plugin

After merging the Pull Request into your repository, fetch the latest version from your IDE and start working on your new plugin.

Happy coding 👩‍💻!

To simplify plugin creation, you can create a template using the Amplication Plugin blueprint that includes the Blueprint Plugin Template plugin.


Conclusion

By following these steps, you can efficiently generate the required boilerplate for new Amplication plugins, ensuring consistency and reducing development time.