// the find
shadcn-ui/chatbot-template
A minimal chatbot template built with Next.js, AI SDK, shadcn/ui, shadcn/react, shadcn/typeset. It runs on the Vercel AI Gateway.
A starter chatbot app built on Next.js, the AI SDK's streamText and useChat, and shadcn/ui components, routed through the Vercel AI Gateway. It suits developers who want a working streaming chat with tool calling and a one-click Vercel deploy, and who plan to change the code rather than run it as-is.
- Each tool is one file under tools/, registered in index.ts, and the README maps every tool-<name> part to a component. Message types come from InferUITools, so renaming a tool's input field fails the build instead of rendering undefined.
- Tool parts move through explicit states (input-streaming, input-available, output-available, output-error), and each part component switches on that state. The progress, result and error paths are visible in the code instead of being inferred from null checks.
- The ask_user tool has no execute function, so the model waits for an answer from the UI and the questionnaire renders as a card pinned to the scroller. That is a clean way to do human-in-the-loop without a separate state machine.
- The Security section says plainly that /api/chat is public and that per-request caps do not stop volume abuse. It names the denial-of-wallet risk and the fix options, which is more useful than leaving the risk out.
- The chat route has no authentication and no rate limiting. Anyone who uses the Deploy button gets a public endpoint that spends their gateway credits until they add WAF rules or Upstash themselves. The README says so, but the default is still open.
- Gateway auth is OIDC on Vercel and an API key locally. The README documents the API key only for local development, so deploying anywhere other than Vercel is not covered.
- Web search uses each provider's built-in tool, so citations and result shapes differ by model, while the UI shows one sources drawer for all of them. The README does not say what happens with a model that has no native search.
- The directory listing is truncated and the README mentions no tests. I could not confirm a test setup for the route validation, the tool wiring or the part components, so treat that as unverified.