{"id":17954060,"url":"https://github.com/fatihbaltaci/chatgpt-clone","last_synced_at":"2025-08-23T13:10:19.306Z","repository":{"id":193293911,"uuid":"615848044","full_name":"fatihbaltaci/chatgpt-clone","owner":"fatihbaltaci","description":"Self Hosted ChatGPT Clone: A Full-Stack Conversational AI Platform powered by React, Django REST Framework, and PostgreSQL and OpenAI's GPT-3.5 Model. Most of the code is written by GPT-4 model.","archived":false,"fork":false,"pushed_at":"2023-03-24T15:10:04.000Z","size":1058,"stargazers_count":55,"open_issues_count":1,"forks_count":19,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-05T00:06:18.807Z","etag":null,"topics":["chatbot","chatgpt","chatgpt-bot","chatgpt-clone","chatgpt-ui","django","django-rest-framework","postgres","postgresql","react","reactjs"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fatihbaltaci.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-03-18T21:11:52.000Z","updated_at":"2025-03-26T04:24:32.000Z","dependencies_parsed_at":"2023-09-07T15:24:08.320Z","dependency_job_id":null,"html_url":"https://github.com/fatihbaltaci/chatgpt-clone","commit_stats":null,"previous_names":["fatihbaltaci/chatgpt-clone"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/fatihbaltaci/chatgpt-clone","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fatihbaltaci%2Fchatgpt-clone","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fatihbaltaci%2Fchatgpt-clone/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fatihbaltaci%2Fchatgpt-clone/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fatihbaltaci%2Fchatgpt-clone/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fatihbaltaci","download_url":"https://codeload.github.com/fatihbaltaci/chatgpt-clone/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fatihbaltaci%2Fchatgpt-clone/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271748929,"owners_count":24814084,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-23T02:00:09.327Z","response_time":69,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chatbot","chatgpt","chatgpt-bot","chatgpt-clone","chatgpt-ui","django","django-rest-framework","postgres","postgresql","react","reactjs"],"created_at":"2024-10-29T10:08:42.072Z","updated_at":"2025-08-23T13:10:19.284Z","avatar_url":"https://github.com/fatihbaltaci.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🤖 Self Hosted ChatGPT Clone\n\nChatGPT Clone: Self Hosted, Full-Stack Conversational AI Platform powered by React, Django REST Framework, and PostgreSQL and OpenAI's GPT-3.5 API. Most of the code is written by [GPT-4 model](https://openai.com/product/gpt-4). \n\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"https://raw.githubusercontent.com/fatihbaltaci/chatgpt-clone/main/assets/chatgpt_clone_overview.png\" alt=\"ChatGPT Clone - It uses GPT-3.5 to generate responses to messages.\" /\u003e\n\u003c/p\u003e\n\n## 📖 Table of Contents\n\n- [Features](#-features)\n- [Prerequisites](#-prerequisites)\n- [Quick Start (Recommended)](#%EF%B8%8F-quick-start-recommended)\n- [Installation (Manual)](#-installation-manual)\n- [Development (Contributing)](#-development-contributing)\n- [Known Issues](#-known-issues)\n- [Credits](#-credits)\n- [License](#-license)\n\n## 🚀 Features\n\n- **Self Hosted**: You can host the project on your own server or local machine. All the data and OpenAI API Key are stored on your server.\n- **Full-Stack**: The project is a full-stack project that includes a React frontend, Django REST Framework backend, and PostgreSQL database.\n- **Conversational AI**: The project uses OpenAI's GPT-3.5 API to generate responses to user inputs.\n- **Docker Compose**: The project uses Docker Compose to run the project in containers.\n- **Django Admin Panel**: The project includes a Django Admin Panel to manage the project.\n- **Supported OS**: The project is tested on Ubuntu and MacOS.\n\n\n## 🛠 Prerequisites\n\n- [Docker](https://docs.docker.com/get-docker/)\n- [Docker Compose](https://docs.docker.com/compose/install/)\n- [OpenAI API Key](https://platform.openai.com/account/api-keys)\n\n## ⚡️ Quick Start (Recommended)\n\nYou can quickly deploy ChatGPT Clone by running the following command. This script ask you for your OpenAI API Key. Your OpenAI API Key is only stored in your `.envs/.env` file and is never sent to any other server. Please check the [install.sh](./install.sh) file to see what it does.\n\nThis script clones the project to your `$HOME` directory, updates the `.envs/.env` file with your OpenAI API Key, and runs the project using Docker Compose.\n\n```bash\ncurl -sSL https://raw.githubusercontent.com/fatihbaltaci/chatgpt-clone/main/install.sh | bash\n```\n\n## 🔧 Installation (Manual)\n\n### Clone the Repository\n\n```bash\ngit clone https://github.com/fatihbaltaci/chatgpt-clone.git\ncd chatgpt-clone\n```\n\n### Update .env File\n\nUpdate the `OPENAI_API_KEY` key in the [.envs/.env](.envs/.env) file with your OpenAI API Key. You can also update the other environment variables in this file.\n\n### 🚀 Run the Project\n\n```bash\ndocker-compose build\ndocker-compose up -d\n```\n\n### 🌐 Access the Project\n\nThe project will be available at http://localhost:8090/\n\n### 🧐 Access the Django Admin Panel\n\nThe admin panel will be available at http://localhost:8090/admin/ and you can login with the superuser credentials you set in the [.envs/.env](.envs/.env) file.\n\n### 🧹 Clean Up\n\nIf you installed the project using the [install.sh](./install.sh) script, you must first change the directory to the `$HOME/chatgpt-clone` directory before running the commands below.\n\n```bash\ncd $HOME/chatgpt-clone\ndocker-compose down\n```\n\n(Optional) Delete Postgres Volume (Warning: This will delete all data in the database)\n\n```bash\ndocker volume rm chatgpt-clone_postgres\n```\n\n## 🛠 Development (Contributing)\n\nIf you want to contribute to this project, you can follow the instructions below to set up a development environment.\n## Backend\n\n### Create Postgres\n\nDocker is required to run the Postgres database. If you don't have Docker installed, you can install it from [here](https://docs.docker.com/get-docker/).\n\n```bash\nPOSTGRES_VERSION=13.6\nPOSTGRES_PASSWORD=changeme\ndocker run -d --name chatgptpostgres \\\n    -e POSTGRES_PASSWORD=$POSTGRES_PASSWORD \\\n    -p 5532:5432 \\\n    --hostname chatgptpostgres \\\n    --restart always \\\n    -v $HOME/BACKUP/chatgptpostgres:/var/lib/postgresql/data \\\n    postgres:$POSTGRES_VERSION\n```\n\n\n### Installation\n\nCreate a virtual environment and install the dependencies.\n\n```bash\ncd chatgpt_backend\npython3 -m venv .venv\nsource .venv/bin/activate\npip install -r requirements.txt\n```\n\n### Running\n\n```bash\ncd chatgpt_backend\n./migrate_run_server.sh\n```\n\nTo access Django Admin, go to http://localhost:8090/admin/ and login with the superuser credentials you set in the [.env.dev](.envs/.env.dev) file\n\n### 🐘 Access the Database Shell\n\nSometimes you may want to access the Django database shell. You can do so by running the following command:\n\n```bash\ncd chatgpt_backend\n./db_shell.sh\n```\n\n## Frontend\n\n### Installation\n\n```bash\ncd chatgpt_frontend\nnpm install\n```\n\n### Running\n\nYou can update the `REACT_APP_BACKEND_URL` key in the [.env](chatgpt_frontend/.env) file with the URL of the backend server. Default value is `http://localhost:8090/api`. If your backend server is running on a different server or port, you must update this value. Do not forget to add `/api` at the end of the URL.\n\n```bash\ncd chatgpt_frontend\nnpm start\n```\n\n\n## 🐛 Known Issues\n\nIf you get `Error: pg_config executable not found.` when running `pip install -r requirements.txt`, you must install  PostgreSQL development libraries on your system. \n\nOn MacOS, you can install them with Homebrew:\n\n```bash\nbrew install postgresql\n```\n\nOn Ubuntu, you can install them with apt:\n\n```bash\nsudo apt update\nsudo apt-get install libpq-dev python3-dev\n```\n\n## 📄 License\n\nThis project is licensed under the terms of the [MIT license](./LICENSE).\n\n## 🙌 Credits\n\n- [OpenAI GPT-3.5](https://platform.openai.com/docs/models/gpt-3)\n- [Django](https://www.djangoproject.com/)\n- [Django REST Framework](https://www.django-rest-framework.org/)\n- [React](https://reactjs.org/)\n- [PostgreSQL](https://www.postgresql.org/)\n- [Docker](https://www.docker.com/)\n- [Docker Compose](https://docs.docker.com/compose/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffatihbaltaci%2Fchatgpt-clone","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffatihbaltaci%2Fchatgpt-clone","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffatihbaltaci%2Fchatgpt-clone/lists"}