Skip to main content
Version: v1 (Current)

Plugin Architecture and Delivery Contracts

GxP separates reusable plugin definitions, editable work, published versions, project installations and portal bindings. These objects answer different questions: who owns the plugin, which code was built, which release is available, which version the project uses, and who may access it.

Use the Development Overview for workspace navigation and the Data Models guide for domain relationships. This reference describes selected current source contracts; it is not a database migration specification.

Resource families​

ResourceDefinition and versionAuthoring and delivery
AppPluginPage, PluginPageVersionGit repository, branch drafts, PluginPageVariant, build artifacts and verified release snapshots
ThemePluginTheme, PluginThemeVersionTheme template/library configuration and resource-specific publication
WidgetPluginWidget, PluginWidgetVersionWidget script/library/component configuration and resource-specific publication
TilePluginTile, PluginTileVersionCanvas (body_card), data sources, runtime files and resource-specific publication

Page, theme and tile versions have corresponding asset models. Shared names such as current_version_id, is_published or versions() do not make their lifecycle methods interchangeable. Experience Plans compose resources and configuration; they are documented separately in Experience Plans.

Dashboard resource lists and version editors​

The current Developer Hub and established dashboard plugin editors coexist. On the dashboard host, the older resource family lives under /{team}/plugins, outside the project's /p/{team}/{project} path. Confirm the owning team before editing reusable definitions: an installed project App is not the same object as its plugin definition.

Dashboard path below /{team}/pluginsSurface and current task guide
/pagesApp definitions; use Creating an App and the current App variant/build/release workflow
/themesTheme definitions and version editors; use Build a Theme
/widgetsWidget definitions and legacy version fields; use Build a Widget
/tilesTile definitions and version editors; use Build a Dashboard Tile
/plansReusable project composition; use Experience Plans
/external-appsDistributable application definitions/releases; use External Applications
/api-tokensPlugin-management credentials and mappings; use Plugin API Tokens

For the App/theme/widget/tile/external-app version route families, the editor shape is /{resource}/{plugin-slug}/versions/{version-number} under that base. Use the platform version number, not its database row ID or an external application's semantic release string. Some definition detail controllers forward to a numbered version editor; inspect the resulting resource/version rather than assuming a detail link opened the current production release. App drafts, latest numbered row, default release and installed consumer can differ.

The App definition detail path can also repair a missing current-version reference or number a legacy draft while opening it. Do not treat merely opening every old detail URL as a read-only auditing technique. Use source inspection or supported listing/history where a review must avoid mutations.

Access and editor handoffs​

The permission catalog separates resource-family view, manage and delete operations: for example view_plugin_pages, manage_plugin_pages and delete_plugin_pages, with corresponding theme/widget/tile/plan/external-app keys. Do not invent a create-only permission from a button label. Plugin-token list/detail management uses manage_plugin_api_tokens in the reviewed policy mapping; an entry named view_plugin_api_tokens elsewhere in a role vocabulary does not replace that operation's mapping. Team access, route middleware, policies and controller ownership checks still need the intended-account acceptance.

The legacy App version publication action checks its own update/global-publisher/content/processing state and can call the older version model publisher. It is not the Developer Hub's successful-build/repository/production-branch/commit verification path. Use the variant publisher for the current Git-managed App workflow below; do not switch to an older editor to make a failed modern release appear verified.

Theme and Widget hub Publish pages can provide history without a publish control; their task guides show the established version editor's Publishing → Publish Current Version path and the separate next-draft content-copy limits. A new draft must be inspected for layout mode, template/library/component fields rather than assumed to be an exact clone. Tiles have Canvas and their own publication eligibility, as described below. Plans have templates/worklists/provisioning, not an App release number that upgrades every project.

The external-app plugin editor distributes application artifacts. It is separate from the Developer OAuth-client interface, even though both may be called External Apps. A platform numbered version, external version string, uploaded distribution files, published flag and default pointer are separate checks; publishing metadata does not compile, sign or notarize an application.

The modern Developer Hub API Keys workflow issues project data credentials. The dashboard plugin-token editor issues credentials for explicitly mapped supported plugin-management operations. Neither token should be substituted for attendee login, portal runtime page context or the other token type. Copy a newly issued plugin bearer token once into the appropriate server/CI secret store and test read/write/unmapped behavior through the supported catalog; do not expose it in a browser App.

