Little plugin system for the backend


I am currently thinking about what is the best way to implement a simple plugin system.
I want to create additional features for my app, which are living in a private git repo / npm registry.

If you install a plugin Adonis should npm install this in the background, automatically add necessary service providers and run migration commands etc.

Do you have any tips on how to archive this?
Would i start with node’s child-processes?

And i didn’t found any tutorials on how to create additional packages for AdonisJs, does anybody know such a tutorial?


Is there no way to write additional AdonisJs packages like within laravel for example? With migrations etc.?


Have you looked at the service providers documentation? That includes a basic example of creating a package.

This repo is worth looking at,

And this:

This page also talks about why it’s good to install packages with adonis install:

tl;dr – you can use the instructions.js file to populate config files, and migrations and so forth.