An open-source AI chatbot app built with Next.js, the Vercel AI SDK, Google Gemini, and MongoDB.
- Next.js App Router
- React Server Components (RSCs), Suspense, and Server Actions
- Vercel AI SDK for streaming chat UI
- Support for Google Gemini (default), Anthropic, Cohere, Hugging Face, or custom AI chat models and/or LangChain
- shadcn/ui
- Styling with Tailwind CSS
- Radix UI for headless component primitives
- Icons from Phosphor Icons
- Chat History with MongoDB
- Auth0 for authentication
This template ships with Google Gemini gemini-1.5-flash-latest
as the default. However, thanks to the Vercel AI SDK, you can switch LLM providers to Anthropic, Cohere, Hugging Face, or using LangChain with just a few lines of code.
You will need to use the environment variables defined in .env.example
to run Next.js AI Chatbot.
Note: You should not commit your
.env
file or it will expose secrets that will allow others to control access to your various OpenAI and authentication provider accounts.
pnpm install
pnpm dev
Your app template should now be running on localhost:3000.