{"id":28221635,"url":"https://github.com/201harsh/ai-cb","last_synced_at":"2026-03-14T05:33:10.672Z","repository":{"id":289986155,"uuid":"973034516","full_name":"201Harsh/AI-CB","owner":"201Harsh","description":"EmoAI ChatBot (MERN + EndGaming AI)","archived":false,"fork":false,"pushed_at":"2025-05-07T16:57:22.000Z","size":125439,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-10T16:42:59.710Z","etag":null,"topics":["ai","ai-chatbot"],"latest_commit_sha":null,"homepage":"https://emoaichatbot.onrender.com/","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/201Harsh.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}},"created_at":"2025-04-26T05:43:41.000Z","updated_at":"2025-05-18T06:11:58.000Z","dependencies_parsed_at":"2025-05-03T18:27:42.403Z","dependency_job_id":null,"html_url":"https://github.com/201Harsh/AI-CB","commit_stats":null,"previous_names":["201harsh/ai-cb"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/201Harsh/AI-CB","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/201Harsh%2FAI-CB","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/201Harsh%2FAI-CB/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/201Harsh%2FAI-CB/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/201Harsh%2FAI-CB/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/201Harsh","download_url":"https://codeload.github.com/201Harsh/AI-CB/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/201Harsh%2FAI-CB/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261487561,"owners_count":23166112,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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","ai-chatbot"],"created_at":"2025-05-18T06:08:49.696Z","updated_at":"2026-03-14T05:33:10.664Z","avatar_url":"https://github.com/201Harsh.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🤖 EmoAI ChatBot (MERN + EndGaming AI) [![MIT License](https://img.shields.io/badge/License-MIT-green.svg)](https://choosealicense.com/licenses/mit/)\n\nAn AI-powered chatbot web application built using the MERN stack (MongoDB, Express.js, React.js, Node.js) integrated with the Endgaming AI API. Users can register, log in, and interact with an intelligent chatbot. The app also includes a credit-based system to limit API usage.\n\n---\n\n![Project Banner](https://img.shields.io/badge/BANNER-COMING_SOON-blue?style=for-the-badge\u0026logo=react\u0026logoColor=white\u0026color=61DAFB\u0026labelColor=20232A)\n\nAn AI-powered chatbot web application with emotional intelligence, built using the MERN stack. Features user authentication, credit-based API access, and dynamic response adaptation based on user sentiment.\n\n[![React Version](https://img.shields.io/badge/React-18.2.0-blue)](https://react.dev/)\n[![Node Version](https://img.shields.io/badge/Node-18.16.0-green)](https://nodejs.org/)\n[![MongoDB](https://img.shields.io/badge/MongoDB-6.0.9-green)](https://www.mongodb.com/)\n\n---\n\n## 🎛️ Table of Contents\n\n- [Key Features](#-key-features)\n- [Tech Stack](#-tech-stack)\n- [System Architecture](#-system-architecture)\n- [Installation](#-installation)\n- [Configuration](#-configuration)\n- [API Integration](#-api-integration)\n- [Credit System](#-credit-system)\n- [Security](#-security)\n- [Screenshots](#-screenshots)\n- [Roadmap](#-roadmap)\n- [Contributing](#-contributing)\n- [License](#-license)\n- [Support](#-support)\n\n---\n\n## 🌟 Key Features\n\n| Feature                   | Description                                                 |\n| ------------------------- | ----------------------------------------------------------- |\n| 🧠 **AI-Powered Chat**    | Integration with EndGaming AI for intelligent conversations |\n| 🔒 **JWT Authentication** | Secure user authentication with token refresh               |\n| 💳 **Credit System**      | Usage-based credit management (1 credit/request)            |\n| 🎭 **Emotion Adaptation** | Dynamic responses based on detected user mood               |\n| 📊 **User Analytics**     | Track usage patterns and credit consumption                 |\n| ⚡ **Real-Time UI**       | Interactive chat interface with React                       |\n\n### Emotion Response Matrix\n\n| User Emotion | Response Style           | Example Response                      |\n| ------------ | ------------------------ | ------------------------------------- |\n| 😠 Angry     | Calm + Solution-Oriented | \"Let's work through this together...\" |\n| 😔 Sad       | Empathetic + Encouraging | \"I'm here to listen...\"               |\n| 😃 Happy     | Enthusiastic + Playful   | \"That's fantastic! 🎉...\"             |\n\n## 🌈 Emotional Response System\n\nMood Adaptation Matrix\nUser Emotion AI Response Pattern Sample Response\n\n- 😠 Angry Calm + Solution-Oriented \"Let's work through this...\"\n- 😔 Sad Empathetic + Encouraging \"I'm here for you...\"\n- 😃 Happy Enthusiastic + Playful \"That's awesome! 🎉...\"\n\n## Visual\n\n```mermaid\ngraph TB\n    A[🧠 AI-Powered Chat] --\u003e A1[`Integration with EndGaming AI`]\n    B[🔒 JWT Authentication] --\u003e B1[`Secure login with token refresh`]\n    C[💳 Credit System] --\u003e C1[`1 credit per request`]\n    D[🎭 Emotion Adaptation] --\u003e D1[`Dynamic mood-based replies`]\n    E[📊 User Analytics] --\u003e E1[`Track usage \u0026 credits`]\n    F[⚡ Real-Time UI] --\u003e F1[`React-based live chat`]\n\n    subgraph Emotion_Response_Matrix\n        EM1[😠 Angry] --\u003e ER1[`Calm + Solution-Oriented: Let's work through this...`]\n        EM2[😔 Sad] --\u003e ER2[`Empathetic + Encouraging: I'm here to listen...`]\n        EM3[😃 Happy] --\u003e ER3[`Enthusiastic + Playful: That's fantastic! 🎉...`]\n    end\n\n    D --\u003e Emotion_Response_Matrix\n\n```\n\n---\n\n## 🛠 Tech Stack\n\n**Frontend**\n\n![React](https://img.shields.io/badge/-React-61DAFB?logo=react\u0026logoColor=white)\n\n![Tailwind](https://img.shields.io/badge/-Tailwind_CSS-06B6D4?logo=tailwind-css\u0026logoColor=white)\n\n![Axios](https://img.shields.io/badge/-Axios-5A29E4?logo=axios\u0026logoColor=white)\n\n**Backend**\n\n![Node.js](https://img.shields.io/badge/-Node.js-339933?logo=node-dot-js\u0026logoColor=white)\n\n![Express](https://img.shields.io/badge/-Express-000000?logo=express\u0026logoColor=white)\n\n![MongoDB](https://img.shields.io/badge/-MongoDB-47A248?logo=mongodb\u0026logoColor=white)\n\n**Security**\n\n![JWT](https://img.shields.io/badge/-JWT-000000?logo=json-web-tokens\u0026logoColor=white)\n\n![Bcrypt](https://img.shields.io/badge/-Bcrypt-0042AA?logo=bcrypt\u0026logoColor=white)\n\n---\n\n# 🧠 Core Architecture\n\n## 🏗️ System Architecture\n\n```mermaid\nflowchart TD\n    A[Client] --\u003e|HTTPS| B[API Gateway]\n    B --\u003e C[Auth Service]\n    B --\u003e D[Chat Service]\n    B --\u003e E[Credit Service]\n    C --\u003e F[(MongoDB Users)]\n    D --\u003e G[AI Provider]\n    E --\u003e H[(MongoDB Credits)]\n```\n\n---\n\n# 🚀 Getting Started\n\n## 💫 Installation\n\n**Prerequisites**\n\n- Node.js v18+\n\n- MongoDB v6+\n\n- EndGaming API Key\n\n### 1. Clone the Repository\n\n```bash\ngit clone https://github.com/201Harsh/AI-CB.git\ncd ai-cb\n```\n\n### 2. Setup Backend\n\n```bash\ncd Backend\nnpm install\n```\n\n### 3. Setup Frontend\n\n```bash\ncd Frontend\nnpm install\nnpm run dev\n```\n\n---\n\n# ✨ Usage\n\n- Register a new user\n\n- Login to your account\n\n- Each user gets initial free credits (configurable)\n\n- Ask a question to the chatbot\n\n- Response is generated via AI API\n\n- Each query consumes credits\n\n---\n\n# ✨ API Usage:\n\n## EndGaming AI API (or you can use other AI API)\n\n### 🔧 Configuration\n\n### 📡 API Integration\n\n```javascript\n// Example API call to EndGaming AI\napp.post(\"/api/chat\", async (req, res) =\u003e {\n  const { prompt, emotion } = req.body;\n\n  const response = await axios.post(\"https://api.endgaming.ai/v4/chat\", {\n    prompt,\n    emotion,\n    apiKey: process.env.ENDG_API_KEY,\n  });\n  res.json(response.data);\n});\n```\n\n---\n\n# 📦 API Integration\n\n#### Using Google Gemini or a similar Google AI API:\n\n- Backend makes POST requests to the API with the user’s prompt\n\n- Response is returned to the frontend\n\n- Credit is deducted per request\n\n---\n\n# 💳 Credit System\n\n- New users receive 10 free credits\n- Credit deduction workflow:\n\n```mermaid\nsequenceDiagram\n  User-\u003e\u003e+Backend: Send Message\n  Backend-\u003e\u003eDatabase: Check Credits\n  alt Credits \u003e 0\n    Database-\u003e\u003eBackend: Credit Available\n    Backend-\u003e\u003eAI API: Forward Request\n    AI API-\u003e\u003eBackend: Return Response\n    Backend-\u003e\u003eDatabase: Deduct Credit\n    Backend-\u003e\u003eUser: Send Response\n  else Credits = 0\n    Database-\u003e\u003eBackend: No Credits\n    Backend-\u003e\u003eUser: Error Response\n  end\n```\n\n---\n\n# 🧮 Credit System (Example)\n\n- Each user starts with 10 credits\n\n- 1 credit = 1 chatbot question\n\n- Credit deduction logic is handled in the backend\n\n- Prevents queries when credits are 0\n\n---\n\n# 📌 TODOs\n\n- Add UI feedback for no credits\n\n- Add option to purchase or earn more credits\n\n- Improve chatbot UI with typing effect\n\n- Save chat history per user\n\n---\n\n# 🛡️ Security\n\n- Passwords are hashed using bcrypt\n\n- JWT tokens are used for authentication and route protection\n\n- Rate-limiting (optional for production)\n\n---\n\n# 📸 Screenshots\n\n- Screenshots Available (This is only an illustration of the application)\n\n### Starting Page ✨\n\n\u003cimg src=\"./Screenshots/Screenshot (19).png\"/\u003e\n\u003cimg src=\"./Screenshots/start.png\"/\u003e\n\u003cimg src=\"./Screenshots/start1.png\"/\u003e\n\u003cimg src=\"./Screenshots/start2.png\"/\u003e\n\n---\n\n### Register Page 🗒️\n\n\u003cimg src=\"./Screenshots/Screenshot (20).png\"/\u003e\n\n---\n\n### Login Page 🗒️\n\n\u003cimg src=\"./Screenshots/Screenshot (18).png\"/\u003e\n\n---\n\n### Feature Page 🎀\n\n\u003cimg src=\"./Screenshots/Screenshot (24).png\"/\u003e\n\n---\n\n### Profile Page 🧑‍🏫\n\n\u003cimg src=\"./Screenshots/Screenshot (23).png\"/\u003e\n\n---\n\n### Pricing Page 💸\n\n\u003cimg src=\"./Screenshots/Screenshot (25).png\"/\u003e\n\n---\n\n### Chatting Page 💬🗣️\n\n\u003cimg src=\"./Screenshots/Screenshot (21).png\"/\u003e\n\n---\n\n# 🗺 Roadmap\n\n- 💸 Credit Purchase System\n\n- 📚 Chat History Storage\n\n- 📊 User Analytics Dashboard\n\n- 🎤 Voice Input Support\n\n- 🌐 Multi-language Support\n\n# 📃 License\n\n[![MIT License](https://img.shields.io/badge/License-MIT-green.svg)](https://choosealicense.com/licenses/mit/)\n\n```text\nMIT License\n\nCopyright (c) 2025 Harsh (@201Harsh)\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the “Software”), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES, OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n```\n\n---\n\n## 💬 Acknowledgments\n\n- MongoDB (Database)\n\n- Express (Backend)\n\n- React (Frontend)\n\n- Node.js (Server)\n\n- END Gaming AI API (AI Used for Emotional Analysis)\n\n- Google Gemini AI API (AI Used for Intelligence and General Knowledge)\n\n---\n\n# 🤝 Contributing\n\n- Fork the Project\n\n- Create your Feature Branch (git checkout -b feature/AmazingFeature)\n\n- Commit your Changes (git commit -m 'Add some AmazingFeature')\n\n- Push to the Branch (git push origin feature/AmazingFeature)\n\n- Open a Pull Request\n\n---\n\n# Live Preview\n - see the site live at\n*https://emoaichatbot.onrender.com/*\n\n---\n\n## 📮 Contact \u0026 Support\n\n- Lead Developer: Harsh (@201Harsh)\n- GitHub : [201Harsh](https://github.com/201Harsh) | Instagram : [201harshs](https://www.instagram.com/201harshs/)\n\n- Support Portal: support@endgamingai2@gmail.com\n\n---\n\n## Made With ❤️ by Harsh\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F201harsh%2Fai-cb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F201harsh%2Fai-cb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F201harsh%2Fai-cb/lists"}