This project is a chatbot powered by OpenAI's GPT-3.5 Turbo Model. It is implemented in MERN (MongoDB, Express, React, Node.js). MongoDB for the database, Express for the backend and React for the frontend. And of course Node.js, which lets you run JavaScript outside the browser.
Before running the application, ensure you have the following installed:
- Node.js
- MongoDB
- pnpm (Performant Node Package Manager 🚀)
-
Clone the repository:
git clone https://github.com/Lo1176/MERN-ai-chatbot.git
-
Navigate to the project directory:
cd MERN-ai-chatbot
-
Install dependencies for both the client and server:
# Install frontend dependencies cd frontend pnpm i # Install backend dependencies cd backend pnpm i
-
Configure environment variables:
Modify the
.env.txt
file in thebackend
directory and add the following variables and rename it to.env
:```bash OPENAI_API_KEY=your_openai_api_key MONGODB_URI=your_mongodb_uri ```
-
Start the application:
# Start the client (in the frontend directory) cd frontend pnpm dev # Start the server (in the backed directory) cd backend pnpm dev