An AI-powered chatbot application developed using the MERN stack, TypeScript, and Langchain. This project features user authentication, chat history management, document analysis, and the ability to access external tools for accurate responses.
- AI-Powered Chatbot: Interact with an AI chatbot that provides personalized and relevant responses.
- User Authentication: Secure login and session management for users.
- Document Upload: Upload documents for the AI to analyze and interact with.
- External Tools Integration: Uses Langchain to access tools like Wikipedia and Google Search for comprehensive answers.
- Chat History: Save multiple chat sessions with the ability to access and continue previous chats, maintaining context for a personalized experience.
- Frontend: React, TypeScript
- Backend: Node.js, Express.js
- Database: MongoDB
- Other Tools: Langchain
- Node.js (v14 or later)
- MongoDB
-
Fork the Repository: Start by forking the repository to your own GitHub account.
-
Clone the Repository: Next, clone the forked repository to your local machine:
git clone https://github.com/<your-username>/<repository-name>.git
-
Create a New Branch: Navigate into the cloned repository and create a new branch for your changes:
cd <repository-name> git checkout -b <branch-name>
Replace
<branch-name>
with a descriptive name for your branch (e.g.,add-new-feature
). -
Make Your Changes: Make the changes you want to contribute. Be sure to follow the project's coding standards and conventions.
-
Commit Your Changes: Once you've made your changes, stage and commit them:
git add . git commit -m "Your descriptive commit message"
-
Push Your Changes: Push your changes to your forked repository on GitHub:
git push origin <branch-name>
-
Before committing your changes, make sure to configure the OAuth credentials for Google and GitHub. Obtain the OAuth client ID and secret for both platforms and add them to the
.env
file in the project root directory. The file should look like this:
Environment Variable | Description |
---|---|
JWT_SECRET |
Secret key for JSON Web Tokens |
COOKIE_SECRET |
Secret key for cookies |
OPEN_AI_SECRET |
API key for OpenAI |
MONGODB_URL |
Connection string for MongoDB |
GOOGLE_API_KEY |
API key for Google services |
TAVILY_API_KEY |
API key for Tavily services |
SERPAPI_API_KEY |
API key for SerpAPI |
BASE_APP_URL |
Base URL for the frontend application |
BASE_API_URL |
Base URL for the backend API |