AdvancedPlugins

ADVANCED

Plugins

Extend Invenicum functionality with the plugin system — install community plugins, configure settings, and build your own using the STAC framework.


Overview

The Invenicum plugin system allows you to extend and customize your inventory management experience. Plugins can add custom actions, integrate with external services, modify UI components, and automate workflows using the STAC (Stateless Action Components) framework.

Custom Actions

Add new behaviors to inventory items

Integrations

Connect with external services

UI Components

Modify and extend the interface

Automation

Automate repetitive workflows

Plugin Marketplace

Access the plugin marketplace to discover community-created extensions:

3 tabs
Installed

Barcode Scanner Pro

Enhanced barcode scanning with batch mode

by community · v2.1.0

Available

Analytics Dashboard

Advanced charts and value trend reports

by invenicum · v1.0.3

Update

Email Notifier

Send alerts via email on stock events

by community · v1.2.0

Step 01

Access the Plugin Screen

Navigate to the Plugins section from the main menu. You’ll see three tabs:

Library

Installed plugins

Own

Your created plugins

Market

Community plugins

Step 02

Browse Available Plugins

Switch to the Market tab to view all available plugins. Each card displays the name, description, author, version, and installation status.

Step 03

Install a Plugin

Click on a plugin card and select “Instalar” to add it to your library. The plugin will be immediately available after installation.

Managing Installed Plugins

Activating and Deactivating

Installed plugins can be toggled on or off without uninstalling. Active plugins execute their actions when triggered.

plugin_provider.dart:182
await togglePluginStatus(id, status);

Updating Plugins

When a new version is available, an update button appears on the plugin card. The system automatically checks for updates by comparing your installed version with the latest version in the marketplace.

Uninstalling Plugins

1. Navigate to your plugin library
2. Select the plugin you want to remove
3. Choose “Uninstall” from the options
4. Confirm the action

Configuring Plugins

Each plugin may have configurable settings accessible through the plugin editor:

Plugin Configuration Options

Basic Settings

  • NameDisplay name for the plugin
  • DescriptionBrief explanation of functionality
  • SlotWhere the plugin integrates (e.g., item actions, dashboard widgets)
  • VersionSemantic version number

Advanced Settings

  • UI ConfigCustom interface elements
  • Public/PrivateControl plugin visibility in the marketplace
  • STAC ActionsDefine custom actions and behaviors

Plugin SDK Overview

Invenicum plugins are built using the STAC framework, which provides a declarative way to define actions and UI components.

SDK Initialization

plugin_service.dart:32
Future<void> initSdk({String? userName}) async {
if (_isInitialized) return;

await Stac.initialize(
  actionParsers: [InvenicumSdkParser(userName: userName)],
);
_isInitialized = true;
}

Available SDK Methods

showAlert

Display a notification to the user

getUserName

Get the current user's name

navigate

Navigate to a route in the app

showAlert example
{
"action": "invenicum_sdk",
"method": "showAlert",
"params": {
  "message": "Custom notification message"
}
}

Creating Custom Actions

plugin config (STAC)
{
"id": "my_custom_plugin",
"name": "My Custom Plugin",
"version": "1.0.0",
"slot": "item_actions",
"actions": [
  {
    "type": "invenicum_sdk",
    "method": "showAlert",
    "params": {
      "message": "Action executed successfully!"
    }
  }
]
}

Creating Your Own Plugins

Step 01

Open Plugin Editor

Click the “Nuevo Plugin” floating action button on the plugins screen.

Step 02

Define Plugin Metadata

Fill in the basic information:

Unique ID (auto-generated)
Display name
Description
Target slot
Initial version (1.0.0)
Step 03

Configure UI and Actions

Define your plugin’s interface and behavior using the STAC format. Reference the SDK documentation for available methods.

Step 04

Test and Publish

Save your plugin to test it locally. When ready, mark it as public to share with the community.

Plugins created by you can be edited at any time. For community plugins, submit a pull request to suggest changes.

GitHub Integration

Invenicum plugins are backed by GitHub for version control and collaboration:

Official Plugins

Stored in the main repository

Community Plugins

Fetched from the marketplace

Auto-sync

Your plugins are auto-synchronized

Pull Requests

Suggest improvements to plugins

Publishing to Marketplace

plugin_service.dart:68
Future<Map<String, dynamic>> createPlugin(
Map<String, dynamic> pluginData,
) async {
final response = await _dio.post('/plugins', data: pluginData);
return Map<String, dynamic>.from(response.data);
}

The backend automatically:

1Validates plugin structure
2Creates a GitHub entry (for authorized authors)
3Makes it available in the marketplace
4Tracks download statistics

Best Practices

Performance

  • Keep plugin actions lightweight
  • Avoid blocking UI operations
  • Use async operations for network calls
  • Cache data when possible

User Experience

  • Provide clear descriptions and docs
  • Use appropriate slots for your functionality
  • Test with different screen sizes
  • Handle errors gracefully with user feedback

Version Management

  • Use semantic versioning (major.minor.patch)
  • Document breaking changes
  • Test updates before publishing
  • Maintain backward compatibility

Troubleshooting

Plugin Not Appearing
  • Ensure the plugin is activated in your library
  • Check that the slot configuration matches your use case
  • Verify the plugin hasn’t been uninstalled
  • Refresh the plugin list
Update Failed
  • Check your internet connection
  • Verify the new version is compatible
  • Try uninstalling and reinstalling
  • Check for error messages in the console
SDK Method Not Working
  • Verify the method name is correct
  • Check that parameters match the expected format
  • Ensure the SDK is initialized before calling methods
  • Review the plugin logs for errors