Live data from Hacker News

Supabase-JS v2

supabase.com

51–60 of 82 posts

Re: Supabase-JS v2

#51

I'm having a bit of difficulty understanding what supabase is. I thought it was a Postgres database that gave you a PostgREST HTTP API interface. If that's the case... what does the javascript library do?

yes you're right. The JS library is a thin wrapper around PostgREST's API (https://github.com/supabase/postgrest-js)

Supabase now offers a few more features which integrate with the Postgres database - File Storage (s3), Authentication, Deno Functions, and Realtime (database change listeners). Each of these services is a standalone server and each has a corresponding JS library.

"supabase-js" wraps up the modular JS libraries into a single library for convenience

Re: Supabase-JS v2

#52
I love supabase. The main competitor is the lesser well known project directus [1]. Posting my experience with Directus here to see how it compares to supabase for folks that have gone that direction.

I had a tough time picking between these, but ended up landing on directus for a few reasons:

1) I don't like using db level users for RLS. Directus has a traditional users table that can be expanded with anything you want, and their roles ability is pretty comprehensive. Column level security is also straight forward based on declarative rules.

2) The Directus admin app is second to none, other than perhaps Django. Its extensibility is the real killer feature. I'm in production right now with nothing but the admin app and a set of extensions.

3) The files and storage capabilities support pretty much any mechanism you could dream up, plus build-in image editors etc...

4) The flows capability gives semi-technical users the ability to do IFTTT like logic inside the admin app. Pretty cool.

5) Directus has a (very) basic BI capability, that's extensible, and tied into the permissions model.

6) This is just a personal preference, but Directus is a smaller company and operating on less funding. This means that we're able to sponsor issues that are important to us and we can communicate directly with core team members. The team there has been extraordinarily responsive, and their github repo is the gold standard in community engagement, imho.

7) The deployment model is a breeze. Just a package.json dependency. npm install does everything.

Downsides:

- They fairly recently rewrote the whole platform from PHP to NodeJS. I applaud the decision, but this means that the product hasn't reached the same level of maturity.

- QA: the Directus team moves fast and breaks things. We've encountered several situations where releases have come out with core functionality broken. We've learned to thoroughly QA a release before we update.

- DX: the developer experience for writing and debugging extensions isn't the best. Its also very opinionated about Vue. I'm currently operating off a fork so that I can have a better DX and use Web Components (fortunately vue plays well with them). If you're just using out of the box functionality and the API, this isn't an issue.

[1] https://directus.io/

Re: Supabase-JS v2

#53

I'm having a bit of difficulty understanding what supabase is. I thought it was a Postgres database that gave you a PostgREST HTTP API interface. If that's the case... what does the javascript library do?

yes you're right. The JS library is a thin wrapper around PostgREST's API ( https://github.com/supabase/postgrest-js ) Supabase now offers a few more features which integrate with the Postgres database - File Storage (s3), Authentication, Deno Functions, and Realtime (database change listeners). Each of these services is a standalone server and each has a corresponding JS library. "supabase-js" wraps up the modular J…

Ok that puts in perspective. It's a convenience package not a must have.

Re: Supabase-JS v2

#54

I'm going to have to very kindly ask the Supabase devs to stop making such an appealing development platform as I don't have the time/energy to rewrite my existing web/apps. But for real, congrats on this and it looks very nice. At this point I'm just waiting on a new project that would be a good fit so I can play with all of this. Keep up the great work!

I think the best part is that if you're willing to go all in on RLS for your authorization, you can do away with needing a backend for your typical crud operations and use their functions for things like webhooks, or the occasional endpoint for more complicated operations.

Whoa. Didn’t think about that.

Re: Supabase-JS v2

#55

How do you limit the queries allowed in the UI aka prevent someone from making a really slow / large query? Do you general not use supabase directly in the UI and write an API that your front end can call instead?

you can call directly from the UI. just make sure that you have Row Level Security enabled and configure the default API parameters accordingly (eg, by default you can select a max of 1000 rows, you can adjust this if you want).

Re: Supabase-JS v2

#56

I love supabase. The main competitor is the lesser well known project directus [1]. Posting my experience with Directus here to see how it compares to supabase for folks that have gone that direction. I had a tough time picking between these, but ended up landing on directus for a few reasons: 1) I don't like using db level users for RLS. Directus has a traditional users table that can be expanded with anything you w…

I've heard great things about Directus. We have a guide (which the Directus team kindly contributed) that shows how to use Directus & Supabase together: https://supabase.com/docs/guides/integrations/directus

best of both worlds

Re: Supabase-JS v2

#57
post #46

Earlier quoted context omitted.

supabase ceo here. we have a hosted platform - you can sign up and spin up a postgres database, and we charge you $25/month (+ additional usage over a certain quota). This model is proving to be fine for us. It's very common for developers to pay for a database, especially a full Postgres database (more-so than say, a frontend hosting solution). We have a free tier too, where we pause the database if it is unused for…

Where does the actual hosting happen? AWS?

yes, just aws for now.

Re: Supabase-JS v2

#58

I love the concept of Supabase. The Firebase model is powerful but gated. For example, I recently had a project exceed FB's quota of functions- you can't deploy more than 60 endpoints in a minute which is a nightmare for CI pipelines which redeploy the entire app [0]. We recently tried Supabase on a "frontier" project, and found that it wasn't quite mature enough for production use in our case. Intermittent network e…

I fundamentally disagree with this limit due to the fact they provide no alternative when you start getting into that area (I imagine scaling to 120 or 180 is going to be painful for instance). I'm really shocked they don't have a way for a customer to get this quota changed if on an enterprise account for instance (usually there is some byline to the effect of "if you need a higher quota please contact your account rep" sort of thing, but there is none of that here, which tells me no matter the size this is ironclad)

Off topic but I am curious:

Why re-deployed unchanged code?

The user-land solution I can think of is cached builds that only re-deploy changed code?

Re: Supabase-JS v2

#60

Earlier quoted context omitted.

I think the best part is that if you're willing to go all in on RLS for your authorization, you can do away with needing a backend for your typical crud operations and use their functions for things like webhooks, or the occasional endpoint for more complicated operations.

Absolutely. I find myself saying this a lot when I try and explain the concept of Supabase. We don't really emphasize this very much on our website either. Disclaimer: I work at Supabase.

I am a happy paying user of supabase and I did just that for my project which is meant to facilitate trading of left over wood between woodworker shops. I simply set RLS rules and now I only have a react frontend which calls supabase directly and it works great.

I haven't checked in a while but one thing that was a little cumbersome for me was that I wasn't familiar with writing proper RLS rules and felt like documentation was a bit sparse and iirc there was not autocomplete to guide me a little more - but that might just be me being an idiot and it worked out with a little trial and error. :)

Post reply on HN