Verify the selected management surface​

Before a change, record team, resource kind, definition slug and actual version/default/consumer. After saving or publishing, inspect the saved history/content and test the installed portal/dashboard or application-download/updater result. If a route or button is absent, check deployment, resource family, permissions and the current guide before constructing a guessed App-style URL for another plugin.

For failure diagnosis, follow the resource task guide and Development Troubleshooting. Confirm the actual publishing path and returned state; a redirect, queued upload or successful save is not final delivery. Keep credentials out of screenshots and review evidence, and retain known-good installed selections for the applicable rollback exercise. Use Defaults, visibility and installations for current App selection semantics and Project Acceptance for evidence, allowed/denied checks and restoration through supported controls. The plugin-token task guide links the supported operation catalog; a mapping does not create an endpoint that is absent there.

From app definition to attendee experience​

  1. A team owns a PluginPage and its reusable source/configuration.
  2. Branch drafts hold mutable app content. A PluginPageVariant identifies a production branch and a release/default selection.
  3. A successful build associates an artifact with its repository, branch and commit.
  4. Publication creates a numbered release snapshot with runtime content and source references.
  5. A ProjectPage installs an app in a project, including its version selection, configuration and dependency bindings.
  6. A ProjectPortalPage connects content to a portal URL and access context. Its content reference is polymorphic: projectPage() and model() both use the same model_type/model_id pair. It is not universally a second independent app association.

A saved source file, successful build, published release and installed project selection are separate states. A portal page is not the repository, and its API key is not a Developer Hub management credential.

App publication checks​

The current App publisher is app/Http/Controllers/Developer/VariantController.php::publish, not a generic call to the legacy version model's publish() method.

The controller checks team ownership and the app update policy, verifies that the variant belongs to the app, validates notes, and acquires an app version lock. The publication path requires:

  • A draft on the variant's production branch with a nonempty bundle and bundle_status of completed.
  • A configured app Git repository.
  • A related successful build artifact for that same repository and production branch, with a 40-character hexadecimal commit SHA.

The transaction advances the mutable draft's version number, creates the published numbered row, and calls PluginPageVersion::copyRuntimeTo. That method copies the selected runtime configuration fields, uploadable files and version assets. The publisher creates a release branch from the built commit, checks the returned commit matches, and creates the release tag. Version numbering is shared across the app, rather than restarting for each variant.

These checks bind the release to a successful built commit. They do not mean every source edit is included: inspect the actual build commit. Nor do they certify runtime permissions, external APIs or all target devices.

Publication failures​

ResultMeaning and next step
409 with build/publish busy messageAnother operation owns the version lock; let it finish before retrying
422 with no successful artifactBuild the intended production branch and inspect its completion status
422 with missing repository or unverified commitCheck repository, branch and successful artifact association; rebuild before retrying
502 with snapshot/publication failureInspect runtime files and Git service availability before retrying

The database transaction does not establish a distributed transaction with Git/storage services. After an interrupted or failed publish, inspect both the release history and remote branch/tag state before corrective work. Do not repair release records by editing database rows directly.

Default selection and installed consumers​

VariantController::setDefaultVersion accepts a published version belonging to the app and selected variant. For the default variant, it also accepts legacy versions with no variant; selecting one adopts that row into the variant. PluginPageVariant::setDefaultVersion handles default selection, including the app's legacy current-version pointer when appropriate.

Publication and default selection are distinct actions. Project consumers can have explicit version selections, so publishing or changing a default is not proof that every project is upgraded. Check the installed app and actual rendered portal. See Variants and Releases.

Other editors have different lifecycles​

The current Developer controllers for themes and widgets create numbered drafts and update their current-version pointers. Their publishVersion actions mark the selected resource's version published and record first-publication metadata. Content editing rejects versions that are published or already have publication history. Their unpublish actions reject reopening a published version: create another version for changes.

Tiles use a separate path. TileController::createVersion locks the tile, reuses an existing latest unpublished draft, or creates a new draft from the latest version's Canvas, data sources, settings and configuration features, copying runtime files. publishVersion calls PluginTileVersion::publish(false): the model locks the tile/version, checks publication eligibility, snapshots publication files and records publication. Passing false avoids automatically creating the next draft in that call. Eligibility rejects a global-default tile outside a global-publisher environment and assets still waiting_for_upload or processing; wait for uploads and use the authorized publishing environment. The model has cleanup handling for copied files if publication throws. Conditional global-plugin distribution is a separate queued operation, not proof every consumer has updated.

