Skip to main content

Deliver a document

Send the source and its data as an ordinary JSON response.

Before you start: call your app.

One response​

{"source":"<Text bind-text=\"data.message\" />","data":{"message":"Hello from your server"}}

source is required. data is a record and defaults to an empty record. The host loads this response and creates a session; the document composes installed capabilities.

Serve it from the shared backend​

Run the demo backend from the repository root and fetch one of its documents:

scripts/backend start
curl -fsS http://127.0.0.1:8080/ui/shared-explore

The response contains XML and data just like the smaller greeting above. If your screen uses XML component definitions, bundle them with the rendered root in a single UI element. The backend integration guide shows where the example server assembles these documents.

Try it: Change tripLabel in backend/app/ui/screens/shared-explore/data.json. Restart the demo backend, relaunch the example, and look for the updated label under Your next trip. Use updateData in an existing session when you want to refresh data and keep compatible local state.

Choose your host​

Use iOS, Android, or Web to mount a screen. The host owns networking, authentication, navigation, persistence, and fallbacks.

Continue with motion, Components, or the full example apps. Reference: document format.