@brander/mcp-demo 0.1.16 → 0.1.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/create-server.js +11 -9
- package/dist/data/elements.d.ts +20 -0
- package/dist/data/elements.js +426 -0
- package/dist/data/integrations.d.ts +7 -15
- package/dist/data/integrations.js +104 -120
- package/dist/data/platform.d.ts +36 -0
- package/dist/data/platform.js +276 -0
- package/dist/data/scenarios.d.ts +12 -14
- package/dist/data/scenarios.js +427 -180
- package/dist/tools/demo-scenarios.d.ts +2 -0
- package/dist/tools/demo-scenarios.js +39 -0
- package/dist/tools/element-showcase.d.ts +2 -0
- package/dist/tools/element-showcase.js +61 -0
- package/dist/tools/integration-guide.d.ts +2 -0
- package/dist/tools/integration-guide.js +20 -0
- package/dist/tools/platform-overview.d.ts +2 -0
- package/dist/tools/platform-overview.js +23 -0
- package/package.json +2 -2
- package/dist/data/components.d.ts +0 -15
- package/dist/data/components.js +0 -300
- package/dist/data/platform-analytics.d.ts +0 -47
- package/dist/data/platform-analytics.js +0 -176
- package/dist/tools/capability-tools.d.ts +0 -2
- package/dist/tools/capability-tools.js +0 -98
- package/dist/tools/component-tools.d.ts +0 -2
- package/dist/tools/component-tools.js +0 -109
- package/dist/tools/platform-tools.d.ts +0 -2
- package/dist/tools/platform-tools.js +0 -123
- package/dist/tools/scenario-tools.d.ts +0 -2
- package/dist/tools/scenario-tools.js +0 -113
|
@@ -1,18 +1,24 @@
|
|
|
1
1
|
// ============================================================================
|
|
2
|
-
// BranderUX Demo — Integration Methods
|
|
2
|
+
// BranderUX Demo — Integration Methods (Real Code Examples, No Fake Metrics)
|
|
3
3
|
// ============================================================================
|
|
4
4
|
export const INTEGRATION_METHODS = [
|
|
5
5
|
{
|
|
6
|
-
id: "int-sdk",
|
|
7
|
-
name: "SDK",
|
|
8
6
|
slug: "sdk",
|
|
7
|
+
name: "SDK",
|
|
8
|
+
package: "@brander/sdk",
|
|
9
9
|
tagline: "React component — drop-in integration",
|
|
10
10
|
description: "The @brander/sdk NPM package provides a <Brander /> React component and a <BranderChatWidget /> " +
|
|
11
11
|
"that you drop into your app. It handles AI streaming, screen rendering, brand theming, and " +
|
|
12
12
|
"click-to-query interactions out of the box. Works with Anthropic, OpenAI, and Gemini.",
|
|
13
13
|
bestFor: ["React / Next.js apps", "Full-featured AI assistants", "Chat-based interfaces"],
|
|
14
14
|
setupTime: "5 minutes",
|
|
15
|
-
|
|
15
|
+
requirements: ["React 18+", "Next.js 14+ (recommended)", "TypeScript"],
|
|
16
|
+
steps: [
|
|
17
|
+
{ step: 1, title: "Install the package", command: "npm install @brander/sdk", description: "Add the SDK to your project" },
|
|
18
|
+
{ step: 2, title: "Add the component", description: "Import and render <Brander /> with your project ID" },
|
|
19
|
+
{ step: 3, title: "Connect your AI", description: "Pass an onQueryStream handler using one of the built-in adapters (Anthropic, OpenAI, Gemini)" },
|
|
20
|
+
{ step: 4, title: "Customize", description: "Configure brand settings, screens, and element visibility in the BranderUX dashboard" },
|
|
21
|
+
],
|
|
16
22
|
codeExample: [
|
|
17
23
|
'import { Brander } from "@brander/sdk";',
|
|
18
24
|
'import { anthropicStream } from "@brander/sdk/adapters";',
|
|
@@ -28,12 +34,6 @@ export const INTEGRATION_METHODS = [
|
|
|
28
34
|
" );",
|
|
29
35
|
"}",
|
|
30
36
|
].join("\n"),
|
|
31
|
-
steps: [
|
|
32
|
-
{ step: 1, title: "Install the package", description: "npm install @brander/sdk" },
|
|
33
|
-
{ step: 2, title: "Add the component", description: "Import and render <Brander /> with your project ID" },
|
|
34
|
-
{ step: 3, title: "Connect your AI", description: "Pass an onQueryStream handler using one of the built-in adapters (Anthropic, OpenAI, Gemini)" },
|
|
35
|
-
{ step: 4, title: "Customize", description: "Configure brand settings, screens, and element visibility in the BranderUX dashboard" },
|
|
36
|
-
],
|
|
37
37
|
features: [
|
|
38
38
|
"Full React component with AG-UI streaming",
|
|
39
39
|
"Built-in adapters for Anthropic, OpenAI, Gemini",
|
|
@@ -47,21 +47,25 @@ export const INTEGRATION_METHODS = [
|
|
|
47
47
|
"Requires React 18+",
|
|
48
48
|
"Client-side rendering only",
|
|
49
49
|
],
|
|
50
|
-
adoptionRate: 52,
|
|
51
50
|
status: "stable",
|
|
52
51
|
},
|
|
53
52
|
{
|
|
54
|
-
id: "int-mcp",
|
|
55
|
-
name: "MCP Tools",
|
|
56
53
|
slug: "mcp",
|
|
54
|
+
name: "MCP Tools",
|
|
55
|
+
package: "@brander/mcp-tools",
|
|
57
56
|
tagline: "Composable library — add branded UI to any MCP server",
|
|
58
|
-
description: "The @brander/mcp-tools package
|
|
59
|
-
"
|
|
60
|
-
"
|
|
61
|
-
|
|
62
|
-
bestFor: ["Claude Desktop integrations", "MCP server ecosystems", "AI assistant tools"],
|
|
57
|
+
description: "The @brander/mcp-tools package adds BranderUX branded UI rendering to any MCP server " +
|
|
58
|
+
"with a single function call. It registers a generate_screen tool and a ui://brander/element-renderer " +
|
|
59
|
+
"resource that renders 15 element types as interactive HTML panels inside Claude and ChatGPT.",
|
|
60
|
+
bestFor: ["Claude Desktop integrations", "Claude.ai and ChatGPT", "MCP server ecosystems"],
|
|
63
61
|
setupTime: "10 minutes",
|
|
64
|
-
|
|
62
|
+
requirements: ["Node.js 18+", "@modelcontextprotocol/sdk ^1.0.0", "TypeScript"],
|
|
63
|
+
steps: [
|
|
64
|
+
{ step: 1, title: "Install the package", command: "npm install @brander/mcp-tools", description: "Add the MCP tools library" },
|
|
65
|
+
{ step: 2, title: "Create your MCP server", description: "Set up an McpServer and register your business tools" },
|
|
66
|
+
{ step: 3, title: "Add BranderUX", description: "Call registerBranderTools(server, config) — one line, done" },
|
|
67
|
+
{ step: 4, title: "Configure environment", description: "Set BRANDER_PROJECT_ID and BRANDER_BETA_KEY env vars" },
|
|
68
|
+
],
|
|
65
69
|
codeExample: [
|
|
66
70
|
'import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";',
|
|
67
71
|
'import { registerBranderTools } from "@brander/mcp-tools";',
|
|
@@ -71,47 +75,60 @@ export const INTEGRATION_METHODS = [
|
|
|
71
75
|
"// Register your own business tools",
|
|
72
76
|
"registerMyTools(server);",
|
|
73
77
|
"",
|
|
74
|
-
"// One line adds branded UI rendering",
|
|
78
|
+
"// One line adds branded UI rendering for 15 element types",
|
|
75
79
|
"await registerBranderTools(server, {",
|
|
76
|
-
|
|
77
|
-
|
|
80
|
+
" projectId: process.env.BRANDER_PROJECT_ID!,",
|
|
81
|
+
" betaKey: process.env.BRANDER_BETA_KEY!,",
|
|
78
82
|
"});",
|
|
79
83
|
].join("\n"),
|
|
80
|
-
steps: [
|
|
81
|
-
{ step: 1, title: "Install the package", description: "npm install @brander/mcp-tools" },
|
|
82
|
-
{ step: 2, title: "Create your MCP server", description: "Set up an McpServer and register your business tools" },
|
|
83
|
-
{ step: 3, title: "Add BranderUX", description: "Call registerBranderTools(server, config) — one line, done" },
|
|
84
|
-
{ step: 4, title: "Configure Claude Desktop", description: "Add the server to your claude_desktop_config.json with BRANDER_PROJECT_ID and BRANDER_BETA_KEY env vars" },
|
|
85
|
-
],
|
|
86
84
|
features: [
|
|
87
85
|
"Single function call integration",
|
|
88
|
-
"
|
|
89
|
-
"Works inside Claude Desktop
|
|
86
|
+
"15 element types rendered as interactive HTML panels",
|
|
87
|
+
"Works inside Claude Desktop, Claude.ai, and ChatGPT",
|
|
90
88
|
"Streaming support with progressive rendering",
|
|
91
89
|
"Brand settings loaded from BranderUX API",
|
|
92
90
|
"Works alongside your existing MCP tools",
|
|
91
|
+
"MCP Apps standard — embedded interactive panels in chat",
|
|
93
92
|
],
|
|
94
93
|
limitations: [
|
|
95
|
-
"Requires MCP-compatible AI client
|
|
96
|
-
"
|
|
94
|
+
"Requires MCP-compatible AI client",
|
|
95
|
+
"Rendering inside host sandbox (some browser APIs limited)",
|
|
97
96
|
],
|
|
98
|
-
adoptionRate: 31,
|
|
99
97
|
status: "stable",
|
|
98
|
+
configExample: [
|
|
99
|
+
"{",
|
|
100
|
+
' "mcpServers": {',
|
|
101
|
+
' "my-app": {',
|
|
102
|
+
' "command": "node",',
|
|
103
|
+
' "args": ["/path/to/dist/index.js"],',
|
|
104
|
+
' "env": {',
|
|
105
|
+
' "BRANDER_PROJECT_ID": "your_project_id",',
|
|
106
|
+
' "BRANDER_BETA_KEY": "bux_dp_your_key"',
|
|
107
|
+
" }",
|
|
108
|
+
" }",
|
|
109
|
+
" }",
|
|
110
|
+
"}",
|
|
111
|
+
].join("\n"),
|
|
100
112
|
},
|
|
101
113
|
{
|
|
102
|
-
id: "int-embed",
|
|
103
|
-
name: "Embed",
|
|
104
114
|
slug: "embed",
|
|
115
|
+
name: "Embed",
|
|
116
|
+
package: "N/A (iframe)",
|
|
105
117
|
tagline: "Zero-dependency iframe — works anywhere",
|
|
106
118
|
description: "Embed BranderUX as an iframe in any web application with zero dependencies. " +
|
|
107
119
|
"Communication happens through the PostMessage API with token-based authentication. " +
|
|
108
120
|
"Perfect for adding AI-powered UI to existing apps without framework requirements.",
|
|
109
|
-
bestFor: ["Any web application", "No-framework sites", "Quick prototyping"],
|
|
121
|
+
bestFor: ["Any web application", "No-framework sites", "Quick prototyping", "Legacy applications"],
|
|
110
122
|
setupTime: "2 minutes",
|
|
111
|
-
|
|
123
|
+
requirements: ["HTML", "Any framework or none", "API token from BranderUX dashboard"],
|
|
124
|
+
steps: [
|
|
125
|
+
{ step: 1, title: "Get an API token", description: "Create a token in the BranderUX dashboard with your allowed domains" },
|
|
126
|
+
{ step: 2, title: "Add the iframe", description: "Embed the BranderUX iframe with your token and configuration" },
|
|
127
|
+
{ step: 3, title: "Handle events", description: "Listen for PostMessage events to integrate with your app logic" },
|
|
128
|
+
],
|
|
112
129
|
codeExample: [
|
|
113
130
|
"<!-- Add to your HTML -->",
|
|
114
|
-
|
|
131
|
+
"<iframe",
|
|
115
132
|
' src="https://branderux.com/embed?token=YOUR_TOKEN&config=BASE64_CONFIG"',
|
|
116
133
|
' style="width: 100%; height: 600px; border: none;"',
|
|
117
134
|
"></iframe>",
|
|
@@ -126,11 +143,6 @@ export const INTEGRATION_METHODS = [
|
|
|
126
143
|
" });",
|
|
127
144
|
"</script>",
|
|
128
145
|
].join("\n"),
|
|
129
|
-
steps: [
|
|
130
|
-
{ step: 1, title: "Get an API token", description: "Create a token in the BranderUX dashboard with your allowed domains" },
|
|
131
|
-
{ step: 2, title: "Add the iframe", description: "Embed the BranderUX iframe with your token and configuration" },
|
|
132
|
-
{ step: 3, title: "Handle events", description: "Listen for PostMessage events to integrate with your app logic" },
|
|
133
|
-
],
|
|
134
146
|
features: [
|
|
135
147
|
"Zero dependencies — just an iframe",
|
|
136
148
|
"Works with any framework or plain HTML",
|
|
@@ -143,83 +155,55 @@ export const INTEGRATION_METHODS = [
|
|
|
143
155
|
"Requires internet connection to BranderUX servers",
|
|
144
156
|
"iframe sandboxing may limit some interactions",
|
|
145
157
|
],
|
|
146
|
-
adoptionRate: 17,
|
|
147
158
|
status: "stable",
|
|
148
159
|
},
|
|
149
160
|
];
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
{
|
|
200
|
-
id: "ai-click-to-query",
|
|
201
|
-
name: "Click-to-Query Interactions",
|
|
202
|
-
category: "Interactivity",
|
|
203
|
-
description: "Every rendered element is interactive. Click a table row, chart segment, grid card, or button — " +
|
|
204
|
-
"BranderUX auto-generates a contextual follow-up query and sends it back to the AI. " +
|
|
205
|
-
"This creates a fluid exploration loop where users drill deeper with zero typing.",
|
|
206
|
-
howItWorks: "Each element type has a registered behavior template (e.g., DataTable: 'Show details for [title] (ID: [id])'). " +
|
|
207
|
-
"When a user clicks, BranderUX fills the template with the clicked item's data and submits a new query. " +
|
|
208
|
-
"The AI receives the query, selects the appropriate detail screen, and renders the response.",
|
|
209
|
-
technicalDetail: "Defined in ELEMENT_BEHAVIOR_REGISTRY. Supports queryTemplate patterns with [field] placeholders.",
|
|
210
|
-
status: "ga",
|
|
211
|
-
},
|
|
212
|
-
{
|
|
213
|
-
id: "ai-flexible-mode",
|
|
214
|
-
name: "A2UI Flexible Mode",
|
|
215
|
-
category: "Advanced",
|
|
216
|
-
description: "An alternative to deterministic screen selection. In A2UI mode, the AI emits declarative UI trees directly — " +
|
|
217
|
-
"choosing which elements to use, how to lay them out (rows/columns), and what data to display. " +
|
|
218
|
-
"No predefined screens needed. The AI has full creative control over the layout.",
|
|
219
|
-
howItWorks: "Instead of selecting from predefined screens, the customer's AI receives an A2UI prompt describing all available " +
|
|
220
|
-
"components and layout primitives (Column, Row). The AI responds with a JSON structure defining the component tree, " +
|
|
221
|
-
"adjacency list, data model, and element configurations. BranderUX renders this declarative surface.",
|
|
222
|
-
technicalDetail: "Uses updateComponents, updateDataModel, and setRootComponent operations. Currently in beta.",
|
|
223
|
-
status: "beta",
|
|
224
|
-
},
|
|
225
|
-
];
|
|
161
|
+
// ============================================================================
|
|
162
|
+
// HANDLER
|
|
163
|
+
// ============================================================================
|
|
164
|
+
export function getIntegrationData(method) {
|
|
165
|
+
if (method === "compare") {
|
|
166
|
+
return {
|
|
167
|
+
comparison: INTEGRATION_METHODS.map((m) => ({
|
|
168
|
+
name: m.name,
|
|
169
|
+
package: m.package,
|
|
170
|
+
tagline: m.tagline,
|
|
171
|
+
bestFor: m.bestFor,
|
|
172
|
+
setupTime: m.setupTime,
|
|
173
|
+
features: m.features,
|
|
174
|
+
limitations: m.limitations,
|
|
175
|
+
status: m.status,
|
|
176
|
+
})),
|
|
177
|
+
recommendation: "For React/Next.js apps, start with the SDK — most control, built-in streaming. " +
|
|
178
|
+
"For MCP ecosystems (Claude/ChatGPT), use MCP Tools. " +
|
|
179
|
+
"For quick prototyping or non-React apps, use Embed.",
|
|
180
|
+
};
|
|
181
|
+
}
|
|
182
|
+
const integration = INTEGRATION_METHODS.find((m) => m.slug === method);
|
|
183
|
+
if (!integration) {
|
|
184
|
+
return {
|
|
185
|
+
error: `Unknown method: ${method}`,
|
|
186
|
+
availableMethods: INTEGRATION_METHODS.map((m) => m.slug),
|
|
187
|
+
};
|
|
188
|
+
}
|
|
189
|
+
return {
|
|
190
|
+
method: {
|
|
191
|
+
name: integration.name,
|
|
192
|
+
package: integration.package,
|
|
193
|
+
tagline: integration.tagline,
|
|
194
|
+
description: integration.description,
|
|
195
|
+
bestFor: integration.bestFor,
|
|
196
|
+
setupTime: integration.setupTime,
|
|
197
|
+
requirements: integration.requirements,
|
|
198
|
+
steps: integration.steps,
|
|
199
|
+
codeExample: integration.codeExample,
|
|
200
|
+
features: integration.features,
|
|
201
|
+
limitations: integration.limitations,
|
|
202
|
+
status: integration.status,
|
|
203
|
+
...(integration.configExample && { configExample: integration.configExample }),
|
|
204
|
+
},
|
|
205
|
+
otherMethods: INTEGRATION_METHODS
|
|
206
|
+
.filter((m) => m.slug !== method)
|
|
207
|
+
.map((m) => ({ name: m.name, tagline: m.tagline, setupTime: m.setupTime })),
|
|
208
|
+
};
|
|
209
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export interface PlatformInfo {
|
|
2
|
+
name: string;
|
|
3
|
+
tagline: string;
|
|
4
|
+
description: string;
|
|
5
|
+
website: string;
|
|
6
|
+
valueProposition: string[];
|
|
7
|
+
}
|
|
8
|
+
export interface UIGenerationMode {
|
|
9
|
+
id: string;
|
|
10
|
+
name: string;
|
|
11
|
+
description: string;
|
|
12
|
+
howItWorks: string;
|
|
13
|
+
bestFor: string;
|
|
14
|
+
tradeoffs: string;
|
|
15
|
+
status: "ga" | "beta";
|
|
16
|
+
}
|
|
17
|
+
export interface AIFeature {
|
|
18
|
+
id: string;
|
|
19
|
+
name: string;
|
|
20
|
+
category: string;
|
|
21
|
+
description: string;
|
|
22
|
+
howItWorks: string;
|
|
23
|
+
technicalDetail: string;
|
|
24
|
+
status: "ga" | "beta" | "coming-soon";
|
|
25
|
+
}
|
|
26
|
+
export interface NoCodeInfo {
|
|
27
|
+
description: string;
|
|
28
|
+
pmCapabilities: string[];
|
|
29
|
+
aiGeneration: string;
|
|
30
|
+
dashboardFeatures: string[];
|
|
31
|
+
}
|
|
32
|
+
export declare const PLATFORM: PlatformInfo;
|
|
33
|
+
export declare const UI_GENERATION_MODES: UIGenerationMode[];
|
|
34
|
+
export declare const AI_FEATURES: AIFeature[];
|
|
35
|
+
export declare const NO_CODE: NoCodeInfo;
|
|
36
|
+
export declare function getPlatformData(topic?: string): Record<string, unknown>;
|
|
@@ -0,0 +1,276 @@
|
|
|
1
|
+
// ============================================================================
|
|
2
|
+
// BranderUX Demo — Platform Knowledge (Real Product Information)
|
|
3
|
+
// ============================================================================
|
|
4
|
+
// ============================================================================
|
|
5
|
+
// PRODUCT INFO
|
|
6
|
+
// ============================================================================
|
|
7
|
+
export const PLATFORM = {
|
|
8
|
+
name: "BranderUX",
|
|
9
|
+
tagline: "AI-UX middleware — transforms AI responses into branded, interactive UI",
|
|
10
|
+
description: "BranderUX is an AI-UX middleware platform that sits between your AI provider and your users. " +
|
|
11
|
+
"Instead of plain text responses, your AI generates branded, interactive UI components — " +
|
|
12
|
+
"dashboards, charts, tables, forms, catalogs — all styled with your brand's colors, fonts, and layout. " +
|
|
13
|
+
"Every element is clickable: users drill deeper by clicking, not typing. " +
|
|
14
|
+
"Works with Claude, GPT, and Gemini. No developer required — PMs configure everything through the dashboard.",
|
|
15
|
+
website: "https://branderux.com",
|
|
16
|
+
valueProposition: [
|
|
17
|
+
"Transforms plain-text AI responses into branded visual UI (dashboards, charts, tables, forms, catalogs)",
|
|
18
|
+
"15 built-in element types — from KPI stats grids to interactive data tables to forms",
|
|
19
|
+
"Every element is interactive — click to drill deeper, zero typing needed",
|
|
20
|
+
"Works with Claude, GPT, and Gemini — switch providers without changing UI code",
|
|
21
|
+
"PM controls everything through the dashboard — no developer required for configuration",
|
|
22
|
+
"AI generates brand settings, screen layouts, and element configurations from natural language",
|
|
23
|
+
"Progressive streaming — elements appear as AI generates data, not after the full response",
|
|
24
|
+
"Three integration options: React SDK, MCP Tools, or zero-dependency Embed",
|
|
25
|
+
],
|
|
26
|
+
};
|
|
27
|
+
// ============================================================================
|
|
28
|
+
// UI GENERATION MODES
|
|
29
|
+
// ============================================================================
|
|
30
|
+
export const UI_GENERATION_MODES = [
|
|
31
|
+
{
|
|
32
|
+
id: "fixed-screens",
|
|
33
|
+
name: "Fixed Screens (Deterministic)",
|
|
34
|
+
description: "The PM configures screen layouts in the BranderUX dashboard — choosing which elements appear, " +
|
|
35
|
+
"their arrangement, and sizing. When a user asks a question, BranderUX AI analyzes the query " +
|
|
36
|
+
"and selects the best-fit screen, then the customer's AI fills it with data.",
|
|
37
|
+
howItWorks: "1. PM designs screens in the dashboard (drag-and-drop or AI-generated)\n" +
|
|
38
|
+
"2. User asks a question\n" +
|
|
39
|
+
"3. BranderUX AI scores each screen's fit for the query (<200ms)\n" +
|
|
40
|
+
"4. Top screens are selected, converted to AI tools\n" +
|
|
41
|
+
"5. Customer's AI calls the tool with real data\n" +
|
|
42
|
+
"6. BranderUX renders the screen with brand styling",
|
|
43
|
+
bestFor: "Predictable, controlled experiences where you want consistent layouts. Great for products with well-defined use cases.",
|
|
44
|
+
tradeoffs: "Most predictable — PM has full control over layouts. Requires upfront screen design (or AI generation).",
|
|
45
|
+
status: "ga",
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
id: "a2ui",
|
|
49
|
+
name: "A2UI (Flexible Mode)",
|
|
50
|
+
description: "The AI decides the layout dynamically. Instead of picking from predefined screens, the AI emits " +
|
|
51
|
+
"declarative UI trees — choosing which elements to use, how to arrange them (rows/columns), " +
|
|
52
|
+
"and what data to display. No predefined screens needed.",
|
|
53
|
+
howItWorks: "1. User asks a question\n" +
|
|
54
|
+
"2. BranderUX generates an A2UI prompt describing all available elements and layout primitives\n" +
|
|
55
|
+
"3. Customer's AI responds with a declarative UI structure\n" +
|
|
56
|
+
"4. BranderUX parses and renders the component tree with brand styling\n" +
|
|
57
|
+
"5. Elements and layout adapt to each query dynamically",
|
|
58
|
+
bestFor: "Dynamic, exploratory use cases where the AI should have creative control over layouts. Great for chatbots and assistants that handle diverse queries.",
|
|
59
|
+
tradeoffs: "More flexible — AI adapts layout to each query. Less predictable — PM has less control over exact layout.",
|
|
60
|
+
status: "beta",
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
id: "mcp-app",
|
|
64
|
+
name: "MCP App",
|
|
65
|
+
description: "Renders interactive UI panels directly inside AI chat interfaces like Claude and ChatGPT " +
|
|
66
|
+
"via the MCP (Model Context Protocol) standard. The AI calls a generate_screen tool, " +
|
|
67
|
+
"and BranderUX renders the screen as an embedded interactive HTML panel in the chat.",
|
|
68
|
+
howItWorks: "1. The @brander/mcp-tools library registers a generate_screen tool on your MCP server\n" +
|
|
69
|
+
"2. AI receives the tool and calls it with an array of elements\n" +
|
|
70
|
+
"3. BranderUX returns structured content + a self-contained HTML resource\n" +
|
|
71
|
+
"4. The host (Claude/ChatGPT) renders the HTML as an interactive panel\n" +
|
|
72
|
+
"5. Users interact with elements directly in the chat interface",
|
|
73
|
+
bestFor: "MCP server ecosystems. Ships branded UI inside Claude Desktop, Claude.ai, and ChatGPT without building a frontend.",
|
|
74
|
+
tradeoffs: "Works anywhere MCP is supported. Rendering happens inside the host's sandbox, so some browser APIs are limited.",
|
|
75
|
+
status: "ga",
|
|
76
|
+
},
|
|
77
|
+
];
|
|
78
|
+
// ============================================================================
|
|
79
|
+
// AI FEATURES
|
|
80
|
+
// ============================================================================
|
|
81
|
+
export const AI_FEATURES = [
|
|
82
|
+
{
|
|
83
|
+
id: "screen-select",
|
|
84
|
+
name: "Intelligent Screen Selection",
|
|
85
|
+
category: "Core AI",
|
|
86
|
+
description: "BranderUX AI analyzes each user query and scores all available screens for fit. " +
|
|
87
|
+
"The top-matching screens are selected and sent to the customer's AI as tools. " +
|
|
88
|
+
"Runs in under 200ms using Claude Haiku.",
|
|
89
|
+
howItWorks: "Each screen has selection criteria: whenToUse descriptions, clickedElements mappings, " +
|
|
90
|
+
"and exampleQueries. The AI evaluates the user's query against these criteria and returns " +
|
|
91
|
+
"fitScores (0.0–1.0), reasoning, and confidence level.",
|
|
92
|
+
technicalDetail: "Uses Claude Haiku for speed. Returns top 2-3 screens with fitScores, reasoning, and enhancedQuery.",
|
|
93
|
+
status: "ga",
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
id: "query-enhance",
|
|
97
|
+
name: "Query Enhancement",
|
|
98
|
+
category: "Core AI",
|
|
99
|
+
description: "Automatically enriches vague user queries with context from available screens and conversation history. " +
|
|
100
|
+
"The enhanced query guides the customer's AI to produce better-structured responses.",
|
|
101
|
+
howItWorks: "After screen selection, the original query is combined with screen context (available elements, " +
|
|
102
|
+
"data fields) and prior conversation. The enhanced query is more precise and tool-optimized.",
|
|
103
|
+
technicalDetail: "Optional via enableQueryEnhancement flag. Adds ~50ms processing time.",
|
|
104
|
+
status: "ga",
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
id: "streaming",
|
|
108
|
+
name: "AG-UI Streaming",
|
|
109
|
+
category: "Streaming",
|
|
110
|
+
description: "Progressive rendering via the AG-UI protocol. Elements appear on screen as the AI generates data, " +
|
|
111
|
+
"not after the full response completes. Tables show rows as they arrive, charts update with new data points.",
|
|
112
|
+
howItWorks: "The AI streams tool call arguments as JSON fragments via SSE. BranderUX's parser extracts element data " +
|
|
113
|
+
"incrementally. Each element renders progressively with smooth fade-in animations.",
|
|
114
|
+
technicalDetail: "17 AG-UI event types. Adapters available for Anthropic, OpenAI, and Gemini streaming formats.",
|
|
115
|
+
status: "ga",
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
id: "multi-provider",
|
|
119
|
+
name: "Multi-Provider AI Support",
|
|
120
|
+
category: "Compatibility",
|
|
121
|
+
description: "Works with Anthropic Claude, OpenAI GPT, and Google Gemini. Built-in stream adapters normalize " +
|
|
122
|
+
"each provider's streaming format, so you can switch AI providers without changing your UI code.",
|
|
123
|
+
howItWorks: "Each provider has a dedicated adapter (anthropicStream, openaiStream, geminiStream) that converts " +
|
|
124
|
+
"provider-specific SSE events into standardized AG-UI events. Tool schemas are also auto-generated " +
|
|
125
|
+
"in each provider's format.",
|
|
126
|
+
technicalDetail: "SDK includes 4 adapters: Anthropic, OpenAI, Gemini, and generic SSE.",
|
|
127
|
+
status: "ga",
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
id: "click-to-query",
|
|
131
|
+
name: "Click-to-Query Interactions",
|
|
132
|
+
category: "Interactivity",
|
|
133
|
+
description: "Every rendered element is interactive. Click a table row, chart segment, grid card, or button — " +
|
|
134
|
+
"BranderUX auto-generates a contextual follow-up query and sends it back to the AI. " +
|
|
135
|
+
"Users explore data by clicking, not typing.",
|
|
136
|
+
howItWorks: "Each element type has a behavior template (e.g., DataTable: 'Show details for [title] (ID: [id])'). " +
|
|
137
|
+
"When clicked, BranderUX fills the template with the clicked item's data and submits a new query. " +
|
|
138
|
+
"The AI responds with an appropriate detail screen.",
|
|
139
|
+
technicalDetail: "Templates use [field] placeholders. AI can also provide custom clickQuery per element.",
|
|
140
|
+
status: "ga",
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
id: "brand-generation",
|
|
144
|
+
name: "AI Brand Generation",
|
|
145
|
+
category: "No-Code AI",
|
|
146
|
+
description: "Describe your company in natural language — the AI generates a complete brand package: " +
|
|
147
|
+
"primary/secondary/accent colors, font style, layout preferences, border radius, shadow settings, " +
|
|
148
|
+
"and a full gray palette. Refine with follow-up prompts.",
|
|
149
|
+
howItWorks: "Enter a company description (e.g., 'Modern fintech startup for millennials'). " +
|
|
150
|
+
"The AI detects the industry and style preferences, then generates brand settings. " +
|
|
151
|
+
"You can regenerate with refinements (e.g., 'Make it more playful, use rounded corners').",
|
|
152
|
+
technicalDetail: "Uses Claude for generation. Includes reasoning for colors, typography, and layout choices.",
|
|
153
|
+
status: "ga",
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
id: "project-generation",
|
|
157
|
+
name: "AI Project Generation",
|
|
158
|
+
category: "No-Code AI",
|
|
159
|
+
description: "Describe your project and the AI generates the complete configuration: brand settings, " +
|
|
160
|
+
"screen layouts, element visibility, and system prompts. Go from idea to working AI-powered UI " +
|
|
161
|
+
"in minutes.",
|
|
162
|
+
howItWorks: "1. Describe your project (or answer discovery questions)\n" +
|
|
163
|
+
"2. AI generates a project plan with recommended screens\n" +
|
|
164
|
+
"3. Brand settings, screen layouts, and element configs are created automatically\n" +
|
|
165
|
+
"4. Preview and refine in the dashboard",
|
|
166
|
+
technicalDetail: "Multi-phase generation: discovery → plan → brand → screens → configuration.",
|
|
167
|
+
status: "ga",
|
|
168
|
+
},
|
|
169
|
+
];
|
|
170
|
+
// ============================================================================
|
|
171
|
+
// NO-CODE PHILOSOPHY
|
|
172
|
+
// ============================================================================
|
|
173
|
+
export const NO_CODE = {
|
|
174
|
+
description: "BranderUX is designed so that Product Managers own the entire AI-UX experience without writing code. " +
|
|
175
|
+
"Developers are only needed for the initial SDK/MCP integration — after that, PMs control everything " +
|
|
176
|
+
"through the dashboard.",
|
|
177
|
+
pmCapabilities: [
|
|
178
|
+
"Design brand settings (colors, fonts, layout) — or let AI generate them",
|
|
179
|
+
"Configure screen layouts with a visual screen builder (drag-and-drop)",
|
|
180
|
+
"Set element visibility per screen — toggle which elements appear",
|
|
181
|
+
"Create custom screens with AI assistance",
|
|
182
|
+
"Manage system prompts and AI behavior",
|
|
183
|
+
"Configure click-to-query behaviors",
|
|
184
|
+
"Switch between Fixed Screens and A2UI modes",
|
|
185
|
+
"Monitor performance and usage through analytics",
|
|
186
|
+
"Generate complete projects from natural language descriptions",
|
|
187
|
+
],
|
|
188
|
+
aiGeneration: "Describe your project in natural language — the AI generates brand settings, screen layouts, " +
|
|
189
|
+
"element configurations, and system prompts automatically. Refine with conversational follow-ups. " +
|
|
190
|
+
"Go from idea to working branded AI-UX in minutes, not weeks.",
|
|
191
|
+
dashboardFeatures: [
|
|
192
|
+
"Visual Screen Builder — drag-and-drop element placement",
|
|
193
|
+
"Brand Studio — AI-powered brand generation and customization",
|
|
194
|
+
"Element Library — configure props, visibility, and behavior for each element",
|
|
195
|
+
"Playground — test your AI-UX with real queries in real-time",
|
|
196
|
+
"API Token Management — create tokens for Embed and SDK integrations",
|
|
197
|
+
"Project Generator — AI creates your entire project from a description",
|
|
198
|
+
],
|
|
199
|
+
};
|
|
200
|
+
// ============================================================================
|
|
201
|
+
// HANDLER
|
|
202
|
+
// ============================================================================
|
|
203
|
+
export function getPlatformData(topic) {
|
|
204
|
+
switch (topic) {
|
|
205
|
+
case "integration":
|
|
206
|
+
return {
|
|
207
|
+
topic: "Integration Methods",
|
|
208
|
+
description: "BranderUX offers three integration methods, each suited to different use cases.",
|
|
209
|
+
methods: [
|
|
210
|
+
{ name: "SDK (@brander/sdk)", bestFor: "React / Next.js apps", setupTime: "5 minutes" },
|
|
211
|
+
{ name: "MCP Tools (@brander/mcp-tools)", bestFor: "MCP servers (Claude Desktop, Claude.ai, ChatGPT)", setupTime: "10 minutes" },
|
|
212
|
+
{ name: "Embed", bestFor: "Any web app (zero dependencies)", setupTime: "2 minutes" },
|
|
213
|
+
],
|
|
214
|
+
note: "Use the get_integration_guide tool for detailed setup instructions and code examples.",
|
|
215
|
+
};
|
|
216
|
+
case "modes":
|
|
217
|
+
return {
|
|
218
|
+
topic: "UI Generation Modes",
|
|
219
|
+
modes: UI_GENERATION_MODES.map((m) => ({
|
|
220
|
+
name: m.name,
|
|
221
|
+
description: m.description,
|
|
222
|
+
howItWorks: m.howItWorks,
|
|
223
|
+
bestFor: m.bestFor,
|
|
224
|
+
tradeoffs: m.tradeoffs,
|
|
225
|
+
status: m.status,
|
|
226
|
+
})),
|
|
227
|
+
};
|
|
228
|
+
case "ai-features":
|
|
229
|
+
return {
|
|
230
|
+
topic: "AI Features",
|
|
231
|
+
features: AI_FEATURES.map((f) => ({
|
|
232
|
+
name: f.name,
|
|
233
|
+
category: f.category,
|
|
234
|
+
description: f.description,
|
|
235
|
+
howItWorks: f.howItWorks,
|
|
236
|
+
technicalDetail: f.technicalDetail,
|
|
237
|
+
status: f.status,
|
|
238
|
+
})),
|
|
239
|
+
};
|
|
240
|
+
case "no-code":
|
|
241
|
+
return {
|
|
242
|
+
topic: "No-Code / PM-Driven Workflow",
|
|
243
|
+
...NO_CODE,
|
|
244
|
+
};
|
|
245
|
+
default:
|
|
246
|
+
return {
|
|
247
|
+
topic: "BranderUX Overview",
|
|
248
|
+
product: PLATFORM,
|
|
249
|
+
uiGenerationModes: UI_GENERATION_MODES.map((m) => ({
|
|
250
|
+
name: m.name,
|
|
251
|
+
description: m.description,
|
|
252
|
+
bestFor: m.bestFor,
|
|
253
|
+
status: m.status,
|
|
254
|
+
})),
|
|
255
|
+
aiFeatures: AI_FEATURES.map((f) => ({
|
|
256
|
+
name: f.name,
|
|
257
|
+
description: f.description,
|
|
258
|
+
status: f.status,
|
|
259
|
+
})),
|
|
260
|
+
noCode: {
|
|
261
|
+
description: NO_CODE.description,
|
|
262
|
+
pmCapabilities: NO_CODE.pmCapabilities,
|
|
263
|
+
},
|
|
264
|
+
integrationMethods: [
|
|
265
|
+
{ name: "SDK (@brander/sdk)", bestFor: "React / Next.js apps" },
|
|
266
|
+
{ name: "MCP Tools (@brander/mcp-tools)", bestFor: "MCP servers (Claude, ChatGPT)" },
|
|
267
|
+
{ name: "Embed", bestFor: "Any web app" },
|
|
268
|
+
],
|
|
269
|
+
nextSteps: [
|
|
270
|
+
"Use explore_elements to see all 15 element types with sample data",
|
|
271
|
+
"Use get_demo_scenario to see ready-to-render business demos",
|
|
272
|
+
"Use get_integration_guide for setup instructions and code",
|
|
273
|
+
],
|
|
274
|
+
};
|
|
275
|
+
}
|
|
276
|
+
}
|