Cookies

With your permission, we use Google Analytics cookies to measure visits and improve the site. Necessary cookies are always on. You can change your choice or withdraw consent anytime in the footer, under Cookie settings. Cookie Policy

Skip to content

Generative Interfaces ·Advanced

AI Shadcn Component Generator

About this app

Ported from the upstream CopilotKit/shadify repository.

  • Complete open-source code
  • Step-by-step tutorial

Technical sheet

Category
Generative Interfaces
Difficulty
Advanced
Models
OpenAI
Frameworks
LangChain
Runs locally?
Needs cloud APIs
Required keys
OPENAI_API_KEYTAVILY_API_KEY

License Apache-2.0 · content curated and maintained by Doutor AI.

Full tutorial

Ported from the upstream CopilotKit/shadify repository.

Describe a UI in plain English. Get a live, interactive shadcn/ui component back. Export it as clean React code.

https://github.com/user-attachments/assets/b14bebd6-527a-48bd-94f5-d27fea8808aa

Gen UI concept - schema-driven component composition. The full shadcn component schema is passed as agent context, so the model knows exactly which primitives exist, what props they take, and how they nest. The agent's "output" is a structured tree of those primitives - streamed to the browser, mounted as real React, exportable as code. The design system is the action space.

Built With

  • shadcn/ui - The AI composes from real shadcn components (cards, charts, forms, menus, layouts). Every generated component is accessible, polished, and uses the same primitives you'd npx shadcn add into your own project.
  • CopilotKit - Streams structured UI from the agent to the browser in real time. Passes the full component schema as agent context so the model knows exactly what it can build.
  • AG-UI - The agent ↔ UI protocol that carries tool calls and component instructions between the LangGraph backend and the React frontend.
  • LangGraph - Powers the agent backend. Handles reasoning, tool use (web search, site extraction via Tavily), and conversation memory across turns.
  • Render - All three services deploy from a single render.yaml Blueprint. Render wires service URLs together automatically via fromService references - push to main and you're live.

Architecture

Three services in a pnpm monorepo:

UI (React + Vite)  →  Runtime (Hono + CopilotKit)  →  Agent (FastAPI + LangGraph)
ServicePathWhat it does
uiapps/uiChat interface, component rendering, code export
runtimeapps/runtimeCopilotKit runtime, routes messages to the agent
agentapps/agentLangGraph agent with search tools, returns structured UI

Quick Start

pnpm install

Add your keys:

# apps/runtime/.env
OPENAI_API_KEY=sk-...

# apps/agent/.env
OPENAI_API_KEY=sk-...
TAVILY_API_KEY=tvly-...
pnpm dev

UI runs at localhost:5173. Runtime on 4000, agent on 8123.

Deploy

Deploy to Render

Or connect your repo - render.yaml defines everything.

From the same category

Generative InterfacesAdvanced

AI Dashboard Canvas Agent

An agent that populates live charts, metrics, and real-time data into a Canvas dashboard instead of just streaming text. Built with CopilotKit, AG-UI,…

  • OpenAI
  • Gemini
Generative InterfacesAdvanced

AI Deep Research Agent

A deep research assistant that plans, searches the web, writes to a virtual filesystem, and renders each tool call as a live card in a workspace pane.…

  • OpenAI
Generative InterfacesAdvanced

AI Financial Coach Agent

A multi-agent financial coach that analyzes your budget, plans your savings, and builds debt-payoff strategies - rendered as interactive UI cards in a…

  • Gemini

Need a tailor-made solution?

Not sure where to start with AI in your business? Get a free assessment and a tailored plan - no commitment.

Save hours every week with AI, no hassle

Doutor AI gives you 1,859 ready-to-copy AI prompts, by industry and in plain English - plus a complete technical library for those who want to go further.

See plans