From b3a764847504e28d15f9a572cfe18e8a7b559e18 Mon Sep 17 00:00:00 2001 From: Abhin Rustagi Date: Mon, 24 Aug 2026 00:48:21 +0530 Subject: [PATCH] feat: add shadcn-chat template --- index.json | 8 +- shadcn-chat/README.md | 288 + shadcn-chat/components.json | 21 + shadcn-chat/eslint.config.mjs | 11 + shadcn-chat/gitignore | 4 + shadcn-chat/next.config.ts | 7 + shadcn-chat/package-lock.json | 11783 ++++++++++++++++ shadcn-chat/package.json | 76 + shadcn-chat/pnpm-workspace.yaml | 17 + shadcn-chat/postcss.config.mjs | 7 + shadcn-chat/src/app/api/chat/route.ts | 379 + shadcn-chat/src/app/globals.css | 124 + shadcn-chat/src/app/layout.tsx | 22 + shadcn-chat/src/app/page.tsx | 69 + shadcn-chat/src/components/ui/accordion.tsx | 64 + .../src/components/ui/alert-dialog.tsx | 134 + shadcn-chat/src/components/ui/alert.tsx | 60 + shadcn-chat/src/components/ui/avatar.tsx | 96 + shadcn-chat/src/components/ui/badge.tsx | 46 + shadcn-chat/src/components/ui/button.tsx | 62 + shadcn-chat/src/components/ui/calendar.tsx | 180 + shadcn-chat/src/components/ui/card.tsx | 75 + shadcn-chat/src/components/ui/carousel.tsx | 234 + shadcn-chat/src/components/ui/chart.tsx | 326 + shadcn-chat/src/components/ui/checkbox.tsx | 29 + shadcn-chat/src/components/ui/data-table.tsx | 339 + shadcn-chat/src/components/ui/dialog.tsx | 120 + shadcn-chat/src/components/ui/drawer.tsx | 113 + .../src/components/ui/dropdown-menu.tsx | 233 + shadcn-chat/src/components/ui/input.tsx | 21 + shadcn-chat/src/components/ui/label.tsx | 21 + shadcn-chat/src/components/ui/pagination.tsx | 103 + shadcn-chat/src/components/ui/popover.tsx | 74 + shadcn-chat/src/components/ui/progress.tsx | 28 + shadcn-chat/src/components/ui/radio-group.tsx | 45 + shadcn-chat/src/components/ui/select.tsx | 175 + shadcn-chat/src/components/ui/separator.tsx | 28 + shadcn-chat/src/components/ui/slider.tsx | 58 + shadcn-chat/src/components/ui/switch.tsx | 35 + shadcn-chat/src/components/ui/table.tsx | 94 + shadcn-chat/src/components/ui/tabs.tsx | 81 + shadcn-chat/src/components/ui/textarea.tsx | 18 + shadcn-chat/src/generated/system-prompt.txt | 273 + shadcn-chat/src/hooks/use-system-theme.tsx | 41 + shadcn-chat/src/lib/shadcn-genui/action.ts | 23 + .../lib/shadcn-genui/components/accordion.tsx | 64 + .../components/alert-dialog-block.tsx | 65 + .../src/lib/shadcn-genui/components/alert.tsx | 49 + .../lib/shadcn-genui/components/avatar.tsx | 23 + .../src/lib/shadcn-genui/components/badge.tsx | 20 + .../lib/shadcn-genui/components/button.tsx | 64 + .../lib/shadcn-genui/components/buttons.tsx | 24 + .../components/calendar-block.tsx | 68 + .../shadcn-genui/components/card-header.tsx | 22 + .../lib/shadcn-genui/components/carousel.tsx | 48 + .../lib/shadcn-genui/components/charts.tsx | 384 + .../components/checkbox-group.tsx | 69 + .../shadcn-genui/components/code-block.tsx | 32 + .../shadcn-genui/components/date-picker.tsx | 62 + .../shadcn-genui/components/dialog-block.tsx | 44 + .../shadcn-genui/components/drawer-block.tsx | 48 + .../components/follow-up-block.tsx | 50 + .../shadcn-genui/components/form-control.tsx | 30 + .../src/lib/shadcn-genui/components/form.tsx | 39 + .../src/lib/shadcn-genui/components/image.tsx | 52 + .../src/lib/shadcn-genui/components/input.tsx | 65 + .../src/lib/shadcn-genui/components/label.tsx | 17 + .../components/markdown-renderer.tsx | 24 + .../components/pagination-block.tsx | 87 + .../lib/shadcn-genui/components/progress.tsx | 27 + .../shadcn-genui/components/radio-group.tsx | 66 + .../lib/shadcn-genui/components/select.tsx | 92 + .../lib/shadcn-genui/components/separator.tsx | 16 + .../lib/shadcn-genui/components/slider.tsx | 64 + .../shadcn-genui/components/switch-group.tsx | 69 + .../src/lib/shadcn-genui/components/table.tsx | 73 + .../src/lib/shadcn-genui/components/tabs.tsx | 73 + .../src/lib/shadcn-genui/components/tag.tsx | 49 + .../shadcn-genui/components/text-content.tsx | 29 + .../lib/shadcn-genui/components/textarea.tsx | 64 + .../shadcn-genui/components/typography.tsx | 72 + shadcn-chat/src/lib/shadcn-genui/helpers.ts | 62 + shadcn-chat/src/lib/shadcn-genui/index.tsx | 428 + shadcn-chat/src/lib/shadcn-genui/rules.ts | 17 + shadcn-chat/src/lib/shadcn-genui/unions.ts | 70 + shadcn-chat/tsconfig.json | 30 + 86 files changed, 18794 insertions(+), 2 deletions(-) create mode 100644 shadcn-chat/README.md create mode 100644 shadcn-chat/components.json create mode 100644 shadcn-chat/eslint.config.mjs create mode 100644 shadcn-chat/gitignore create mode 100644 shadcn-chat/next.config.ts create mode 100644 shadcn-chat/package-lock.json create mode 100644 shadcn-chat/package.json create mode 100644 shadcn-chat/pnpm-workspace.yaml create mode 100644 shadcn-chat/postcss.config.mjs create mode 100644 shadcn-chat/src/app/api/chat/route.ts create mode 100644 shadcn-chat/src/app/globals.css create mode 100644 shadcn-chat/src/app/layout.tsx create mode 100644 shadcn-chat/src/app/page.tsx create mode 100644 shadcn-chat/src/components/ui/accordion.tsx create mode 100644 shadcn-chat/src/components/ui/alert-dialog.tsx create mode 100644 shadcn-chat/src/components/ui/alert.tsx create mode 100644 shadcn-chat/src/components/ui/avatar.tsx create mode 100644 shadcn-chat/src/components/ui/badge.tsx create mode 100644 shadcn-chat/src/components/ui/button.tsx create mode 100644 shadcn-chat/src/components/ui/calendar.tsx create mode 100644 shadcn-chat/src/components/ui/card.tsx create mode 100644 shadcn-chat/src/components/ui/carousel.tsx create mode 100644 shadcn-chat/src/components/ui/chart.tsx create mode 100644 shadcn-chat/src/components/ui/checkbox.tsx create mode 100644 shadcn-chat/src/components/ui/data-table.tsx create mode 100644 shadcn-chat/src/components/ui/dialog.tsx create mode 100644 shadcn-chat/src/components/ui/drawer.tsx create mode 100644 shadcn-chat/src/components/ui/dropdown-menu.tsx create mode 100644 shadcn-chat/src/components/ui/input.tsx create mode 100644 shadcn-chat/src/components/ui/label.tsx create mode 100644 shadcn-chat/src/components/ui/pagination.tsx create mode 100644 shadcn-chat/src/components/ui/popover.tsx create mode 100644 shadcn-chat/src/components/ui/progress.tsx create mode 100644 shadcn-chat/src/components/ui/radio-group.tsx create mode 100644 shadcn-chat/src/components/ui/select.tsx create mode 100644 shadcn-chat/src/components/ui/separator.tsx create mode 100644 shadcn-chat/src/components/ui/slider.tsx create mode 100644 shadcn-chat/src/components/ui/switch.tsx create mode 100644 shadcn-chat/src/components/ui/table.tsx create mode 100644 shadcn-chat/src/components/ui/tabs.tsx create mode 100644 shadcn-chat/src/components/ui/textarea.tsx create mode 100644 shadcn-chat/src/generated/system-prompt.txt create mode 100644 shadcn-chat/src/hooks/use-system-theme.tsx create mode 100644 shadcn-chat/src/lib/shadcn-genui/action.ts create mode 100644 shadcn-chat/src/lib/shadcn-genui/components/accordion.tsx create mode 100644 shadcn-chat/src/lib/shadcn-genui/components/alert-dialog-block.tsx create mode 100644 shadcn-chat/src/lib/shadcn-genui/components/alert.tsx create mode 100644 shadcn-chat/src/lib/shadcn-genui/components/avatar.tsx create mode 100644 shadcn-chat/src/lib/shadcn-genui/components/badge.tsx create mode 100644 shadcn-chat/src/lib/shadcn-genui/components/button.tsx create mode 100644 shadcn-chat/src/lib/shadcn-genui/components/buttons.tsx create mode 100644 shadcn-chat/src/lib/shadcn-genui/components/calendar-block.tsx create mode 100644 shadcn-chat/src/lib/shadcn-genui/components/card-header.tsx create mode 100644 shadcn-chat/src/lib/shadcn-genui/components/carousel.tsx create mode 100644 shadcn-chat/src/lib/shadcn-genui/components/charts.tsx create mode 100644 shadcn-chat/src/lib/shadcn-genui/components/checkbox-group.tsx create mode 100644 shadcn-chat/src/lib/shadcn-genui/components/code-block.tsx create mode 100644 shadcn-chat/src/lib/shadcn-genui/components/date-picker.tsx create mode 100644 shadcn-chat/src/lib/shadcn-genui/components/dialog-block.tsx create mode 100644 shadcn-chat/src/lib/shadcn-genui/components/drawer-block.tsx create mode 100644 shadcn-chat/src/lib/shadcn-genui/components/follow-up-block.tsx create mode 100644 shadcn-chat/src/lib/shadcn-genui/components/form-control.tsx create mode 100644 shadcn-chat/src/lib/shadcn-genui/components/form.tsx create mode 100644 shadcn-chat/src/lib/shadcn-genui/components/image.tsx create mode 100644 shadcn-chat/src/lib/shadcn-genui/components/input.tsx create mode 100644 shadcn-chat/src/lib/shadcn-genui/components/label.tsx create mode 100644 shadcn-chat/src/lib/shadcn-genui/components/markdown-renderer.tsx create mode 100644 shadcn-chat/src/lib/shadcn-genui/components/pagination-block.tsx create mode 100644 shadcn-chat/src/lib/shadcn-genui/components/progress.tsx create mode 100644 shadcn-chat/src/lib/shadcn-genui/components/radio-group.tsx create mode 100644 shadcn-chat/src/lib/shadcn-genui/components/select.tsx create mode 100644 shadcn-chat/src/lib/shadcn-genui/components/separator.tsx create mode 100644 shadcn-chat/src/lib/shadcn-genui/components/slider.tsx create mode 100644 shadcn-chat/src/lib/shadcn-genui/components/switch-group.tsx create mode 100644 shadcn-chat/src/lib/shadcn-genui/components/table.tsx create mode 100644 shadcn-chat/src/lib/shadcn-genui/components/tabs.tsx create mode 100644 shadcn-chat/src/lib/shadcn-genui/components/tag.tsx create mode 100644 shadcn-chat/src/lib/shadcn-genui/components/text-content.tsx create mode 100644 shadcn-chat/src/lib/shadcn-genui/components/textarea.tsx create mode 100644 shadcn-chat/src/lib/shadcn-genui/components/typography.tsx create mode 100644 shadcn-chat/src/lib/shadcn-genui/helpers.ts create mode 100644 shadcn-chat/src/lib/shadcn-genui/index.tsx create mode 100644 shadcn-chat/src/lib/shadcn-genui/rules.ts create mode 100644 shadcn-chat/src/lib/shadcn-genui/unions.ts create mode 100644 shadcn-chat/tsconfig.json diff --git a/index.json b/index.json index adaeb49..ab448c5 100644 --- a/index.json +++ b/index.json @@ -2,11 +2,15 @@ "templates": [ { "name": "openui-cloud", - "description": "OpenUI Cloud — free hosted models, managed history, tools & artifacts; fastest setup (recommended)" + "description": "OpenUI Cloud \u2014 free hosted models, managed history, tools & artifacts; fastest setup (recommended)" }, { "name": "openui-self-hosted", - "description": "Self-hosted — bring your own provider and self-manage the entire backend" + "description": "Self-hosted \u2014 bring your own provider and self-manage the entire backend" + }, + { + "name": "shadcn-chat", + "description": "OpenUI chat using shadcn/ui components" } ] } diff --git a/shadcn-chat/README.md b/shadcn-chat/README.md new file mode 100644 index 0000000..9cb6159 --- /dev/null +++ b/shadcn-chat/README.md @@ -0,0 +1,288 @@ +# Shadcn Chat Example + +A full-stack generative UI chatbot that demonstrates wiring [OpenUI Lang](https://www.openui.com/docs/openui-lang/overview) to a custom component library built on [shadcn/ui](https://ui.shadcn.com/). Instead of replying with plain text or markdown, the LLM generates structured UI markup that the client renders as shadcn/ui components — cards, tables, charts, forms, dialogs, and more — in real time as tokens stream in. + +Features: 45+ custom shadcn/ui components, multi-step tool calling, Server-Sent Events (SSE) streaming, and automatic light/dark theme support. + +