In this video I am going to show you how to talk about my experienced of using supabase for the past 2 years. Support the channel : 🙏🌸 donate 🌻: / dailywebcoding Follow me: 👇 Discord: / discord Github: github.com/Che...
Пікірлер: 42
@DailyWebCoding3 ай бұрын
By the way, I’m still using Supabase for my current project with my team, but we're transitioning to Drizzle instead. So our current stack includes: Next.js, Supabase (for PostgreSQL and auth), and Drizzle ORM
@ifeody3 ай бұрын
What product is your team building?
@lev1ato3 ай бұрын
I really like using Supabase with Drizzle in my project. Drizzle also introduced recently working with RLS policies, which I haven't looked at yet but sounds like a solution.
@DailyWebCoding3 ай бұрын
Are you using both supabaseClient and Drizzle, or just Drizzle when interacting with the database?
@lev1ato3 ай бұрын
@@DailyWebCoding Just drizzle, I mean for reading from and writing to db. As I understand there are 2 Supabase clients (server and client) and each has to be created each time for working with Supabase for what I have getUser and getClientUser functions. You also use drizzle to connect to Supabase. It is all kinda confusing and I am new to all of this, that is why I watch you 😂😂
@lev1ato3 ай бұрын
@@DailyWebCoding Just dirzzle, I mean for writing to and reading from db. You also use drizzle to connect to db. As I understand there are 2 Supabase clietns, server and client, and each has to be created each time when working with Supabase. For that I have getUser and getClientUser functions that create the client and get current user. I am still new to this and haven't run into problems for now, maybe because I haven't used real time yet etc. It is all very confusing, that is why I watch you 😂😂
@lev1ato3 ай бұрын
@@DailyWebCoding youtube keeps deleting my reply idk what is going on
@DailyWebCoding3 ай бұрын
@@lev1ato btw what is your reply ? I can see this reply now :)
@adrian333dev2 күн бұрын
Yeah, I straight up started with drizzle setup, but drizzle has it's own issues with supabase, they have docs about rls, but they don't mention the issues there
@amerrashed62872 ай бұрын
I think using supabase for auth is still the best option. For database, i'm using drizzle orm with postgresql, either Neon or supabase.
@DailyWebCoding2 ай бұрын
Yes i agree 🫡
@mahmoudalkateb200811 күн бұрын
Also i have noticed that if the query becomes really heavy supabase client will stop the query, and you would have to pump up Compute size.
@calvincraneАй бұрын
Thanks for the video, maybe use a code editor for videos as it was frustrating to watch. I'm not complaining just saying I would have preferred that. Ask your subscribers by poll?
@Spielberg0073 ай бұрын
I’m using drizzle and supabase for auth. Also drizzle supports RLS now so it is the best of both worlds. It is fast aswelll
@devfren3 ай бұрын
I kind of like writing the plpsql functions because it makes it easy to create new frontends. Eg i have a next app but I made a discord bot in python and they’re both using the same rpc
@wrongturn_w2 ай бұрын
So no database? I really think we should normalize knowing multiple languages. Developers should be comfortable switching between code bases.
@DailyWebCoding2 ай бұрын
Supabase has database and has client to interact with it as well but it not ORM. As of now you can’t do database transaction with supabase client. If you want to transaction you need to create rpc
@wrongturn_w2 ай бұрын
@ supabase is a layer on top of a postgres db. You can access directly as you do any other DB, you can run it locally and self host. When you’re at a point you’re taking a performance hit using the client, it’s the ideal time to let the team learn how to optimize their queries and schemas.
@maskman48213 ай бұрын
So what is your second favorite db? firebase? appwrite? mongodb?
@DailyWebCoding2 ай бұрын
right now I am consider using Convex
@werix_47763 ай бұрын
But what's the solution? I am curious... I use it similar ... so same problem lol
@DailyWebCoding3 ай бұрын
As of now, there are workarounds for using RPC (transaction). You can use other database ORMs to interact with it and ensure policies are followed or you can proceed with the PostgreSQL syntax directly for your RPC calls if you're comfortable with it.
@david.walters2 ай бұрын
What are your thoughts on Firebase? Why not use it?
@hectormelendez869310 күн бұрын
Filtering in Firebase it's a nightmare! Its excelent for Real Time stuff, but its very hard for complex queries
@inyourfacerockon3 ай бұрын
better to use typeorm, it works well with ts, maybe this issue arises only because you are working with your team. But supabase suits best if working on a solo project.
@DailyWebCoding3 ай бұрын
yes I agreeed.
@TimTan12 ай бұрын
Just use normal postgres and a node server with knex to communicate with it, all ur logic lives in the server
@TimTan12 ай бұрын
No need to use supabase unless you wanna use it to just host ur postgres db
@kalilbarry37733 ай бұрын
Personally, in a world where AI exists, it doesn’t bother me. Let’s say I’m working in your team, I can just paste your SQL code into an LLM and ask for an explanation. Also in my case, I mostly use RPC for transactions and it’s ok
@DailyWebCoding3 ай бұрын
Yes that’s what I did when I am working solo on the project as well.
@ibnurasikh3 ай бұрын
really? you're not using drizzle? drizzle is super type safety. i'm using supabase + drizzle. but yes, all db thing is handled by drizzle, only auth that are using supabase client.
@DailyWebCoding2 ай бұрын
In my current setup, I'm managing two database clients: Supabase Client: Used for authentication and real-time features (Auth, Realtime). Drizzle ORM: Dedicated to handling CRUD operations and transactions. Manage two client is fine but policy is a bit messy if my app realize on real time feature.
@cant_sleeeepАй бұрын
why is auth using sb client
@bitiset26 күн бұрын
Awdi ntoma hadrin hadrin
@XmNfwvhhD66eL87Cja3 ай бұрын
Personally I am moving away. As long as you are using SSR supabase may be enough but if you need complex auth logic it becomes a nightmare. The only way to secure ressources is to use RLS, which are executed on every row… What a nightmare when you want to build a scalable system. They suggest building logic into the DB but this is not a good idea as it makes the whole system harder to maintain in the long run. Even their pooler is a bit laggy. I finally built my own .NET api and created my own pooler, deactivating theirs. Th last but I need to handle is my auth server and then I’ll be free to book an RDS instance for half the price and way better performances as it will be in the same VPC as my api.
@lLvupKitchenАй бұрын
If only supabase had rollback
@everythingjavascript3 ай бұрын
supabase client is not great with databases, instead using any other orm like drizzle and prisma.
@DailyWebCoding3 ай бұрын
Yes, but we'll still need the Supabase client later for the real-time listener.
@neatfastro2 ай бұрын
@@DailyWebCodingcan you not use both simultaneously? Create a database class/file/module and write the queries as functions e.g. getProduct(id: string) Now the implementation of this function doesn’t matter to the caller and you can change the implementation anytime, you can even use a different db or anything for that matter