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