Next.js + Convex AI Chat Starter
A real-time AI chat application built with Next.js, Convex, Tailwind CSS, and OpenAI.
🛠 Tech Stack
- Next.js
- Convex
- Tailwind CSS
- OpenAI API
- Vercel AI SDK (
ai
package) - react-textarea-autosize
- TypeScript
✨ Features
- Real-time chat interface using Convex and the Vercel AI SDK (
useChat
) for data synchronization and state management - AI responses powered by OpenAI, generated asynchronously in the background using Convex Actions to keep the UI responsive (supports multiple models)
- Persistent storage of conversation history and chat sessions in the Convex database
- Ability to clear the current chat session
- Management of AI model preferences
- Chat message archival functionality
- User input handling with automatic textarea resizing
- Responsive UI styled with Tailwind CSS and Shadcn/ui components
- Toast notifications for user feedback