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:
Barcode Scanner Pro
Enhanced barcode scanning with batch mode
by community · v2.1.0
Analytics Dashboard
Advanced charts and value trend reports
by invenicum · v1.0.3
Email Notifier
Send alerts via email on stock events
by community · v1.2.0
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
Browse Available Plugins
Switch to the Market tab to view all available plugins. Each card displays the name, description, author, version, and installation status.
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.
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
Configuring Plugins
Each plugin may have configurable settings accessible through the plugin editor:
Basic Settings
NameDisplay name for the pluginDescriptionBrief explanation of functionalitySlotWhere the plugin integrates (e.g., item actions, dashboard widgets)VersionSemantic version number
Advanced Settings
UI ConfigCustom interface elementsPublic/PrivateControl plugin visibility in the marketplaceSTAC 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
Future<void> initSdk({String? userName}) async {
if (_isInitialized) return;
await Stac.initialize(
actionParsers: [InvenicumSdkParser(userName: userName)],
);
_isInitialized = true;
}Available SDK Methods
showAlertDisplay a notification to the user
getUserNameGet the current user's name
navigateNavigate to a route in the app
{
"action": "invenicum_sdk",
"method": "showAlert",
"params": {
"message": "Custom notification message"
}
}Creating Custom Actions
{
"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
Open Plugin Editor
Click the “Nuevo Plugin” floating action button on the plugins screen.
Define Plugin Metadata
Fill in the basic information:
Configure UI and Actions
Define your plugin’s interface and behavior using the STAC format. Reference the SDK documentation for available methods.
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
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:
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
Next Steps