Plugins & themes development
Create, build, and publish system plugins, app plugins, and themes for the GZ266 marketplace.
Plugin types
- System plugin โ Platform-level; tenants enable/disable in settings.
- App plugin โ Flutter module; used by apps (e.g. payment, analytics).
Themes define typography, colors, and layout for app UIs.
Developing a plugin (CLI)
- Create:
gz plugin create my-plugin --type app(orsystem). Generates a project withplugin.jsonmanifest. - Build:
gz plugin buildproduces a.tar.gzarchive. - Publish:
gz plugin publish --api-url <url> --token <token>(or setGZ_API_URLandGZ_TOKEN). Uploads to the marketplace after approval.
See CLI for install and options.
Publishing via API
You can submit an item for publishing with a JWT and MARKETPLACE_PUBLISH permission:
POST http://localhost:3001/api/marketplace/publish
Authorization: Bearer <token>
X-Tenant-Id: <tenantId>
Content-Type: application/json
{
"type": "APP_PLUGIN" | "THEME" | "SYSTEM_PLUGIN",
"name": "My Plugin",
"slug": "my-plugin",
"version": "1.0.0",
"description": "...",
"appPluginId": "<id>" // or themeId / systemPluginId
}The entity (AppPlugin, Theme, or SystemPlugin) must already exist in the platform (e.g. created by an admin or via a separate flow). Publishing creates a marketplace listing that goes through moderation (PENDING_APPROVAL โ APPROVED).
Themes
Themes are stored in the platform with themeConfig (JSON), previewImages, and version. To publish a theme to the marketplace, use POST /api/marketplace/publish with type: "THEME" and themeId. Theme creation/update may require admin or a dedicated API; see the API docs for available endpoints.
Versioning
Use semantic versions (e.g. 1.0.0) in your manifest and when publishing. The marketplace supports version and changelog on each item. Updating an existing listing may require a new publish call with an incremented version, depending on platform policy.