- Get the SEO description for the website
Notes on development.
Only use Sentry captureException() on errors in the backend or from Supabase; anything that is
not a response from our server, because it is already being done in the backend.
When adding a new theme or customizing, do the following:
- Create the colors in the
globals.cssfile - Update the
tailwind.config.jsfile with the new colors - Update variants in the
toast.tsxandbutton.tsxfiles
When creating tables or functions you need to set the owner to postgres so that when using the
Supabase CLI it will work because it will default to supabase_admin but postgres is used in
the CLI.
ALTER TABLE users OWNER TO postgres;
ALTER FUNCTION do_something(string text, value integer) OWNER TO postgres;With using the Supabase migrations through the Supbase CLI, the database schema is fully backed up with changes over time. The data itself can be retrieved from the supabase dashboard and then used to restore the data.
By default, a Supabase project will limit queries to 1000 records. This can be changed in the
Settings tab of the project.
Here is a typical RLS that is created:
ALTER TABLE public.users ENABLE ROW LEVEL SECURITY;
CREATE POLICY "Can view own user data" ON users
FOR SELECT
TO authenticated
USING (auth.uid() = id);
CREATE POLICY "Can update own user data" ON users
FOR UPDATE
TO authenticated
USING (auth.uid() = id)
WITH CHECK (auth.uid() = id AND role = users.role);The TO clause specifies that only authenticated users can access the table.
TO authenticatedThe USING clause specifies that only the user who owns the row can access it.
USING (auth.uid() = id);The WITH CHECK clause specifies that the user can only update their own data and that
the role is not modified by checking it is the same as the current value.
WITH CHECK (auth.uid() = id AND role = users.role);