Skip to content

Latest commit

 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CHATBOT Ensakh

AI-powered conversational assistant that actually understands you

Contribute · Report Bug

angularnodejsexpressmongodbdialogflowtypescriptdialogflow

This is an intelligent chatbot application that leverages Google Dialogflow for natural language processing and understanding. The project consists of an Angular frontend providing a sleek chat interface and a Node.js backend handling AI conversations with persistent chat history stored in MongoDB.

Getting Started

Prerequisites

  • Node.js 14.x or higher
  • MongoDB 4.x or higher
  • Google Cloud Platform account with Dialogflow API enabled
  • Angular CLI 16.x

Installation

  1. Clone the repo

    git clone https://github.com/NBGamer99/chatbot-js.git
  2. Set up Google Cloud credentials

    # Place your Google Cloud service account JSON file in the .env directory
    # The server will automatically detect and use it
  3. Install backend dependencies

    cd backend
    npm install
  4. Install frontend dependencies

    cd frontend
    npm install
  5. Configure environment variables

    # Update frontend/src/environments/environment.ts with your Dialogflow project ID
    # Update MongoDB connection string in backend/server.js if needed

Usage

Backend

To run the backend server, run the following command in the backend directory:

npm start

The server will start on http://localhost:3000

Frontend

To run the frontend, run the following command in the frontend directory:

ng serve

The app will be available at http://localhost:4200

MongoDB

Make sure MongoDB is running locally:

mongod

DEMO

The chatbot features:

Live Demo

  • Real-time conversation with AI responses
  • Session-based chat history
  • User-friendly interface with message bubbles
  • Error handling and input validation
  • Persistent conversation storage

Architecture

  • Frontend: Angular 16 with TypeScript and SCSS
  • Backend: Node.js with Express framework
  • Database: MongoDB for chat history persistence
  • AI Service: Google Dialogflow for natural language processing
  • Session Management: Custom token-based user sessions

Contribute

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated. Feel free to open a pull request or an issue.

License

Distributed under the MIT License. See LICENSE for more information.

Contact

For any questions or suggestions, feel free to contact:

About

This is an intelligent chatbot application that leverages Google Dialogflow for natural language processing and understanding. The project consists of an Angular frontend providing a sleek chat interface and a Node.js backend handling AI conversations with persistent chat history stored in MongoDB.

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages