Anyone have thoughts on Supabase vs. a dedicated b...
# off-topic
o
Anyone have thoughts on Supabase vs. a dedicated backend? I am learning a lot right now. I learned a little supabase and thought: this is the answer! Then I learned about linking cloudflare workers to a database and thought, "this is the answer". I suspect it's some of A and some of B. What do y'all think? When do you go straight from the frontend to Supabase and when do you have a dedicated backend?
s
Can you define what you are calling a dedicated backend first please?
o
Sure. Either an express server running an API or using serverless to run an API
s
That is kind of independent of Supabase, as you could do this even with Supabase
So are you referring to you hosting your own database vs using Supabase hosted database?
o
Yeah, I am seeing how this line of questioning lacks focus...
As I've used it, Supabase is a cloud database with baked in Auth. That's great (in fact none of the serverless tutorials I've played around with do the Auth component). I built a react app before I learned about Supabase using Keystone as my database/auth, and it was a pain, plus I have to host it somewhere, just to run a silly demo. Learning about serverless was eye opening for me though, because I could have the benefit of not having to host anything while also learning a bit more about the guts of backend (which is a marketable skill, whereas (so far) supabase experience is not showing up in job listings.) So I'm looking to my next stupid demo app and wondering, what should I use for a backend... Now that I'm thinking about it, it occurs to me that you could use link to supabase from your backend huh... Feeling dumb... I'll have to see if y'all have a tutorial for that.
And yep, I'm seeing your cloudflare workers tutorial now...
s
No need to feel dumb, we are all learning everyday.
Yes you can use Supabase with any backend framework, you can use the actual supabase-js library on the backend or you can directly access the Postgres database that is hosted for you by Supabase. You can also use Supabase's REST api if you don't want to use the supabase-js library.
o
Interesting. So you can use supabase-js, connect to Supabase Postgres with a database adaptor + build an API, or, Supabase has a pre-made REST api? Lordy, so many options
s
Yes, this is what I like about Supabase, you aren't locked to any particular way of doing things, plus Auth is already taken care of for you (unless you need something more custom than the way how Supabase works, but even this you might be able to do)
o
Very cool. Thanks for taking the time to help me clarify my thinking
I've def heard somewhere people saying to "keep the business logic separate from the frontend"
s
I now take this as more to do with keeping the UI and business logic separate, don't tie them together. But if you want to go the old school approach of always having all your business logic in the backend then you can use something like NextJS which gives you both client and server side facilities.
o
Gotcha. Lots of food for thought. Thanks again for your time!
s
No problem