Create and deploy intelligent AI chatbots from your documents using RAG (Retrieval Augmented Generation) technology.
- 📄 Document Upload: Support for PDF, DOCX, and TXT files
- 🤖 AI Training: Automatic document processing and vectorization
- 💬 Smart Chat: Intelligent responses based on your content
- 🌐 Easy Embed: One-line script to embed on any website
- 📊 Analytics: Track usage and performance
- 🔒 Secure: User isolation and data privacy
- Frontend: Next.js 14, TypeScript, Tailwind CSS
- Backend: Node.js, Express, TypeScript
- Database: MongoDB (user data), PineCone (vector database)
- Queue: Redis + BullMQ
- AI: OpenAI API (GPT models + embeddings)
- Deployment: Docker Compose
- Docker and Docker Compose
- OpenAI API key
- Node.js 18+ (for development)
git clone <repository-url>
cd AI-chatbot-generatorcp env.example .envEdit .env and add your OpenAI API key:
OPENAI_API_KEY=your_openai_api_key_here
JWT_SECRET=your_jwt_secret_heredocker compose up --buildThis will start:
- Frontend: http://localhost:3000
- Backend API: http://localhost:8000
- MongoDB: localhost:27017
- Redis: localhost:6379
Open http://localhost:3000 in your browser to start creating AI agents!
-
Create Agent: Click "Create New AI Agent" and configure:
- Agent name and personality
- AI model (GPT-3.5, GPT-4, etc.)
- Temperature (creativity level)
- System prompt
-
Upload Documents:
- Drag & drop PDF, DOCX, or TXT files
- Maximum 10 files, 5MB each, 50MB total
- Automatic validation and progress tracking
-
Training:
- Documents are automatically processed
- Text is chunked and vectorized
- Stored in Pinecone for fast retrieval
-
Test in Playground:
- Chat with your AI agent
- Test responses based on uploaded documents
- Adjust settings in real-time
-
Deploy:
- Generate embed code
- Add to any website with one line
- Track usage and conversations
- Copy the generated script tag:
<script src="http://localhost:8000/embed/agent_id.js"></script>-
Add to your website's HTML
-
The chatbot will appear as a floating widget
cd frontend
npm install
npm run devcd backend
npm install
npm run dev- MongoDB: Use MongoDB Compass or mongo shell
- Redis: Use redis-cli or RedisInsight
POST /api/agents- Create agentGET /api/agents- List agentsGET /api/agents/:id- Get agent detailsPUT /api/agents/:id- Update agentDELETE /api/agents/:id- Delete agent
POST /api/agents/:id/files- Upload filesGET /api/agents/:id/files- List filesDELETE /api/agents/:id/files/:fileId- Delete file
POST /api/agents/:id/train- Start trainingGET /api/agents/:id/training-status- Get training status
POST /api/chat/:agentId- Send messageGET /api/chat/:agentId/history- Get chat history
GET /api/embed/:agentId.js- Get embed scriptPOST /api/embed/session- Create embed session
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ Frontend │ │ Backend │ │ Databases │
│ (Next.js) │◄──►│ (Node.js) │◄──►│ │
│ │ │ │ │ ┌─────────────┐ │
│ - Agent Mgmt │ │ - API Routes │ │ │ MongoDB │ │
│ - File Upload │ │ - File Process │ │ │ (Users, │ │
│ - Chat UI │ │ - AI Training │ │ │ Agents, │ │
│ - Embed Widget │ │ - RAG Pipeline │ │ │ Sessions) │ │
└─────────────────┘ └─────────────────┘ │ └─────────────┘ │
│ ┌─────────────┐ │
│ │ Pinecone │ │
│ │ (Vectors) │ │
│ └─────────────┘ │
│ ┌─────────────┐ │
│ │ Redis │ │
│ │ (Job Queue) │ │
│ └─────────────┘ │
└─────────────────┘
- Document Upload: Files → Backend → MongoDB (metadata) + Disk (content)
- Training: Parse → Chunk → Embed → Pinecone (vectors)
- Chat: Query → PineCone Search → Context → LLM → Response
- Embed: Script → iframe → Backend API → Chat Interface
- JWT authentication for API access
- User data isolation
- File type and size validation
- Rate limiting on API endpoints
- CORS configuration for embed widgets
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
MIT License - see LICENSE file for details
For issues and questions:
- Create an issue on GitHub
- Check the documentation
- Review the API reference
Built with ❤️ using WEAM