Improve DX for Schema & System Prompt Generation Across Backends
メンテナーはふだん 1 日以内に返信
@AbhinRustagi がすでに取り組んでいます。
2026年4月15日 から。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 35/100
- issue の種類
- 機能追加
- 明瞭さ
- 明確に書かれている
- 活発さ
- 静か
- 技術スタック
- react, typescript, vite
調査の方向性
Start by reading the existing defineComponent() schema and renderer workflow, then inspect the library entry point specified in the issue (./src/library.ts) and how library.prompt() and library.toJSONSchema() are used. The proposed starting point is a Vite plugin configured in vite.config.ts; done means the build generates system-prompt.txt and schema.json in the configured output directory.
索引モデルが issue の本文から書いたものです。
説明
Is your feature request related to a problem?
The current schema + prompt generation workflow is tightly coupled to React:
- Schema and renderers are bundled together in
defineComponent(). The backend only needs the schema (names, props, descriptions), but the CLI must import React and all component deps just to extract it. - CLI breaks outside React — doesn't work for Vue/Svelte frontends, React Native (can't resolve native imports), or non-JS backends (Python, Go) without a separate Node build step.
- React Native workaround is fragile. Docs recommend maintaining two mirror library files (real renderers + null renderers). Any drift silently breaks GenUI with no automated check.
Describe the solution you'd like
Bundler plugins that generate system-prompt.txt and schema.json as build artifacts during the frontend build.
Since the frontend build already has React, Zod, and all component deps resolved, we hook into it to extract the schema — no separate CLI step, no manual sync.
Starting with Vite
// vite.config.ts
import { openuiPlugin } from "@openuidev/vite-plugin";
export default defineConfig({
plugins: [
openuiPlugin({
library: "./src/library.ts",
outDir: "../backend/generated",
}),
],
});
The plugin calls library.prompt() and library.toJSONSchema() during build, writes the output files. Any backend (Python, Go, etc.) reads the plain files — no Node dependency.
Scaling to other bundlers
Use unplugin to write the logic once and compile to Vite, webpack, esbuild, and Rollup from a single codebase. For Metro (React Native), a dedicated plugin would eliminate the dual-library workaround entirely.
** Describe alternatives you've considered **
Dual library files (current React Native approach): Two mirror files with identical schemas — one with real renderers, one with () => null for the CLI. Works today but manual sync is fragile, scales poorly, and feels like a workaround rather than a solution.
- 主要言語
- TypeScript
- スター
- 10k
- フォーク
- 698
- 平均マージ
- 1日 6時間
- マージ済み PR(30日)
- 148
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
thesysdev/openui のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
thesysdev/openui#1445 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
Add dataInvention flag to PromptOptions to disable the 'generate realistic/plausible data' ruleオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
thesysdev/openui#959 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 18/100
メンテナーはふだん 1 日以内に返信
thesysdev/openui の issue をすべて見る
似ている issue
-
Navbar avatar and name stay stale after saving profile changes対応中かも @alexechoi が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
marmelab/atomic-crm#416 ·
メンテナーはふだん 1 日以内に返信
-
feature-request
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
bluesky-social/social-app#12343 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
lucide-icons/lucide#5165 ·
メンテナーはふだん 1 日以内に返信
-
[Feature] Preferences - Keep the theme selection popover open after selection for quick previewオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
marktext/marktext#6033 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
area:desktop bug has repro platform:macos
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
anthropics/claude-code#107903 ·