Skip to content

About

A Widget builder application to build OpenAI compatible ChatKit widget

Resources

Security policy

Stars

5 stars

Watchers

0 watching

Forks

Repository files navigation

GenUI Studio

npm Software License Buy us a tree Made by SWIS

An AI-powered visual UI widget builder and design studio. Create, edit, and manage reusable widget templates with the help of Claude or ChatGPT.

studio.png

What it does

GenUI Studio is a web-based IDE for building OpenAI Chatkit compatible widgets. You describe what you want in natural language, and the AI agent generates or modifies widget templates on a visual canvas. Templates use a JSX-like syntax that compiles to Nunjucks JSON templates, compatible with the @swis/genui-widgets component library.

Key features:

  • AI agent — Chat with Claude or ChatGPT to generate and modify widgets
  • Visual canvas — Drag, position, and arrange widgets on an infinite canvas
  • Live preview — See widgets render with dynamic template data in real time
  • Theme system — Full light/dark mode with customizable color palettes
  • Multi-project — Create and switch between multiple projects
  • Multilingual — English and Dutch interface
  • Undo/redo — Full history with keyboard shortcuts

Quick start

Run it instantly with npx. No clone or install required:

npx @swis/genui-studio

Then open http://localhost:4277 in your browser.

You can change the port with the PORT environment variable:

PORT=3000 npx @swis/genui-studio

Requirements

API keys can be entered directly in the app's prompt bar.

WebMCP tools

In browsers with WebMCP, the studio registers tools that let any agent build widgets on the board:

Tool Purpose
generate_widget Design a widget from a prompt with the studio's own agent. Pass data to build it around real values, widgetId to change an existing one
list_widgets, get_widget Read the board
set_widget_data Replace a widget's data without redesigning it
delete_widget Remove a widget
get_authoring_guide, create_widget, update_widget Write widget JSX yourself, with validation errors returned for retries

Every tool returns JSON: { "ok": true, ... } or { "ok": false, "error": { "code", "message" } }.

When the studio is embedded (?embed=1&parentOrigin=...), its tools are exposed to the host page. Grant the iframe the tools permission and read them with fromOrigins:

<iframe src="https://studio.example.com/?embed=1&parentOrigin=https://host.example.com" allow="tools"></iframe>
import { getStudioTools, onStudioToolsChange } from '@swis/genui-studio/embed'

const tools = await getStudioTools('https://studio.example.com')
// Hand these to your agent, or run one directly:
const generate = tools.find((t) => t.name === 'generate_widget')
await document.modelContext.executeTool(generate, { prompt: 'An employee card', data: { name: 'Grace Hopper' } })

New and changed widgets reach the host through the embed client's onChange, as with manual edits. generate_widget uses the LLM provider configured in the embed config.

Development

If you want to contribute or run from source:

git clone https://github.com/swisnl/genui-studio.git
cd genui-studio
npm install
# Development server (hot reload)
npm run dev

# Build for production
npm run build

# Preview production build
npm run preview

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

This package is open-sourced software licensed under the GPL License.

This package is Treeware. If you use it in production, then we ask that you buy the world a tree to thank us for our work. By contributing to the Treeware forest you'll be creating employment for local families and restoring wildlife habitats.

SWIS ❤️ Open Source

SWIS is a web agency from Leiden, the Netherlands. We love working with open source software.

About

A Widget builder application to build OpenAI compatible ChatKit widget

Resources

Security policy

Stars

5 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages