App Manifest
app-manifest.json describes an app's identity, default content, resource
requirements, and files to package. The local toolkit uses it to seed a
preview; the platform combines release configuration with installation
values and page context. A manifest declaration is not a server permission
or a browser/device permission.
This reference covers toolkit 2.1.40 and platform revision
5cf2925bcbb58fc397205ac553d7827ccab4c996, with the runtime baseline reviewed on 2026-10-14 and the toolkit guidance delta reviewed on 2026-10-15.
Keep it alongside App Configuration and Packaging,
the store reference, and release instructions.
File Location
Keep the source manifest at the plugin project root:
my-plugin/
├── app-manifest.json
├── configuration.json
├── app-instructions.md
├── default-styling.css
└── src/
├── Plugin.vue
└── public/
Basic Structure
This complete starting manifest has editable content and local state, with no platform data dependency. The referenced files must exist in your project.
{
"name": "Welcome Counter",
"version": "1.0.0",
"manifest_version": 3,
"asset_dir": "/src/public",
"configurationFile": "configuration.json",
"appInstructionsFile": "app-instructions.md",
"defaultStylingFile": "default-styling.css",
"settings": { "primary_color": "#7C3AED", "button_text_color": "#ffffff", "company_name": "Demo Event" },
"strings": { "default": { "welcome_title": "Welcome", "increment_label": "Increase", "count_label": "Count" } },
"assets": {},
"triggerState": { "demo_count": 0 },
"dependencies": [],
"permissions": []
}
The linter requires a nonempty name and a semver-like version. It accepts
manifest versions 1, 2, and 3; the current scaffold uses 3. Extra top-level
keys can pass schema validation, so lint success does not prove the platform
uses an arbitrary property.
Source fields and packaged fields
| Source field | Meaning / packaged result |
|---|---|
name, version, description | App metadata; keep release/version metadata aligned with the hub |
manifest_version | Manifest format version, separate from the app's release version |
asset_dir | Project-relative asset directory; a leading slash denotes the project root here |
configurationFile | Copied as configuration.json |
appInstructionsFile | Copied as appInstructions.md |
defaultStylingFile | Copied as default-styling.css |
configuration, appInstructions, defaultStyling | Inline alternatives when the corresponding file reference is absent |
baseFramework | Scaffold framework declaration; confirm installed/platform support for the specified framework |
The packager puts assets under assets/ in the build tree, removes the
optional source-file/inline fields from the packaged manifest, and creates
a .gxpapp ZIP. File references take precedence over inline alternatives.
Missing optional files produce warnings rather than a complete-package
failure. Inspect package contents; successful packaging does not establish
that every required configuration or asset is present.
Keep referenced paths inside the project. The packager rejects escapes,
symlinks outside the tree, and an asset source that contains the build
output. Preview URLs such as /dev-assets/... or /src/public/... are not
proof of the final installed asset URL; verify the platform's resolved asset
bindings after import.
Configuration Sections
Settings (pluginVars)
settings supplies configurable defaults. Keys must start with a letter or
underscore and contain only letters, numbers, and underscores. Values may
be strings, numbers, booleans, null, arrays, or objects.
The platform also injects context such as the project and form into
pluginVars. Read settings through getSetting(key, fallback); do not
replace the complete object or invent context values to hide an installation
problem. A local edit is not a saved platform configuration change.
For admin editing, declare fields with the matching datastore path:
{
"additionalTabs": [
{
"type": "fields_list",
"title": "Welcome content",
"fieldsList": [
{ "type": "text", "name": "strings.default.welcome_title", "label": "Heading" },
{ "type": "text", "name": "strings.default.increment_label", "label": "Button label" },
{ "type": "text", "name": "strings.default.count_label", "label": "Count label" },
{ "type": "text", "name": "settings.company_name", "label": "Company" },
{ "type": "colorPicker", "name": "settings.primary_color", "label": "Primary color" },
{ "type": "colorPicker", "name": "settings.button_text_color", "label": "Button text color" }
]
}
]
}
This is the configuration.json for the starting example. Validate both
files. Resource selector fields use dependency_list.<identifier>, not a
bare setting name; discover the route and value field from the platform
catalog rather than guessing a numeric ID.
Strings (stringsList)
Use strings.default for default text. The local store reads that map;
additional locale maps may be accepted by the manifest schema, but the
local loader does not select a locale automatically. Test translation
selection on the installed portal.
Read with getString or use the strings plugin. Getter
fallbacks preserve an explicitly empty string; text directives use a
truthiness fallback, so they do not render an empty/zero/false value in the
same way. Keep fallback text intentional.
Assets (assetList)
Use keyed URLs/paths for admin-selectable content. getAsset checks dynamic
assets, then static packaged assets, then its fallback lookup. A blank URL
counts as unconfigured. Use a string fallback; this helper performs path
operations on it.
Declare the matching assets.<key> admin field when the image should be
customizable. Packaged files, listing screenshots, and a deployment's
selected asset have different purposes. Never place privileged tokens in
manifest values or public asset URLs.
Trigger State (triggerState)
The manifest supplies starting values for mutable runtime state. The local schema accepts string, number, boolean, or null values for declared keys; objects and arrays in those defaults fail its current schema even though Vue state can hold richer values at runtime.
For shared plugin code, mutate the reactive section directly:
store.triggerState.demo_count = store.getState("demo_count", 0) + 1
updateState is a local convenience helper, not an exported platform
method. State changes do not automatically persist a server record or
broadcast an event. Manifest hot reload replaces declared state defaults,
so local edits can be reset.
To change state for every client, an installed app uses the
Trigger State API (platform 208d36e1b5, reviewed
2026-11-05). Writing its own state (self) needs a dependency on its own
model (ProjectPage, or ProjectForm for an app rendered on a form) with
update_own_trigger_state. Unless that dependency lists triggerStateKeys,
the keys declared here are the keys the app may write. Keys starting with
gxp_ are reserved for the platform and can't be written.
Bound widget preview state (widgetStates)
The installed platform supplies widgetStates from bound widgets, projected to the keys the app may read. See portal widgets as shared state. A manifest fixture does not override that server projection.
In toolkit 2.1.47, mock a bound widget by its dependency identifier:
{
"widgetStates": {
"jukebox_widget": { "id": 12, "state": { "now_playing": "Synthetic song" } }
}
}
Read store.getWidgetState("jukebox_widget", "now_playing", "Nothing playing") or use the strings plugin:
<span gxp-string="now_playing" gxp-state="jukebox_widget">Nothing playing</span>
This is separate from the page's own triggerState. The schema requires an id; state is an object. The local loader copies these values and its widget listener merges matching widget-ID changes. Fixture values do not grant access to a real widget or demonstrate the installed page's allowed state-key projection. See store widget and quiz previews.
Live quiz preview (liveQuiz)
For gxdev dev with API_ENV=mock, the hand-written quiz mock keeps manage/state/start/answer behavior in memory. Supply a numeric form_id and question examples:
{
"liveQuiz": {
"form_id": 7,
"questions": [{
"id": 12,
"label": "Choose a demo option",
"quiz_question_type": "multiple_choice",
"options": [{ "label": "Option A", "value": "101", "secondary": "Demo" }],
"max_selections": 1
}]
}
}
Unlisted question IDs receive placeholder options. Votes use X-Mock-Attendee (default dev); this simulates multiple participants rather than authenticating attendees. State is per form in the running mock process, not a saved platform quiz bank. The mock does not enforce production permissions/bindings; bank/question editing still uses generated mock routes. Restarting the process loses its in-memory state. This documentation describes local app development only and does not enable quizzes in the documentation hub.
Exercise the local live-quiz fixture
Set API_ENV=mock in the scaffold’s .env, retain the fixture above, and start gxdev dev --no-https=true --with-mock. See Mock API Server for router/relay prerequisites. Check the printed relay origin and /_mock/status; the commands below assume it is HTTP localhost:3069. If it is HTTPS or another port, replace that origin with the actual trusted local origin. Do not substitute a production host.
# Synthetic team/project/form slugs identify local mock state.
curl -fsS http://localhost:3069/api/v1/projects/demo/demo/quiz/demo/manage/state
curl -fsS -X POST http://localhost:3069/api/v1/projects/demo/demo/quiz/demo/manage/live/open
curl -fsS -X POST http://localhost:3069/api/v1/projects/demo/demo/quiz/demo/manage/questions/send \
-H 'Content-Type: application/json' -d '{"question_ids":[12],"duration":300}'
curl -fsS -X POST http://localhost:3069/api/v1/projects/demo/demo/quiz/demo/answer \
-H 'Content-Type: application/json' -H 'X-Mock-Attendee: synthetic-reader' \
-d '{"element_id":12,"answer":["101"]}'
curl -fsS http://localhost:3069/api/v1/projects/demo/demo/quiz/demo/manage/analytics
curl -fsS -X POST http://localhost:3069/api/v1/projects/demo/demo/quiz/demo/manage/live/reset
Manage state returns form_id: 7 for this fixture. Sending question 12 opens its answer window; the synthetic vote should appear in the tally for option 101. Missing question IDs or invalid answers are refusal cases, not successful votes. Reset clears the local session/answers. These are mock requests only, with no real attendee login, saved quiz attempt or production permission check.
Dependencies
A dependency declares the model, supported operations/events, permission
requirements, and object scope an app needs. The installation's
dependency_list supplies actual chosen values. The local preview fabricates
"1" for ordinary binding keys; it does not discover a real resource or
prove that the app can access it.
Dependency Structure
Discover operations and structured binding metadata through the local MCP
catalog. Start with api_get_operation_parameters, then use
api_generate_dependency with explicit operation IDs. Inspect the returned
manifest entry and optional configurationField before saving them.
Dependency Fields
| Field | Meaning |
|---|---|
identifier / identifiers | One binding/scope token or an any-of list; use one form consistently |
model | Actual model named by operation/binding metadata; it may differ from the API tag |
key | Model binding column/route key; do not assume every relation uses a numeric ID |
permissionKey | Stable dependency address for scopes and parent references |
permissions | Declared permission names; server rules still decide access |
operations | Discovered operation-to-method/path mappings, not permission grants |
events | Declared event aliases and broadcast names; actual channel authorization still applies |
visibleFields | Declared response-field ceiling; verify the deployed API's filtering behavior |
triggerStateKeys | Trigger state keys the app may read or write on the page, form or portal widget the dependency reaches; "*" means every non-reserved key |
parentRelation | Parent relation for a parent-scoped declaration |
Scope tokens can be ordinary installation binding keys, *, #<tag-id-or-slug>,
@untagged, or @<permissionKey> parent references. Literal scope tokens do
not create local binding keys. Choose the narrow intended scope and verify
it against platform permission rules.
A parent/token declaration alone is not a concrete API path parameter.
Trigger state dependencies
At platform 208d36e1b5, ProjectPage and ProjectPortalWidget are dependency
models for the Trigger State API, beside ProjectForm:
| Model | Abilities |
|---|---|
ProjectPage | view_trigger_state, update_trigger_state, update_own_trigger_state |
ProjectForm | The same three, beside its other abilities |
ProjectPortalWidget | view_trigger_state, update_trigger_state |
{
"model": "ProjectPortalWidget",
"identifier": "jukebox_widget",
"permissions": ["view_trigger_state", "update_trigger_state"],
"triggerStateKeys": ["now_playing", "queue"]
}
These abilities are for apps only: admins never hold them and API keys are
not offered them. A target other than the app's own must be bound; a portal
widget on the app's own portal counts as bound. The dashboard's picker
stores pages and widgets as typed values such as
App\Models\ProjectPortalWidget:12, which bind that ID. The platform drops
invalid names and gxp_ keys from triggerStateKeys when the version is
saved, and an admin can narrow the keys per install but never widen them.
See permissions.
Live quiz abilities and presets
A ProjectForm dependency can declare the live quiz abilities an app needs
to run a quiz from a portal page. A preset name stands for a set of them:
{
"model": "ProjectForm",
"identifier": "quiz",
"permissions": ["live_quiz_host"]
}
| Preset | Abilities |
|---|---|
live_quiz_viewer | view_live_quiz_state, view_live_quiz_analytics, view_live_quiz_history |
live_quiz_host | Viewer abilities, view_quiz_banks, and open, close, send, unsend, review, leaderboard and set-active-bank control |
live_quiz_editor | view_quiz_banks, view_quiz_answers, update_quiz_bank_status, manage_quiz_banks, manage_quiz_questions |
live_quiz_admin | Every live quiz ability, including reset_live_quiz and update_live_quiz_settings |
The platform expands a preset into its abilities when the app version is
saved and stores the abilities, so an admin can still drop one from an
install. A scoped preset such as live_quiz_host:viewAny keeps the scope on
each ability. Bind the dependency to the quiz on install; an unbound app gets
404 from the management API. Each endpoint needs its own ability, every
control ability also allows reading live state, and correct answers need
view_quiz_answers. See
Building a Live Quiz Control Panel for the
endpoints and channels.
Using the Add Dependency Wizard
The CLI wizard remains available:
gxdev add-dependency --env develop
It writes/replaces a dependency in the manifest. Specify the environment; its default is staging, separate from the MCP selector and preview routing. Selecting no endpoints makes the wizard select all endpoints under the tag.
In 2.1.39 the wizard reads a single x-permission object and uses the tag
name as its model. It does not apply the MCP generator's relation binding
checks and can miss structured permission arrays or parent route keys.
Treat its output as a draft to inspect. The MCP generator rejects incomplete
binding metadata; neither tool grants access or creates the installed admin
selector for you.
Calling Dependency APIs
Use the discovered operation ID and configured dependency identifier:
// Illustrative call pattern; these values must come from your catalog/configuration.
const result = await store.callApi(operationId, dependencyIdentifier, requestData)
The store resolves operations from OpenAPI, merges page/project context and binding values, then sends the request. The declaration and server policy constrain the installed app separately. See callApi for parameters, uploads, errors, and preview limitations.
Permissions
Top-level permissions accepts flags or objects with an identifier.
The local store copies these values into permissionFlags; hasPermission
is a simple array membership check. Do not interpret a locally declared
camera flag as an OS/browser camera grant, an attendee login, or permission
to read a platform resource. Test the installed page's flags and denied
server requests explicitly.
Form-backed apps and local fixtures
The manifest's boolean formTemplate declares form-backed capability.
Starter questions, when provided, belong in configuration.json's
formTemplate card array. Keep those separate from admin configuration in
additionalTabs. This differs from the manifest's optional local form
fixture, which attaches a local store.form for previewing schema/data.
A fixture and its canned response do not create a live platform form or
attendee session.
Analytics declarations
track-events maps event names to property definitions. A property can have
a free-form type string, an allowed-value array, or a relationship descriptor
such as { "type": "attendee", "value": "id" }. Extraction seeds detected
properties as "string" and preserves authored richer definitions. Declare
only properties you intend to collect, and verify installed reporting;
local analytics logging is separate from durable platform storage.
See Analytics tracking for the click/custom APIs, property merging, local verification and extraction limits.
Complete Example
Start with a toolkit scaffold; the files above are not a whole project. Follow installation and prerequisites, then:
gxdev init welcome-counter --yes
cd welcome-counter
Replace the root app-manifest.json and configuration.json with the two
complete JSON blocks above, and replace src/Plugin.vue with the
store's counter example. Keep the
scaffold's src/stores/index.js; add the referenced app-instructions.md,
default-styling.css, and src/public/ if missing. Preview it with:
gxdev dev --no-https=true --no-socket
Open the printed URL, click Increase, and confirm the count changes. Edit the manifest's heading, company, labels, and colors; confirm the preview updates and that reloading the manifest resets this temporary count. Stop the server with Ctrl+C, then validate and package:
gxdev lint --all
npm run lint:js
npm test
npm run build
Inspect dist/Welcome-Counter.gxpapp as a ZIP, including the compiled app,
cleaned manifest, configuration, and any referenced assets. A zero-test
suite is not interaction-test evidence. Follow the
hub build and draft workflow,
publish the intended variant,
then add the app to a project and bind a portal page.
Use the installed app's configuration fields to change all displayed text
and colors, and verify the exact published release on that portal. Local
preview and packaging do not establish installed-project acceptance.
Directive Reference
| Syntax | Source |
|---|---|
gxp-string="key" | stringsList |
gxp-string="key" gxp-settings | pluginVars |
gxp-string="key" gxp-assets | Asset lookup |
gxp-string="key" gxp-state | triggerState |
gxp-src="key" | Asset lookup |
gxp-src="key" gxp-state | triggerState |
gxp-string="key" gxp-state="<identifier>" | A bound portal widget's state (platform 208d36e1b5) |
gxp-src="key" gxp-state="<identifier>" | A bound portal widget's state (platform 208d36e1b5) |
See directive behavior for fallback, root-element, reactivity, and cleanup differences.
Best Practices
Run gxdev extract-config --dry-run before applying extraction, inspect the
diff, then run gxdev lint --all. Use ./node_modules/.bin/gxdev when the
toolkit is project-local. Extraction uses regexes; dynamic keys and complex
code may be missed. It seeds dependency references, not a complete verified
permission/binding contract, and does not create the admin form.
Back up a malformed manifest before running CLI extraction: the command can
replace it with a default manifest. Unlike the MCP configuration writer, the
CLI extraction write is not linter-guarded. Even without --overwrite, blank
strings/assets can be filled from extraction; false/zero settings and state
are preserved. Check errors and output files as well as exit status.
Before releasing, validate defaults and field names, inspect packaged files/assets, test permitted and denied resource access, check attendee/guest states, and verify the actual configured release in a project. Local lint, mock data, and a ZIP file are separate pieces of that evidence.