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:
- Architecture and view lifecycle
- State, paths, and write-back
- Widget reference
- Action reference and error handling
- Themes and modifiers
- State and error observers
- Server-sent events
- Version compatibility
- Custom widgets and actions
- Over-the-air widgets
- Complete examples
Quick reference
| Need | Read |
|---|---|
| Embed a JSON, stream, or both | Architecture — embedding a view |
| Open a full-screen BDUI destination | Architecture — full-screen hosts and Actions — openScreen |
| Read root, local, ancestor, or named state | State — reference paths |
| Make any widget clickable | Widgets — common rules and architecture — widget document |
| Know every widget parameter and default | Widget reference |
| Know every action field and failure mode | Action reference |
| Patch state and tree in one RFC 6902 list | Actions — patch and state — patch paths |
| Run actions in order or concurrently | Actions — sync and async |
| Safely run backend JavaScript | Actions — jsUpdateState and HTTP jsMap |
| Handle one action error or all view errors | Actions — errors and error observers |
| Stream incremental tree/state changes | Streaming |
| Keep personal data off AppSana | Streaming — sensitive data |
| Support older installed clients | Compatibility |
| Register app-specific capabilities | Extensions |
| Ship composite widgets over the air from the admin panel | Over-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.