ai-chatbot

majiayu000's avatarfrom majiayu000

Full-featured AI chatbot with Next.js 15, Auth.js, Drizzle ORM, and multi-model support.

⭐5stars🔀1forks📁View on GitHub🕐Updated Jan 11, 2026

When & Why to Use This Skill

This Claude skill provides a production-ready, full-stack AI chatbot template designed to accelerate the development of modern AI applications. Built with Next.js 15, React 19, and the Vercel AI SDK, it offers a hackable architecture that includes built-in authentication (Auth.js), database management (Drizzle ORM), and multi-model support. It solves the complexity of setting up a secure, scalable environment for LLM-powered tools, allowing developers to focus on custom logic rather than infrastructure.

Use Cases

  • 1. Rapid AI Prototyping: Quickly deploy a functional AI chat interface to validate product ideas or test specific prompts with real users.
  • 2. Custom SaaS Development: Use as a foundational boilerplate for building commercial AI platforms with integrated user accounts and persistent chat history.
  • 3. Multi-Model Benchmarking: Easily integrate and switch between different LLM providers like OpenAI and Anthropic to compare output quality and performance within a single UI.
  • 4. Enterprise Internal Assistants: Create secure, private AI tools for internal teams with pre-configured PostgreSQL database support and file storage capabilities.
nameai-chatbot
descriptionFull-featured AI chatbot with Next.js 15, Auth.js, Drizzle ORM, and multi-model support.

AI Chatbot

A full-featured, hackable AI chatbot with authentication, file storage, and multi-model support.

Tech Stack

  • Framework: Next.js 15
  • React: React 19
  • AI: AI SDK, Vercel AI Gateway
  • Auth: Auth.js
  • ORM: Drizzle
  • Database: PostgreSQL (Neon, Supabase, or Railway)
  • Styling: Tailwind CSS, shadcn/ui
  • Package Manager: pnpm
  • Dev Port: 3000

Setup

1. Clone the Template

git clone --depth 1 https://github.com/Eng0AI/ai-chatbot-template.git .

If the directory is not empty:

git clone --depth 1 https://github.com/Eng0AI/ai-chatbot-template.git _temp_template
mv _temp_template/* _temp_template/.* . 2>/dev/null || true
rm -rf _temp_template

2. Remove Git History (Optional)

rm -rf .git
git init

3. Install Dependencies

pnpm install

4. Setup Environment Variables

cp .env.example .env

Required variables:

  • POSTGRES_URL - PostgreSQL connection string
  • AUTH_SECRET - Generate with openssl rand -base64 32
  • OPENAI_API_KEY or ANTHROPIC_API_KEY - LLM provider key

5. Run Database Migrations

pnpm db:migrate

Build

pnpm build

Or run build without migration (if already migrated):

next build

Deploy

# Pull project settings
vercel pull --yes -t $VERCEL_TOKEN

# Push env vars (first time only)
while IFS='=' read -r key value; do
  [[ "$key" =~ ^#.*$ || -z "$key" || -z "$value" ]] && continue
  for env in production preview development; do
    printf '%s' "$value" | vercel env add "$key" $env -t $VERCEL_TOKEN
  done
done < .env

# Build and deploy
vercel build --prod -t $VERCEL_TOKEN
vercel deploy --prebuilt --prod --yes -t $VERCEL_TOKEN

Netlify

# Import env vars (first time only)
netlify env:import .env

# Deploy
netlify deploy --prod

Critical Notes

  • Database Required: Must have PostgreSQL database set up before building
  • Migration Required: Run pnpm db:migrate before first build
  • Auth Secret: Generate a secure random secret for AUTH_SECRET
  • Never run pnpm dev in VM environment