{"id":51192791,"url":"https://github.com/pushpakrai/conversaflow-ai-chatbot","last_synced_at":"2026-06-27T17:02:15.500Z","repository":{"id":363656463,"uuid":"1264316705","full_name":"pushpakrai/ConversaFlow-AI-ChatBot","owner":"pushpakrai","description":"ConversaFlowAI is a scalable, user-friendly, production-ready chatbot offering real-time, context-aware conversations. Features include a floating chat widget, visitor onboarding, admin analytics, and Groq API integration for ultra-fast AI responses.","archived":false,"fork":false,"pushed_at":"2026-06-09T19:32:11.000Z","size":206,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-09T21:17:30.930Z","etag":null,"topics":["ai-chatbot","ainative","api-rest","chatbot","generative-ai","grok-api","mongodb","nodejs","reactjs"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pushpakrai.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-06-09T19:15:48.000Z","updated_at":"2026-06-09T19:36:12.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/pushpakrai/ConversaFlow-AI-ChatBot","commit_stats":null,"previous_names":["pushpakrai/conversaflow-ai-chatbot"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/pushpakrai/ConversaFlow-AI-ChatBot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pushpakrai%2FConversaFlow-AI-ChatBot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pushpakrai%2FConversaFlow-AI-ChatBot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pushpakrai%2FConversaFlow-AI-ChatBot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pushpakrai%2FConversaFlow-AI-ChatBot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pushpakrai","download_url":"https://codeload.github.com/pushpakrai/ConversaFlow-AI-ChatBot/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pushpakrai%2FConversaFlow-AI-ChatBot/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34860919,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-27T02:00:06.362Z","response_time":126,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai-chatbot","ainative","api-rest","chatbot","generative-ai","grok-api","mongodb","nodejs","reactjs"],"created_at":"2026-06-27T17:02:14.653Z","updated_at":"2026-06-27T17:02:15.495Z","avatar_url":"https://github.com/pushpakrai.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n🤖 ConversaFlow AI\n\n---\n**A modern, AI-powered chatbot built with the MERN stack, designed for seamless integration and intelligent conversations.**\n\nChatBot-AI is a **scalable, beginner-friendly**, and **production-ready** application that enables **real-time, context-aware conversations** with users. It features a **floating chat widget**, **visitor onboarding**, **admin analytics**, and **Groq API integration** for ultra-fast AI responses. Built with **simplicity and performance** in mind, it uses **React.js, Node.js, Express.js, and MongoDB** to deliver a robust and responsive experience.\n\n---\n\n## 🌟 **Why ChatBot-AI?**\n✅ **Easy Integration**: Embed the chatbot widget with a **single line of code**.\n✅ **Personalized Interactions**: Collect visitor details (Name, Profession, Goal) to **tailor AI responses**.\n✅ **Admin Dashboard**: Monitor **metrics, visitor counts, and chat transcripts** in a clean, read-only portal.\n✅ **Responsive Design**: Works **flawlessly on desktop and mobile** devices.\n✅ **Production-Ready**: Deploy with confidence using **Render, Heroku, AWS, or any cloud provider**.\n✅ **Beginner-Friendly**: Clean, **well-documented code** with **no overengineering**.\n\n---\n\n## ✨ **Key Features**\n\n### 🔌 **Floating Chatbot Widget**\n- Embeddable via a **single `\u003cscript\u003e` tag**.\n- Appears at the **bottom-right** of any webpage.\n- **Customizable** size, color, and behavior.\n\n### 🧑‍💻 **Visitor Onboarding**\n- Collects **Name, Profession, and Goal** on first interaction.\n- Uses this data to **personalize AI responses** dynamically.\n\n### 🧠 **Smart Context System**\n- Prefixes user inputs with **visitor details** for **context-aware conversations**.\n- Powered by the **Groq API** for **ultra-fast LLM responses**.\n\n### 📊 **Admin Dashboard**\n- **Read-only portal** for viewing:\n  - Total visitors, conversations, and messages.\n  - **Searchable chat transcripts**.\n  - **Profession breakdown** of visitors.\n\n### 🔒 **Password Protection**\n- Simple `window.prompt` password gate for `/admin` access.\n- Default password: `varta123` (customizable in `.env`).\n\n### 🎨 **Responsive UI**\n- Built with **Bootstrap 5** for a **sleek, fast, and mobile-friendly** experience.\n- **Desktop**: 400px × 600px popup with rounded corners.\n- **Mobile**: Scales to **100% width/height** for screens \u003c 480px.\n\n### ☁️ **Production-Ready Deployment**\n- Compiles **React frontend** into the **Express backend** for single-port deployment.\n- Compatible with **Render, Heroku, AWS, and other cloud providers**.\n\n---\n\n## 📁 **Project Structure**\n\n```text\nChatBot-AI/\n├── frontend/                     # React SPA (Vite, Bootstrap, Custom Router)\n│   ├── src/\n│   │   ├── components/\n│   │   │   ├── AdminDashboard.jsx # Admin stats \u0026 chat viewer\n│   │   │   ├── WidgetChat.jsx     # Onboarding form \u0026 Chat UI\n│   │   │   └── ChatWindow.jsx     # Main chat interface\n│   │   ├── App.jsx                # Custom routing layer\n│   │   ├── index.css              # Custom CSS overrides\n│   │   └── main.jsx\n│   └── index.html\n├── server/                       # Express API Backend \u0026 MongoDB Schemas\n│   ├── models/                   # Mongoose schemas\n│   │   ├── Visitor.js\n│   │   ├── Conversation.js\n│   │   └── Message.js\n│   ├── public/                   # Static assets\n│   │   └── widget.js             # Loader script for client websites\n│   ├── config/                   # Configuration files\n│   │   └── env.js                # Environment variables\n│   ├── routes/                   # API routes\n│   │   ├── widgetRoutes.js       # Widget-related endpoints\n│   │   └── adminRoutes.js        # Admin dashboard endpoints\n│   └── server.js                 # Main server router \u0026 DB connector\n├── index.html                    # Demo website embedding the widget\n└── package.json                  # Root orchestration runner\n```\n\n---\n\n## 🚀 **Quick Start Guide**\n\n### **Prerequisites**\n- **Node.js** (v16+)\n- **MongoDB** (local or Atlas URI)\n- **Groq API Key** ([Get one here](https://console.groq.com/))\n\n---\n\n### **1. Clone the Repository**\n```bash\ngit clone https://github.com/pushpakrai/ChatBot-AI-.git\ncd ChatBot-AI-\n```\n\n---\n\n### **2. Configure Environment Variables**\nNavigate to the `server/` directory, copy `.env.example` to `.env`, and update the following:\n```bash\nPORT=5000\nMONGO_URI=mongodb://127.0.0.1:27017/chatbot_ai\nGROQ_API_KEY=your_groq_api_key_here\nADMIN_PASSWORD=your_custom_password\n```\n\n---\n### **3. Install Dependencies**\nRun the following command in the **root folder** to install dependencies for all directories:\n```bash\nnpm run install-all\n```\n\n---\n### **4. Start Development Servers**\n```bash\nnpm run dev\n```\n- **Frontend Dev Hub**: [http://localhost:5173](http://localhost:5173)\n- **Admin Portal**: [http://localhost:5173/admin](http://localhost:5173/admin)\n- **Express API Server**: [http://localhost:5000](http://localhost:5000)\n\n---\n### **5. Test the Widget**\nOpen the root `index.html` file in any browser. The **floating chat button** will appear at the bottom-right corner!\n\n---\n\n## 🔌 **Widget Embed Guide**\n\n### **How to Embed on Any Website**\nInsert the following script tag **anywhere inside the `\u003cbody\u003e`** of your HTML files:\n```html\n\u003cscript src=\"http://localhost:5000/widget.js\"\u003e\u003c/script\u003e\n```\n**Note**: Replace `http://localhost:5000` with your **production backend server domain** once deployed.\n\n---\n### **Sizing and Responsiveness**\n| Device       | Dimensions               | Behavior                          |\n|--------------|--------------------------|-----------------------------------|\n| **Desktop**  | 400px × 600px            | Popup window with rounded corners |\n| **Mobile**   | 100% width/height        | Full-screen chat interface        |\n\n---\n\n## 📡 **API Endpoint Reference**\n\nAll JSON payloads are sent using the `Content-Type: application/json` header.\n\n---\n### **1. Onboard Visitor**\n**Endpoint**: `POST /api/widget/onboard`\n**Description**: Creates a new visitor profile and initializes an active conversation session.\n\n**Request Body**:\n```json\n{\n  \"name\": \"Jane Doe\",\n  \"profession\": \"Founder\",\n  \"goal\": \"Pricing check\"\n}\n```\n\n**Response (201 Created)**:\n```json\n{\n  \"visitorId\": \"65f3a09e...\",\n  \"conversationId\": \"65f3a09f...\",\n  \"visitorName\": \"Jane Doe\"\n}\n```\n\n---\n### **2. Fetch History**\n**Endpoint**: `GET /api/widget/history/:visitorId`\n**Description**: Retrieves previous conversations and message logs to resume a session.\n\n**Response (200 OK)**:\n```json\n{\n  \"visitorName\": \"Jane Doe\",\n  \"conversationId\": \"65f3a09f...\",\n  \"messages\": [\n    { \"sender\": \"ai\", \"text\": \"Hi Jane! How can I help you?\", \"createdAt\": \"2026-06-07T10:00:00Z\" }\n  ]\n}\n```\n\n---\n### **3. Send Message**\n**Endpoint**: `POST /api/widget/chat`\n**Description**: Submits a message to the assistant. The backend automatically prefixes the system instructions with the visitor's profile details.\n\n**Request Body**:\n```json\n{\n  \"visitorId\": \"65f3a09e...\",\n  \"conversationId\": \"65f3a09f...\",\n  \"text\": \"Tell me about your pricing.\"\n}\n```\n\n**Response (200 OK)**:\n```json\n{\n  \"reply\": \"Hi Jane! Our pricing starts at $10/month. Would you like a detailed breakdown?\"\n}\n```\n\n---\n### **4. Admin Analytics**\n**Endpoint**: `GET /api/analytics`\n**Description**: Aggregates statistical totals for display on the Admin dashboard.\n\n**Response (200 OK)**:\n```json\n{\n  \"totalVisitors\": 12,\n  \"totalConversations\": 14,\n  \"totalMessages\": 82,\n  \"professionBreakdown\": [\n    { \"_id\": \"Founder\", \"count\": 6 },\n    { \"_id\": \"Developer\", \"count\": 4 }\n  ]\n}\n```\n\n---\n### **5. Search Conversations**\n**Endpoint**: `GET /api/admin/search?q=query`\n**Description**: Search for conversations by visitor name, profession, or goal.\n\n**Response (200 OK)**:\n```json\n{\n  \"results\": [\n    {\n      \"visitorId\": \"65f3a09e...\",\n      \"visitorName\": \"Jane Doe\",\n      \"profession\": \"Founder\",\n      \"goal\": \"Pricing check\",\n      \"messages\": [...]\n    }\n  ]\n}\n```\n---\n## 🛠️ **Tech Stack**\n\n| Category       | Technologies          |\n|----------------|-----------------------|\n| **Frontend**   | React.js, Vite, Bootstrap 5 |\n| **Backend**    | Node.js, Express.js   |\n| **Database**   | MongoDB, Mongoose     |\n| **AI**         | Groq API              |\n| **Styling**    | Custom CSS, Bootstrap |\n| **Deployment** | Render, Heroku, AWS   |\n\n---\n## 💡 **Tips \u0026 Best Practices**\n- **Security**: Always **customize** the `ADMIN_PASSWORD` in `.env` for production.\n- **Performance**: Use **Groq API** for **ultra-fast LLM responses**.\n- **Scalability**: Deploy on **Render, Heroku, or AWS** for seamless scaling.\n- **Customization**: Modify the **Bootstrap theme** or **CSS** to match your brand.\n- **Monitoring**: Use tools like **PM2** or **Docker** for process management.\n\n---\n## 📜 **License**\nThis project is **open-source** and available under the **[MIT License](LICENSE)**.\n\n---\n## 🤝 **Contributing**\nContributions are **welcome**! Please:\n1. Fork the repository.\n2. Create a **feature branch** (`git checkout -b feature/your-feature`).\n3. Commit your changes (`git commit -m \"Add your feature\"`).\n4. Push to the branch (`git push origin feature/your-feature`).\n5. Open a **Pull Request**.\n\n---\n## 📧 **Support**\nFor issues or questions:\n- Open an **issue** on [GitHub](https://github.com/pushpakrai/ChatBot-AI-/issues).\n- Contact the maintainers at **pushpakrai@example.com**.\n\n---\n## 📚 **Additional Resources**\n- [Groq API Documentation](https://console.groq.com/docs)\n- [MongoDB Atlas Setup](https://www.mongodb.com/atlas/database)\n- [React.js Documentation](https://react.dev/)\n- [Express.js Documentation](https://expressjs.com/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpushpakrai%2Fconversaflow-ai-chatbot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpushpakrai%2Fconversaflow-ai-chatbot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpushpakrai%2Fconversaflow-ai-chatbot/lists"}