This repository contains my solution for the challenge of creating a chatbot using the MERN stack and integrating with the OpenAI API.
- User registration and login functionality.
- Homepage where users can interact with the Sapienth chatbot.
- Clean code implementation following best practices.
To run this project, please follow these steps:
- Clone the repository to your local machine.
- Navigate to the chatbot-frontend directory and run the following command in your terminal to install dependencies:
npm install
- After the installation is complete, start the development server by running the command:
npm run dev
- Open a separate terminal window, navigate to the chatbot-backend directory, and run the following command to install dependencies:
npm install
- Once the installation is finished, start the backend server by running the command:
npm start
- After both frontend and backend servers are up and running, access the URL shown in the frontend terminal to use the application.
The following dependencies were used in the frontend:
- Vite
- React Bootstrap
- React Router DOM
- React Context API
- React Toastify
- React Phosphor Icons
- Axios
The following dependencies were used in the backend:
- Express
- Nodemon
- Bcrypt
- Cors
- Dotenv
- Mongoose
- Jsonwebtoken
In order to run the application successfully, make sure you have a .env file in the backend folder with the following configuration:
API_KEY='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'
DB_USER='vbmelox'
DB_PASS='QEvvi2KZ22qHI3J1'
JWT_SECRET='q8!@#b78dawdaBA*#@$@#ASDH*&@hdawuihd2a723b*!&@$b3472tbfsal83^@#123casdfasdwa1rf2435671ubn12978$!'
For testing purposes, you can use the following credentials to register in the backend:
- Email: [email protected]
- Password: teste
This project is licensed under the MIT License. Feel free to use and modify it as needed.
Feel free to reach out to me if you have any questions or need further assistance. Happy coding!