22nd of 12 in Chat apps

chatbot

Next.js chat template with Auth.js, Postgres history and AI Gateway models

Stars
21k
License
Apache-2.0
Last commit
Jul 2026
Language
TypeScript

Overview

Clone it and you get a Next.js App Router chat app on the AI SDK with Auth.js login, chat history in Neon Postgres through Drizzle migrations, file uploads to Vercel Blob and a streaming UI on shadcn/ui. Models route through Vercel AI Gateway; Mistral, Moonshot, DeepSeek, OpenAI and xAI are preconfigured in lib/ai/models.ts. For teams starting a chat product on Vercel who want auth and persistence wired on day one.

Who it is for: Teams starting a chat product on Next.js and Vercel

Strengths

  • Auth.js, Postgres chat history and Drizzle migrations wired out of the box
  • Live demo plus a separate docs site
  • Per-model provider routing in lib/ai/models.ts; swapping vendors is a small edit
  • Tests included

Weaknesses

  • Defaults to Vercel services: AI Gateway, Neon Postgres, Vercel Blob
  • Off Vercel you must set AI_GATEWAY_API_KEY and replace Blob storage
  • No Docker or compose files

What it needs

  • TypeScript, ai-gateway, ai-sdk, openai, mistral
  • Needs postgres, vercel-blob, ai-gateway-api-key
  • GitHub template
  • env example file
  • sign-in: Auth.js

Also in Chat apps

See all 12
Also in Chat apps
RankProjectScore
1langchain-nextjs-templateNext.js routes for LangChain.js chat, agents, structured output and RAG Live demo ↗ (opens in a new tab)2.5k stars, MIT63 out of 100
3chatNuxt UI chat template with GitHub login, SQLite history and AI Gateway Live demo ↗ (opens in a new tab)376 stars, MIT52 out of 100
#4gemini-chatbotNext.js chatbot template defaulting to Gemini with NextAuth and Postgres Live demo ↗ (opens in a new tab)1.4k stars, Apache-2.050 out of 100
#5claude-quickstartsIndependent Claude API starter projects, one folder per pattern17.9k stars, MIT48 out of 100
#6twitterbioSingle-form Next.js text generator streaming from Together AI Live demo ↗ (opens in a new tab)1.8k stars, MIT45 out of 100