AI NewsDev toolsAnnouncement

shadcn released an official chatbot template, with 889 stars in three weeks

shadcn published a minimal official chatbot template on Next.js and the AI SDK that demonstrates two newer packages, shadcn/react and shadcn/typeset, and it gained 889 GitHub stars in its first three weeks.

AI News

Editorial3 min read

LinkedInX
The GitHub repository card for shadcn-ui slash chatbot-template

Image: GitHub

Why it mattersA team that wanted a chatbot UI in the shadcn style used to copy pieces from other repositories; now the reference implementation is one repo owned by shadcn.

shadcn has published an official chatbot template, shadcn-ui/chatbot-template, under the MIT licence. The repository was created on 11 August 2026, and in the twenty-one days since it has gained 889 stars and 91 forks on GitHub. It is one of the first public projects demonstrating two newer libraries in the shadcn family, shadcn/react and shadcn/typeset.

What the template includes

The template is a Next.js app that talks to language models through the Vercel AI Gateway, so the same code runs against every model the gateway proxies without a per-provider integration. On Vercel deployments it authenticates to the gateway through OIDC, so no key is needed in production; for local development the README documents a single AI_GATEWAY_API_KEY environment variable.

The chat interface itself is composed of shadcn primitives. Streaming with markdown rendering uses shadcn/typeset. The message scroller and other conversation primitives come from shadcn/react. Both packages are recent additions to the shadcn stack and this template is how they are being introduced to most developers.

Three tools are connected in the reference implementation: a server-executed GitHub repository lookup, provider-native web search, and a human-in-the-loop questionnaire called ask_user that pauses the model to collect an answer through a shadcn form component. Each tool is a separate file under tools/, and adding another one is a matter of writing a tool() with an input schema and registering it. Message types are inferred from the tool definitions, so renaming a tool field breaks the build instead of silently producing an undefined field at runtime.

The security note is short and honest

The README does something most starter kits do not, which is to describe the risk clearly instead of hiding it. The /api/chat route is public and unauthenticated by default, and every request spends the account's AI Gateway credits.

The three suggestions it makes are the ones a team actually needs before putting a chatbot in front of real users: rate limit the route so a single client cannot use up the budget, cap the AI Gateway spend as a final safeguard, and add authentication if the chatbot is meant to be private. The route already validates input, restricts models to a defined allow list, caps output tokens and step count, and aborts generation on client disconnect. Those limit a single request, and the note states clearly that they do not limit the total number of requests.

The interesting thing here is what this template replaces, which is a set of chatbot demos put together from other repositories. Anyone who wanted a chatbot in the shadcn style has been assembling one from the AI SDK docs, a Vercel chat template, and a set of shadcn components. This is now the reference implementation, owned by shadcn, and it is the first public showcase of shadcn/react message primitives alongside shadcn/typeset markdown rendering.

For a team that already uses shadcn, the practical question is whether to start a new chatbot from this template or add its patterns to an existing project. The template includes the code for tool calls, provider-native web search, and a proper human-in-the-loop question flow that a team would otherwise write from scratch. The security caveats are real, and shadcn's own name on the repository is the main reason to prefer this pattern to a demo assembled by hand.

Source

This item was written by an AI system from the linked source. Reveneau is responsible for what it publishes.

Share
LinkedInX
Start a project