@boa-framework/ui
v0.1.1
Published
The browser-side UI extension for **BOA (Block Orchestrated Architecture)** — run UI blocks, workflows, and capability blocks directly in the browser.
Readme
@boa-framework/ui
The browser-side UI extension for BOA (Block Orchestrated Architecture) — run UI blocks, workflows, and capability blocks directly in the browser.
Note: This package is included with
@boa-framework/core. You do not need to install it separately.
Features
- UI blocks — Pure logic functions for state derivation, formatting, and calculations (no DOM, no side effects)
- UI capability blocks — Side-effect blocks for fetch, localStorage, clipboard, and backend API calls
- Workflow engine — Declarative chaining of UI blocks with conditional steps and parallel execution
- Sandboxed execution — Blocks run in isolation with permission controls
- Memoization — Pure UI blocks are automatically memoizable for performance
- React hooks — First-class React integration via
@boa-framework/ui/react - Framework-agnostic SDK — Works with any frontend framework
Usage
import { createBoaUI } from "@boa-framework/ui";
const boa = createBoaUI();
// Register blocks and workflows from .boa manifests
boa.registerBlockFromBoa(blockBoaText, "./path/to/index.js");
boa.registerWorkflowFromBoa(workflowBoaText);
// Run a workflow
const result = await boa.run("MyUIWorkflow", { input: "value" });React Integration
import { useBoaWorkflow } from "@boa-framework/ui/react";
function MyComponent() {
const { run, result, loading } = useBoaWorkflow("MyUIWorkflow");
return <button onClick={() => run({ input: "value" })}>Run</button>;
}Requirements
@boa-framework/coremust be installed- Browser environment with ES2022 module support
License
ISC
