No description
Find a file
2025-04-08 21:37:03 -07:00
.github/workflows chore: use explicit pnpm 9 version for reproducibility (#873) 2025-03-18 13:43:43 -07:00
.vscode feat: update providers (#881) 2025-03-20 14:10:45 -07:00
app chore: correct error message typo (#918) 2025-04-08 21:37:03 -07:00
artifacts feat: add tests (#843) 2025-03-04 17:25:46 -08:00
components chore: correct error message typo (#918) 2025-04-08 21:37:03 -07:00
docs feat: use xai image model and update deploy link (#882) 2025-03-21 21:18:56 -07:00
hooks feat: paginate chat history (#903) 2025-04-03 00:28:36 -07:00
lib feat: paginate chat history (#903) 2025-04-03 00:28:36 -07:00
public/images feat: reference geist from google fonts (#876) 2025-03-18 13:57:06 -07:00
tests refactor: replace message.content with message.parts (#868) 2025-03-16 18:42:29 -07:00
.env.example feat: use xai image model and update deploy link (#882) 2025-03-21 21:18:56 -07:00
.eslintrc.json Remove import order 2024-11-15 11:09:17 -05:00
.gitignore feat (vscode): add suggested vscode extension and settings configs 2025-03-17 16:51:19 -07:00
biome.jsonc feat: add inline block document previews (#637) 2024-12-19 17:05:04 +05:30
components.json Use default shadcn styles and tweak prompt (#439) 2024-10-11 23:36:51 +05:30
drizzle.config.ts Switch to vercel's biome setup (#543) 2024-11-15 13:00:15 -05:00
LICENSE Clean up deps 2024-08-24 23:23:37 -05:00
middleware.ts Run prettier 2024-11-14 12:16:05 -05:00
next-env.d.ts chore: bump versions (#845) 2025-03-04 18:00:14 -08:00
next.config.ts feat: support image outputs during code execution (#674) 2025-01-08 00:00:21 +05:30
package.json chore: bump package versions (#904) 2025-04-03 00:38:33 -07:00
playwright.config.ts refactor: replace message.content with message.parts (#868) 2025-03-16 18:42:29 -07:00
pnpm-lock.yaml chore: bump package versions (#904) 2025-04-03 00:38:33 -07:00
postcss.config.mjs feat: add sheet block (#743) 2025-02-03 11:03:48 +03:00
README.md feat: use xai image model and update deploy link (#882) 2025-03-21 21:18:56 -07:00
tailwind.config.ts feat: reference geist from google fonts (#876) 2025-03-18 13:57:06 -07:00
tsconfig.json Refactor drizzle and db folder 2024-11-15 10:13:21 -05:00

Next.js 14 and App Router-ready AI chatbot.

Next.js AI Chatbot

An Open-Source AI Chatbot Template Built With Next.js and the AI SDK by Vercel.

Features · Model Providers · Deploy Your Own · Running locally


Features

  • Next.js App Router
    • Advanced routing for seamless navigation and performance
    • React Server Components (RSCs) and Server Actions for server-side rendering and increased performance
  • AI SDK
    • Unified API for generating text, structured objects, and tool calls with LLMs
    • Hooks for building dynamic chat and generative user interfaces
    • Supports xAI (default), OpenAI, Fireworks, and other model providers
  • shadcn/ui
  • Data Persistence
  • NextAuth.js
    • Simple and secure authentication

Model Providers

This template ships with xAI grok-2-1212 as the default chat model. However, with the AI SDK, you can switch LLM providers to OpenAI, Anthropic, Cohere, and many more with just a few lines of code.

Deploy Your Own

You can deploy your own version of the Next.js AI Chatbot to Vercel with one click:

Deploy with Vercel

Running locally

You will need to use the environment variables defined in .env.example to run Next.js AI Chatbot. It's recommended you use Vercel Environment Variables for this, but a .env file is all that is necessary.

Note: You should not commit your .env file or it will expose secrets that will allow others to control access to your various AI and authentication provider accounts.

  1. Install Vercel CLI: npm i -g vercel
  2. Link local instance with Vercel and GitHub accounts (creates .vercel directory): vercel link
  3. Download your environment variables: vercel env pull
pnpm install
pnpm dev

Your app template should now be running on localhost:3000.