ShipBit / slickgpt

SlickGPT is a light-weight "use-your-own-API-key" web client for the OpenAI API written in Svelte. It offers GPT-4 integration, a userless share feature and other superpowers.

Home Page:https://slickgpt.vercel.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

HowTo: Self-host without Firebase / Share feature

Shackless opened this issue · comments

The share feature in SlickGPT requires a database because we somehow have to pass the Chat object from client A to client B.

The project is currently set up to use a Firebase Realtime database as easy "JSON dump storage".

Create a branch and some documentation where the Share feature can easily be disabled and all Firebase dependencies (mostly the env vars) are removed from SlickGPT so that devs can run their own instance quicker and with less hassle in case they don't need to share chats.

Also document more clearly which code devs would have to edit to use another database provider than Firebase (which is basically just the share endpoint)

If you have experienced a build error in Vercel due to missing environment variables, I recommend following the steps below to resolve this issue.

  1. Locate the .env.example file in the base directory.
  2. Copy this file.
  3. Fill the copied file with dummy data, replacing any missing environment variables.
  4. Save the copied file as .env in the base directory.
  5. Try to build with Vercel again.

By following these steps, I was able to successfully build with Vercel even with missing environment variables causing an error.

Maybe we should use Prisma in the share endpoint to detach the database logic from Firebase. Then we could also build a version with a local sqlite database and dockerize it as suggested in #23. What do you think?