This is a full-stack application that allows users to chat with OpenAI's GPT models. Users can register, login, and then interact with the model via a simple interface. The application uses a React frontend, a Python FastAPI backend, and relies on OpenAI's GPT API for the chat functionality.
- User Authentication: Register, login, and manage your user account.
- Chat Interface: Simple and intuitive UI to interact with the GPT model.
- Admin Dashboard: Monitor API usage, check logs, and manage users.
- Profile Editing: Users can change their username, password, email, and API key.
- Frontend: React, Tailwind CSS
- Backend: FastAPI, PostgreSQL
- Others: Docker, OpenAI's GPT API, Redis.
- Node.js
- Python 3.x
- Docker (optional)
- An OpenAI API Key
-
Clone the repository
git clone https://github.com/yourusername/yourrepository.git
-
Frontend Setup
Navigate to the frontend folder and install dependencies.
cd frontend npm install
Create a
.env
file to store your environment variables, like the API endpoint.REACT_APP_API_ENDPOINT=http://localhost:8000
Run the frontend server.
npm start
-
Backend Setup
Navigate to the backend folder and install dependencies.
cd backend pip install -r requirements.txt
Run the backend server.
uvicorn main:app --reload
-
Docker Setup (Optional)
If you prefer using Docker, a
Dockerfile
anddocker-compose.yml
are provided.docker-compose up --build
- Open your browser and navigate to
http://localhost:3000
. - Register a new user or login.
- Once logged in, you'll be redirected to the chat interface.
Feel free to fork the project, open issues, and provide pull requests.
This project is licensed under the MIT License - see the LICENSE.md
file for details.
You can add or remove sections based on your actual project details and features. This is a general guideline to help you get started.