App development and Manifest v1
Document fields, sources, widgets and revision rules with a verifiable JSON example.
Purpose and runtime boundaries
Current apps use constrained JSON to declare a source and widgets; the runtime retrieves and renders data. This is not a general mechanism for arbitrary scripts, HTML or plugin execution. Schema validity does not grant data access. Validate company, user, source and published revision separately. External import and marketplace submission require separate verification and agreement.
A minimal verifiable example
This example matches the current parseMiniApp structure and displays read-only project metrics and rows. source determines allowed fields; URLs, keys and scripts cannot be added. The example verifies shape, while actual rendering requires authorized data and a compatible runtime.
{
"schemaVersion": 1,
"title": "Project overview",
"summary": "Read-only authorized project overview",
"source": "company.projects.read",
"icon": "chart",
"accent": "blue",
"widgets": [
{
"type": "metric",
"label": "Active projects",
"field": "activeProjects"
},
{
"type": "table",
"label": "Projects",
"columns": [
{
"field": "title",
"label": "Title"
},
{
"field": "status",
"label": "Status"
}
]
}
]
}Top-level fields and closed validation
The current schema rejects unknown fields. Labels must be nonempty and exclude control characters and angle brackets. Use the same contract before persistence and local rendering. schemaVersion identifies the schema, not an app's content revision.
| Field | Constraint |
|---|---|
| schemaVersion | Numeric value 1 |
| title / summary | Title up to 40 characters; summary up to 160 |
| source | One declared source |
| icon | chart / table / activity |
| accent | blue / green / rose |
| widgets | 1–6 widgets; at most one table or worklist |
Sources and allowed fields
These names come from the current source contract, not public query endpoints. Adding a source requires server data access, authorization and runtime support, not just a manifest edit. Results should retain capture time, definitions, scope and completeness.
| source | Metric fields | Table columns |
|---|---|---|
| company.projects.read | projectCount, activeProjects | title, status, objective |
| company.work.read | openTasks, awaitingReview, blockedTasks, overdueTasks | title, status, project, assignee, dueAt |
| store.completedServices.read | serviceItemCount, ordersWithoutItems | productId, count |
Widget limits and invalid cases
metric accepts type, label and a field from the source's metrics. table accepts type, label and 1–3 nonduplicate columns. worklist is restricted to company.work.read. Widget labels allow up to 40 characters and column labels up to 30. Reject cross-source fields, multiple tables, unknown widgets, empty titles and extra properties rather than silently discarding them.
Revisions, approval and publication
Track parent revision, digest, generation state and approval. Publish only an identified ready revision after checking scope and approval evidence. Reaccept changes to sources, fields or definitions. Internal revision and candidate structures do not establish an external publication API; confirm release, rollback and compatibility procedures.
Developer handover
Deliver the manifest, source documentation, access matrix, valid/invalid samples, compatible versions, acceptance records and maintainer. Assess arbitrary frontend code, interactive writes or new sources as separate extensions rather than existing Manifest v1 features.