Database
Supabase
Supabase is completely open-source. Personally, we're using Supabase itself to host the database. The experience has been smooth with no issues. You can also use its self-hosting capabilities to host it on your own server or using Docker as shown in the guide.
Please make sure that Docker is installed in your system and is running before following the given guide. If you're looking for more options such as AWS or other cloud platforms, visit the official Self-hosting Supabase guide.
The database service used in Framecast AI is Supabase. Supabase is an open-source Firebase alternative. It is a service that provides a Postgres database with a RESTful API, authentication, and real-time capabilities.
To use Supabase with for local environment, you need to install the following dependencies:
npx install supabaseAfter installing the dependencies, we need to start a local server for Supabase. You can start the server by running the following command:
npx supabase startThis will start a dockerized virtual container in your local machine while providing you with the following values in your terminal:
NEXT_PUBLIC_SUPABASE_URL = your-supabase-url
NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY = your-supabase-publishable-key
SUPABASE_SECRET_KEY = your-supabase-secret-keyOnce you have these values, you can replace them with in your .env file by following the given steps:
Replacing Supabase URL, Supabase Publishable Key, and Supabase Secret Key
Replace your-supabase-url with your original Supabase URL, your-supabase-publishable-key with your original
Supabase Publishable Key, and your-supabase-secret-key with your original Supabase Secret Key from the
values provided in your terminal.
Ensure Replaced Values For Public Variables
Ensure that the replaced values are also repeated for the public variables NEXT_PUBLIC_SUPABASE_URL,
NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY. The SUPABASE_SECRET_KEY is only used server-side and should never be
exposed to the client.