What Gets Scaffolded
When you use this plugin, Capx Compose generates:Files Created
- Chat interface page at
/vercel-ai
- Complete chat UI with streaming - API route at
/api/chat
- Backend endpoint for AI responses - README with setup instructions and customization guide
Dependencies Added
ai
- Vercel AI SDK for streaming@ai-sdk/openai
- OpenAI provider- UI utilities (lucide-react, class-variance-authority)
- Next.js 14, React 18, TypeScript
Features Included
- ✅ Real-time streaming chat interface
- ✅ OpenAI GPT-4o integration
- ✅ Error handling and loading states
- ✅ TypeScript types
- ✅ Production-ready API route
Quick Start
http://localhost:3000/vercel-ai
to see the chat interface.
Environment Variables
Customization
After scaffolding, you can:- Change the AI model in
/api/chat
- Modify the chat UI in
/vercel-ai
- Add authentication and rate limiting
- Integrate with databases for message persistence
Compatible Plugins
Works well with:supabase
- Add user auth and message storagefirebase
- Alternative backend with real-time syncvercel-kv
- Add caching for responses