Do not apply App branch/build prerequisites to these editors, or use their simple publication actions to bypass App build verification. Follow Themes, Widgets and Tiles.

Management and runtime authorization​

There are several independent access decisions:

LayerWhat it decides
Developer Hub access and resource policiesWhether the admin can view or change reusable resources in the selected team
Build/publish checksWhether the selected resource/version can perform the requested lifecycle action
Project installation and configurationWhich release and resource bindings the project uses
Portal access and attendee sessionWhether this visitor may open the page and act as an attendee
API policy and dependency resolutionWhether this principal/context may perform the specific operation on the requested resource

The plugin policies (PluginPagePolicy, PluginThemePolicy, PluginWidgetPolicy, PluginTilePolicy) extend BaseDashboardPolicy. Developer controllers also perform resource ownership checks. The Developer route file uses setTeamScope, explicit binding middleware and withoutScopedBindings; that route-group setting is not a guarantee that arbitrary nested identifiers belong to the selected parent. Check each controller's ownership and policy path.

Do not treat dependency declarations alone as the complete authorization chain. A version declares supported models/actions and identifier slots; installation configuration resolves those slots. Portal access, principal identity, project membership/context, controller policies and endpoint-specific rules still apply. See Permissions and Dependencies.

Token contexts​

The source contains more token-bearing models than Project, Admin and AccessPointReader: examples include Attendee, ProjectPortalPage, ProjectPortalWidget and PluginApiToken. Their credentials are not interchangeable.

PluginApiToken represents a cross-plugin management token with explicit plugin mappings, activation and expiry fields. BaseDashboardPolicy rejects it for ordinary project-resource authorization; use the supported plugin-specific endpoints. A portal page/widget credential identifies installed runtime context; attendee operations can additionally require attendee authentication. A reader credential identifies a device context and is not a general substitute for a person.

Keep management credentials in the appropriate development/CI secret store. Use only the intended portal runtime integration in browser code, and test denied requests as well as successful ones. See API Keys.

Cache and lifecycle effects​

PluginPageVersionObserver handles creation, update, deletion, restore and force-delete lifecycle events. Its bustCache skips the version-keyed service call when the version number is null, then flushes portal-page caches for the plugin and team caches. Creation can assign the default variant and attempt branch creation when a Git repository and enabled Git integration are available; branch deletion also has an integration-dependent path. Logged branch failures do not necessarily abort model creation/deletion.

These are selected observer contracts. Bulk SQL, event-suppressed writes, storage/CDN behavior and independent installed-version selections require their own checks. A cache flush does not upgrade a pinned installation or guarantee a published app works.

Integration acceptance​

Before releasing a plugin for a project:

  1. Confirm team, resource type, branch/variant where applicable and exact release/build commit.
  2. Resolve matching dependency selector names to intended project records or deliberately chosen broader scopes.
  3. Configure the correct installed version, portal binding, layout and audience rules.
  4. Test allowed and denied admins/visitors/attendees, including direct API calls for restricted data.
  5. Verify forms, assets, navigation, empty/error states and external integrations in the installed experience.
  6. Confirm publication/default changes affected the intended consumers and preserve a known working selection for rollback.

Use Project Acceptance and Development Troubleshooting for the detailed checks. Publication success alone is not project acceptance. Keep a sanitized acceptance record with the project release/handoff in your team’s repository or issue tracker: record exact environment/resource URLs, installed and resolved version IDs, identity category, expected/observed outcomes and report or screenshot references. This is recommended release evidence, not an automatically generated platform record. The Project Acceptance guide’s rollback exercise covers recording a known-good selection, verifying operator authority, restoring it through supported controls and retesting; code rollback does not undo remote writes or saved data changes.

Source and evidence​

The review follows routes/developer.php, the Developer Variant/Theme/Widget/Tile controllers, the corresponding model families, BaseDashboardPolicy and PluginPageVersionObserver in the platform repository. It replaces the prior illustrative SQL/controller snippets rather than presenting them as runnable implementation code.

Retained evidence: source snapshot, review report. The earlier catalogue is retained in repository design history. The snapshot identifies inspected files; it does not certify the deployed platform or every migration.