Plugin overview
Understand how plugins extend the Sellforge kernel.
A Sellforge plugin is a Node.js package loaded into the kernel process. It exports a registration function and can use the supplied context to subscribe to events, read settings, interact with core services, and register periodic work.
When to use a plugin
Use a plugin for behavior that needs to run inside the kernel, such as reacting to an order lifecycle event. Use the HTTP API for an external application that needs commerce data.
Runtime model
The loader reads enabled records from installed_plugins, runs their migrations, imports their packages, and invokes register(ctx). Returned services are stored in the runtime registry.
Plugins currently run platform-wide in a process. Installation, enable/disable actions, and settings changes are restricted to platform context. A merchant administrator can inspect installed plugin status but cannot independently activate platform code.
Available building blocks
- Registration and lifecycle
- Package manifest
- Order lifecycle hooks
- Context services
- SQL migrations
- Installation and operations
Implementation boundary
The current context does not expose a Fastify application or an automatic admin-page registration API. A manifest field alone does not add an HTTP route or a page to the new shop admin.
This guide documents the runtime available in the kernel. Package publishing, marketplace distribution, and storefront UI extension points need their own supported integration before they can be used.
Start building
The quickstart creates a minimal package using the same default-export registration shape as the kernel's own test fixture.
Found something unclear? Let us know