Questions tagged [supabase]

Supabase is a collection of open source tools to build modern applications quickly and efficiently. It uses the PostgreSQL database to power its authentication, database, and storage features. Use this tag when you are having problems, and not to ask for new features.

Supabase is a combination of open source tools. It builds the features of Firebase using enterprise-grade, open source products. Supabase is not a 1-to-1 mapping of Firebase. Its aim is to give developers a Firebase-like developer experience using open source tools.

Supabase has an official JavaScript library as well as community built Dart, Rust, Kotlin, C# and Python libraries.

Supabase is composed of four components

  • Database
  • Authentication
  • Storage
  • Functions (coming soon)
1213 questions
2
votes
2 answers

Match PotsgreSQL timestamptz by exact value

I am using PostgreSQL 13.3 via Supabase.io. I have a table with a field called modified_at which has a type of timestamptz: CREATE TABLE IF NOT EXISTS knowledge_views ( id uuid NOT NULL DEFAULT uuid_generate_v4() PRIMARY KEY, modified_at…
AJP
  • 26,547
  • 23
  • 88
  • 127
2
votes
2 answers

Supabase policies on getServerSideProps - Next.js

I'm crafting a Trello clone with Next.js and Supabase as a BaaS. In my Supabase table I have this policies: Policies are working grate on client side with the following code: const { data } = await supabase .from('board') …
2
votes
7 answers

Filtering in join in supabase

Im using supabase with a database which have 2 tables (that are implicates in this issue). Tables are teachers and users. Both have ID and id_teacher/id_user respectively. Im working in a query where i need to get all teacher, joining in users…
Facundo Serrano
  • 43
  • 2
  • 12
2
votes
0 answers

How to set Authorization header for Urql client?

I've got a NextJS app where I am implementing Supabase for authentication, and attempting to strip out Apollo with Urql instead. In my urql.ts file, I am creating the client as such: import { createClient, ssrExchange, dedupExchange, fetchExchange }…
J. Jackson
  • 3,326
  • 8
  • 34
  • 74
2
votes
1 answer

Complex query with parameters in SUPABASE

I would like to create this except query in supabase, but with parameters in the day column. For example: CREATE VIEW employees_without_registering AS SELECT employees.id FROM employees EXCEPT SELECT "idEmployee" FROM registers WHERE…
Javier Cárdenas
  • 3,935
  • 4
  • 25
  • 35
2
votes
1 answer

Supabase JSON query JavaScript

Im trying to fetch single entry from my table that contains and JSONB array of objects. Can I match somehow that array to find the desired result? [ { "chats": [ { "id": 56789 }, { "id": 66753 }, ], …
Mugetsu
  • 1,739
  • 2
  • 20
  • 41
2
votes
1 answer

Supabase Self Hosted responded with 404

I've tried following the guide provided on supabase: https://supabase.io/docs/guides/self-hosting I went with Option 1 & 2 in which both resulted in the same error 404 when I try to reach localhost:8000/v1?APIKEY=. 192.168.32.1 - -…
2
votes
1 answer

Count the occurrences of DISTINCT values using supabase

I want alternative supabase code for this SQL command SELECT order_date,COUNT(*) as count FROM orders GROUP BY order_date ORDER BY order_date Desc; What I am trying to do is, I want the number of orders of each day. This is how my table looks…
Hadi azeez
  • 89
  • 3
  • 10
2
votes
0 answers

Create a ranking mechanism like Algolia

I'm creating a platform to search products based on certain filters. Let's say I have filters A, B and C and a database of around 20,000 products. What I'm trying to build is a way to create a ranking score and query the list of products based on…
2
votes
1 answer

Ionic5 App connection to SupaBase gives "process is not defined"

Hello I have the following problem: I wanted to test a few small things with the "new" SupaBase service. I have also implemented everything using an example angularapp. https://stackblitz.com/edit/supabase-angular-example Now I get the following…
lucky 7
  • 33
  • 4
1
vote
0 answers

Unable to Update first_name and last_name Columns in public.profiles Table Using Supabase (React Native)

I'm working on a project that uses Supabase as the backend, and I've set up a public.profiles table to store user profile information. The table structure looks like this: create table public.profiles ( id uuid not null, first_name text…
Owen
  • 21
  • 2
1
vote
1 answer

Firebase function equivalent in Supabase

I want to be able to write a function in TypeScript and have it run when a user is created (probably when an insert event occurs on the auth table) I don’t want to author this in plpgsql How would I do this?
Kirk Strobeck
  • 17,984
  • 20
  • 75
  • 114
1
vote
1 answer

Vercel Express 500 preflight error and custom headers not send

I am trying to create an application with supabase as DB, vercel backend (url: http://localhost:3000/api/) and netlify frontend (url: http://localhost:5173). The frontend is a react application with vite and the backend is a list of serverless…
Azzarian
  • 153
  • 2
  • 13
1
vote
1 answer

Supabase Auth: redirects to Google.com instead of my app

Following this tutorial, after the Google login i'm redirected to Google.com instead of bringing me back to my app. How could I solve this issue? Sample code of the login page: class _LoginScreenState extends State { final supabase =…
faccio
  • 652
  • 3
  • 16
1
vote
1 answer

Error: "Only async functions are allowed to be exported in a 'use server' file"

I am trying to use layout.tsx in the app directory of Next.js 13 to have a nav layout that is present on all the pages. I managed to make it so that when the user logs out/signs in, the navbar changes, but the issue is that I have to refresh the…
Vladimirzb
  • 87
  • 6