My Chat GPT is a web chat application designed for single-user interactions, leveraging the OpenAI API for natural language processing. The application is built with ReactJS and styled-components on the frontend, while the backend is powered by Node.js, Express.js, CORS, and MongoDB.
- Real-time chat with automated responses using the OpenAI API
- Modern and responsive user interface with ReactJS and styled-components
- Robust backend using Node.js and Express.js
- Data storage and chat history with MongoDB
- CORS support for secure communication between frontend and backend
- Clone the repository:
git clone https://github.com/your-username/my-chat-gpt.gitNavigate to the project directory:
cd my-chat-gptInstall frontend and backend dependencies:
cd frontend
npm install
cd ../backend
npm installMake sure to set up the required environment variables in the backend to access the OpenAI API and connect to MongoDB. Example .env file
OPENAI_API_KEY=your_openai_api_key
MONGODB_ATLAS_URI=your_mongodb_uri
PORT=8080
JWT_SECRET=jwt_secret
Start the backend:
cd backend
npm startStart the frontend:
cd frontend
npm startOpen your browser and go to:
http://localhost:3000Contributing
- Fork the project
- Create a branch for your feature (git checkout -b feature/new-feature)
- Commit your changes (git commit -am 'Add new feature')
- Push to the branch (git push origin feature/new-feature)
- Open a Pull Request