Table of Contents
This page just got created, so please expect many missing things. The documentation you see here, might also be very unstructured at the moment.
The Infrastructure page deals with setting up Supabase.
Why Supabase?
The Compete backend is built on PostgreSQL, utilizing features like row-level security (RLS), triggers, and extensions such as pg_net and pg_cron. Business logic is written in PL/pgSQL, allowing stored procedures to run directly within the database. REST APIs are automatically exposed through PostgREST. Supabase combines all of these components and has also built-in support for authentication, real-time updates, file storage, and Edge functions.
Setting up Supabase
There are two possible ways you can take:
- Use a Supabase hosted (e.g. FREE) plan
- Self-host Supabase
Whereas the first is the easiest, the latter promises control over the data.
Hosted Supabase
See: https://supabase.com/pricing
The FREE plan is more than enough at first.
Self-host Supabase
Official guide: https://supabase.com/docs/guides/self-hosting
Recommendations
In addition to the security part of the official documentation, these things are recommended:
- Configure a reverse proxy such as Nginx
- only forward the REST API requests
- do not expose the Supabase Dashboard over the internet
- the same goes for the Postgres database
Have fun using Compete!