A plugin in Vendure is a specialized Nestjs Module that is decorated with the
VendurePlugin class decorator. This diagram illustrates how a plugin can integrate with and extend Vendure.
- A Plugin may define logic to be run by the Vendure Worker. This is suitable for long-running or resource-intensive tasks.
- A Plugin can modify any aspect of server configuration via the
- A Plugin can extend the GraphQL APIs via the
shopApiExtensionsmetadata property and the
- A Plugin can interact with Vendure by importing the
PluginCommonModule, by which it may inject any of the core Vendure services (which are responsible for all interaction with the database as well as business logic). Additionally, a plugin may define new database entities via the
entitiesmetadata property and otherwise define any other providers and controllers just like any Nestjs module.
- A Plugin can run arbitrary code, which allows it to make use of external services. For example, a plugin could interface with a cloud storage provider, a payment gateway, or a video encoding service.