@prototyperco/compose
v0.5.0
Published
Streaming UI engine for AI-generated interfaces powered by Prototyper UI
Maintainers
Readme
@prototyperco/compose
Streaming UI engine for AI-generated interfaces powered by Prototyper UI. Renders component trees from structured JSON, with real-time streaming from LLM providers.
Installation
npm install @prototyperco/composeQuick Start
Server (API Route)
import { createComposeHandler } from "@prototyperco/compose/server";
export const POST = createComposeHandler({
provider: "anthropic",
});Client (React)
import { Compose } from "@prototyperco/compose/react";
export default function Page() {
return <Compose endpoint="/api/stream-ui" />;
}Features
- Real-time streaming from Anthropic and OpenAI
- Component catalog with props validation
- JSON patch-based incremental updates
- Code generation from rendered UI
- Vercel AI SDK integration
Documentation
Full documentation at prototyper.ai.
License
MIT
