BDUI documentation

← Module overview · Architecture · State · Widgets · Actions · Themes · Observers · Streaming · Compatibility · Extensions · OTA widgets · Examples

Start here

BDUI renders a Compose Multiplatform widget tree from JSON. Place BduiView anywhere in the host UI. The backend chooses from a client-owned vocabulary of widgets and actions; it cannot execute arbitrary native code or instantiate unregistered capabilities.

Read the pages in this order when integrating BDUI:

  1. Architecture and view lifecycle
  2. State, paths, and write-back
  3. Widget reference
  4. Action reference and error handling
  5. Themes and modifiers
  6. State and error observers
  7. Server-sent events
  8. Version compatibility
  9. Custom widgets and actions
  10. Over-the-air widgets
  11. Complete examples

Quick reference

NeedRead
Embed a JSON, stream, or bothArchitecture — embedding a view
Open a full-screen BDUI destinationArchitecture — full-screen hosts and Actions — openScreen
Read root, local, ancestor, or named stateState — reference paths
Make any widget clickableWidgets — common rules and architecture — widget document
Know every widget parameter and defaultWidget reference
Know every action field and failure modeAction reference
Patch state and tree in one RFC 6902 listActions — patch and state — patch paths
Run actions in order or concurrentlyActions — sync and async
Safely run backend JavaScriptActions — jsUpdateState and HTTP jsMap
Handle one action error or all view errorsActions — errors and error observers
Stream incremental tree/state changesStreaming
Keep personal data off AppSanaStreaming — sensitive data
Support older installed clientsCompatibility
Register app-specific capabilitiesExtensions
Ship composite widgets over the air from the admin panelOver-the-air widgets

Core JSON shape

{
  "id": "root",
  "type": "Column",
  "state": {
    "title": "Offer",
    "form": { "email": "", "agreed": false }
  },
  "modifier": [{ "name": "fillMaxWidth" }],
  "params": {
    "horizontalAlignment": "Start"
  },
  "observers": [],
  "children": [
    {
      "type": "Text",
      "params": { "text": "$root.title" }
    }
  ]
}

Only containers have children. modifier and onClick live on the widget envelope, not in params. Any widget with onClick is clickable. Params are either literals or explicit paths; there is no bind object and no implicit state lookup.

Platform targets

  • Android
  • iOS
  • Desktop JVM
  • Web JS / Wasm

The document, store, action runtime, paths, observers, Ktor HTTP/SSE, and extension contracts live in commonMain. Platform source sets provide JavaScript engines and host effects such as navigation, dialogs, clipboard, sharing, and URL handling.

AppSana — экраны под задачу в приложениях, которые у вас уже есть.