AI-powered conversational assistant that actually understands you
Contribute
·
Report Bug
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.
- Node.js 14.x or higher
- MongoDB 4.x or higher
- Google Cloud Platform account with Dialogflow API enabled
- Angular CLI 16.x
-
Clone the repo
git clone https://github.com/NBGamer99/chatbot-js.git
-
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
-
Install backend dependencies
cd backend npm install -
Install frontend dependencies
cd frontend npm install -
Configure environment variables
# Update frontend/src/environments/environment.ts with your Dialogflow project ID # Update MongoDB connection string in backend/server.js if needed
To run the backend server, run the following command in the backend directory:
npm startThe server will start on http://localhost:3000
To run the frontend, run the following command in the frontend directory:
ng serveThe app will be available at http://localhost:4200
Make sure MongoDB is running locally:
mongodThe chatbot features:
- Real-time conversation with AI responses
- Session-based chat history
- User-friendly interface with message bubbles
- Error handling and input validation
- Persistent conversation storage
- 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
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.
Distributed under the MIT License. See LICENSE for more information.
For any questions or suggestions, feel free to contact:
- Yasser Nabouzi - @NBGamer99
- Hamza Mesrar - @ez7mz
