Skip to content

Latest commit

 

History

History
172 lines (129 loc) · 5.49 KB

README.md

File metadata and controls

172 lines (129 loc) · 5.49 KB

✨ BreezeBot ✨

BreezeBot 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.

📋 Table of Contents

✨ Features

  • 🔒 User Authentication : Secure registration, login, and password management with JWT-based authentication.
  • 💬 Chat Functionality : Real-time chat with the BreezeBot, which offers mental health advice and resources.
  • 📝 Chat History : User chat history is saved and can be retrieved at any time.
  • 🔑 Password Management : Secure password storage with bcrypt, including password history to prevent reuse.
  • 🔐 OTP-based Password Reset : Users can reset their passwords securely using an OTP sent to their email.
  • 🤖 AI/ML Integration : The bot utilizes natural language processing (NLP) and machine learning (ML) to understand user inputs and provide relevant responses.

💻 Technologies Used

Backend

  • Node.js : Server-side JavaScript runtime.
  • Express.js : Web framework for Node.js.
  • MongoDB : NoSQL database for storing user data and chat history.
  • Mongoose : Object Data Modeling (ODM) library for MongoDB.
  • JWT (JSON Web Tokens) : For secure user authentication.
  • bcrypt.js : For hashing passwords and managing password history.
  • Winston : For logging server events.
  • Flask : Python-based backend for the chatbot AI/ML model.
  • Keras : Deep learning framework used for training the chatbot model.
  • NLTK : Natural Language Toolkit for processing text inputs.

Frontend

  • React.js : JavaScript library for building user interfaces.
  • Bootstrap : CSS framework for responsive design.
  • Styled Components : For writing CSS in JS with styled-components.
  • React Router : For routing in the React app.

⚙️ Setup and Installation

Prerequisites

  • Node.js and npm installed
  • Python and pip installed
  • MongoDB installed and running

Backend Setup

  1. Clone the repository:

    git clone https://github.com/sabariraj01/BreezeBot.git
    cd BreezeBot
  2. Install backend dependencies:

    cd backend
    npm install
  3. Create a .env file in the backend directory and add the following:

    PORT = 5000
    MONGO_URI = mongodb://localhost:27017/chatbot
    JWT_SECRET = your_secret_key
    NODE_ENV = production
    EMAIL_USER = your_email@gmail.com
    EMAIL_PASS = your_email_password
    API_KEY = your_api_key
    FRONTEND_URL = http://localhost:3000
  4. Start the backend server:

    npm start

Frontend Setup

  1. Install frontend dependencies:

    cd ../frontend
    npm install
  2. Create a .env file in the frontend directory and add the following:

    REACT_APP_API_URL = http://localhost:5000
    REACT_APP_API_KEY = your_api_key
  3. Start the frontend server:

    npm start

AI/ML Model Setup (ChatBot)

  1. Install Python dependencies:

    pip install -r requirements.txt
  2. Train the chatbot model (if needed):

    python bot_creation.py
  3. Start the Flask server:

    python app.py

🚀 Usage

  1. Open your browser and go to http://localhost:3000.
  2. Register or log in to start chatting with BreezeBot.
  3. Explore the chat history, reset passwords, and more using the provided features.

📂 API Endpoints

User Routes

  • POST /api/users/register : Register a new user.
  • POST /api/users/login : Log in a user.
  • POST /api/users/logout : Log out the current user.
  • GET /api/users/profile : Get the profile of the logged-in user.
  • PUT /api/users/profile : Update the profile of the logged-in user.
  • POST /api/users/forgotpassword : Request a password reset OTP.
  • PUT /api/users/resetpassword : Reset the password using the OTP.

Chat Routes

  • POST /api/chats/save : Save a chat message.
  • GET /api/chats : Retrieve chat messages for a specific user.

📸 Sample Images

  • Home Page : A screenshot of the home page. image
  • Chat Interface : A screenshot of the chat interface. image
  • Login : Screenshots of the login forms. image
  • Register : Screenshots of the registration forms. image

🤝 Contributing

Contributions are welcome! Please follow these steps:

  1. Fork the repository.
  2. Create a new branch (git checkout -b feature/your-feature).
  3. Commit your changes (git commit -m 'Add some feature').
  4. Push to the branch (git push origin feature/your-feature).
  5. Open a pull request.

📄 License

This project is licensed under the MIT License. See the LICENSE file for details.