Open Source, Self-Hosted Chat GPT APP with Nextjs
Open Source, Self-Hosted Chat GPT APP
Stack
- Prisma,
- tRPC
- NextJS
- TypeScript
- Sqlite
- Mantine (React comoponent library)
How to run
First create a .env file
If you want a multi-user setup follow .env.multi-user.example
.
If you don’t want to support multiple users, follow: .env.single-user.example
.
Docker Hub (Simplest)
docker pull docker.io/bitswired/ai-chat-app
docker run -p 3000:3000 docker.io/bitswired/ai-chat-app
In order to persist data, you can use a volume to store the Sqlite database like this:
docker run -p 3000:3000 -v sqldata:/app/prisma/data ai-chat-app docker.io/bitswired/ai-chat-app
Docker Local
- Clone the repository
docker build -t ai-chat-app .
docker run -p 3000:3000 ai-chat-app
In order to persist data, you can use a volume to store the Sqlite database like this:
docker run -p 3000:3000 -v sqldata:/app/prisma/data ai-chat-app
Local
- Clone the repository
- Create a
.env
file containing 2 entries:
DATABASE_URL="file:./db.sqlite"
- Run
yarn
- Run
yarn prisma migrate deploy
- Run
yarn build
- Run
yarn start
- Visit localhost:3000/settings
- Add your OpenAI API Key
- Enjoy your self-hosted ChatGPT
Roadmap 🚀
Contribution welcomed!
- Dockerize the app
- Add ChatGPT prompt templates to speed up reusable worflows
- Integrate vocal chat with the Whisper API
- Make it more mobile friendly
- Overall imporovement of the design