{"id":15105307,"url":"https://github.com/ash0508/zenbot","last_synced_at":"2025-08-19T05:32:44.530Z","repository":{"id":257082594,"uuid":"855928214","full_name":"Ash0508/ZenBot","owner":"Ash0508","description":"ZenBot is a comprehensive Mental Health Care Chatbot designed to provide empathetic and personalized support to users. It offers a safe space for individuals to explore their feelings, receive mental health advice, and find valuable resources. The bot is available 24/7, ensuring that users always have access to help whenever they need it.","archived":false,"fork":false,"pushed_at":"2024-10-21T14:40:29.000Z","size":834,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-12-18T19:12:00.693Z","etag":null,"topics":["chatbot","flask","mental-health","mern-stack","nlp"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Ash0508.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2024-09-11T17:28:19.000Z","updated_at":"2024-10-21T14:40:33.000Z","dependencies_parsed_at":"2024-09-17T11:09:59.815Z","dependency_job_id":null,"html_url":"https://github.com/Ash0508/ZenBot","commit_stats":null,"previous_names":["ash0508/zenbot"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ash0508%2FZenBot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ash0508%2FZenBot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ash0508%2FZenBot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ash0508%2FZenBot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Ash0508","download_url":"https://codeload.github.com/Ash0508/ZenBot/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230326807,"owners_count":18209051,"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":["chatbot","flask","mental-health","mern-stack","nlp"],"created_at":"2024-09-25T20:23:16.576Z","updated_at":"2024-12-18T19:12:09.175Z","avatar_url":"https://github.com/Ash0508.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ✨ ZenBot ✨\n\n**ZenBot** is a comprehensive Mental Health Care Chatbot designed to provide empathetic and personalized support to users. It offers a safe space for individuals to explore their feelings, receive mental health advice, and find valuable resources. The bot is available 24/7, ensuring that users always have access to help whenever they need it.\n\n## 📋 Table of Contents\n\n- [Features](#-features)\n- [Technologies Used](#-technologies-used)\n- [Setup and Installation](#%EF%B8%8F-setup-and-installation)\n- [Usage](#-usage)\n- [API Endpoints](#-api-endpoints)\n- [Project Structure](#-project-structure)\n- [Sample Images](#-sample-images)\n- [Contributing](#-contributing)\n- [License](#-license)\n\n## ✨ Features\n\n- **🔒 User Authentication**: Secure registration, login, and password management with JWT-based authentication.\n- **💬 Chat Functionality**: Real-time chat with ZenBot, offering mental health advice and resources.\n- **📝 Chat History**: User chat history is saved and can be retrieved at any time.\n- **🔑 Password Management**: Secure password storage with bcrypt, including password history to prevent reuse.\n- **🔐 OTP-based Password Reset**: Users can reset their passwords securely using an OTP sent to their email.\n- **🤖 AI/ML Integration**: ZenBot utilizes natural language processing (NLP) and machine learning (ML) to understand user inputs and provide relevant responses.\n\n## 💻 Technologies Used\n\n### Backend\n\n- **Node.js**: Server-side JavaScript runtime.\n- **Express.js**: Web framework for Node.js.\n- **MongoDB**: NoSQL database for storing user data and chat history.\n- **Mongoose**: Object Data Modeling (ODM) library for MongoDB.\n- **JWT (JSON Web Tokens)**: For secure user authentication.\n- **bcrypt.js**: For hashing passwords and managing password history.\n- **Winston**: For logging server events.\n- **Flask**: Python-based backend for the chatbot AI/ML model.\n- **Keras**: Deep learning framework used for training the chatbot model.\n- **NLTK**: Natural Language Toolkit for processing text inputs.\n\n### Frontend\n\n- **React.js**: JavaScript library for building user interfaces.\n- **Bootstrap**: CSS framework for responsive design.\n- **Styled Components**: For writing CSS in JS with styled-components.\n- **React Router**: For routing in the React app.\n\n## ⚙️ Setup and Installation\n\n### Prerequisites\n\n- Node.js and npm installed\n- Python and pip installed\n- MongoDB installed and running\n\n### Backend Setup\n\n1. Clone the repository:\n    ```bash\n    git clone https://github.com/Ash0508/ZenBot.git\n    cd ZenBot\n    ```\n\n2. Install backend dependencies:\n    ```bash\n    cd backend\n    npm install\n    ```\n\n3. Create a `.env` file in the `backend` directory and add the following:\n    ```env\n    PORT = 5000\n    MONGO_URI = mongodb://localhost:27017/chatbot\n    JWT_SECRET = your_secret_key\n    NODE_ENV = production\n    EMAIL_USER = your_email@gmail.com\n    EMAIL_PASS = your_email_password\n    API_KEY = your_api_key\n    FRONTEND_URL = http://localhost:3000\n    ```\n\n4. Start the backend server:\n    ```bash\n    npm start\n    ```\n\n### Frontend Setup\n\n1. Install frontend dependencies:\n    ```bash\n    cd ../frontend\n    npm install\n    ```\n\n2. Create a `.env` file in the `frontend` directory and add the following:\n    ```env\n    REACT_APP_API_URL = http://localhost:5000\n    REACT_APP_API_KEY = your_api_key\n    ```\n\n3. Start the frontend server:\n    ```bash\n    npm start\n    ```\n\n### AI/ML Model Setup (ZenBot)\n\n1. Install Python dependencies:\n    ```bash\n    pip install -r requirements.txt\n    ```\n\n2. Train the chatbot model (if needed):\n    ```bash\n    python bot_creation.py\n    ```\n\n3. Start the Flask server:\n    ```bash\n    python app.py\n    ```\n\n## 🚀 Usage\n\n1. Open your browser and go to `http://localhost:3000`.\n2. Register or log in to start chatting with ZenBot.\n3. Explore the chat history, reset passwords, and more using the provided features.\n\n## 📂 API Endpoints\n\n### User Routes\n\n- **POST /api/users/register**: Register a new user.\n- **POST /api/users/login**: Log in a user.\n- **POST /api/users/logout**: Log out the current user.\n- **GET /api/users/profile**: Get the profile of the logged-in user.\n- **PUT /api/users/profile**: Update the profile of the logged-in user.\n- **POST /api/users/forgotpassword**: Request a password reset OTP.\n- **PUT /api/users/resetpassword**: Reset the password using the OTP.\n\n### Chat Routes\n\n- **POST /api/chats/save**: Save a chat message.\n- **GET /api/chats**: Retrieve chat messages for a specific user.\n\n## 📸 Sample Images\n\n- **Home Page**: A screenshot of the home page.\n\n- **Chat Interface**: A screenshot of the chat interface.\n\n- **Login**: Screenshots of the login forms.\n\n- **Register**: Screenshots of the registration forms.\n\n## 🤝 Contributing\n\nContributions are welcome! Please follow these steps:\n\n1. Fork the repository.\n2. Create a new branch (`git checkout -b feature/your-feature`).\n3. Commit your changes (`git commit -m 'Add some feature'`).\n4. Push to the branch (`git push origin feature/your-feature`).\n5. Open a pull request.\n\n## 📄 License\n\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fash0508%2Fzenbot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fash0508%2Fzenbot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fash0508%2Fzenbot/lists"}