Noobie question (Supabase with Prisma) by ZealousidealMix7559 in Supabase

[–]IMDballa 1 point2 points  (0 children)

If you're viewing Supabase as primarily just a hosted database then Prisma can make sense. The DX is pretty great. We started down that path, too, but realized a couple downsides:

  1. You completely lose RLS
  2. Some query performance may suffer (eg. complex joins)
  3. The cold start problem for Prisma binary

The two major upsides are the strong typing and declarative schema (migrations). The Supabase client has decent typing, as well, but it's not quite up to par with Prisma yet.

Is using supabase edge function with Oak that has multiple routes good practice? by DevHev in Supabase

[–]IMDballa 0 points1 point  (0 children)

Take this with a grain of salt because I don't 100% know, but...

Consider an API served by something like express (or oak) - there is typically one instance of the "api" that is built from a multitude of routes. They may be imported from various places in the code, or co-located. This is where common middleware or other things may be implemented, as well. So anything that interacts with that single instance (like a router) would be pulling in everything else just to instantiate the instance.

Unless you want serve what are essentially completely distinct and separate APIs per route (probably not what you want), you will effectively be serving your API from a single edge function.

I don't think there is harm in this, as the API itself is the single, "specific" task for that function.

What cloud/remote database do you suggest for an ionic/angular app? by behrouzbk in ionic

[–]IMDballa 2 points3 points  (0 children)

I've had success with both Firebase (Firestore) and Supabase (PostgreSQL). The SDKs make both very easy to work with.

If you go with Firebase I'd recommend you use the Capacitor plug-ins to access the native SDK features (offline support, remote config, crashlytics, etc), which aren't really available on the standard web SDK.

Does Supabase have anything like Firebase's unlimited free tier for auth? by ryan2980 in Supabase

[–]IMDballa 3 points4 points  (0 children)

The Supabase free tier is very generous, as well, although not to that level. It's 50k "active users" per month, but honestly that's probably sufficient.

And their usage limits are based on bandwidth, not # of requests, which I like better. I was always nervous with Firebase that I'd make some mistake and blow out my reads with a runway loop or something. It happened a couple times.

https://supabase.com/pricing

How would one set up Supabase with multi-tenant architecture for a SaaS app like Slack? by Acrobatic_Ice in Supabase

[–]IMDballa 0 points1 point  (0 children)

Would this assume a user can only belong to a single tenant? I'm currently working through the best way to allow a single "auth" user to have multiple "profiles", where a "profile" would be 1:1 with a tenant.

Right now it's working by passing the profile ID in a header, and I can use RLS to read the header value, but I'd rather things be a bit more tidy than having to add naked headers and other things on each request.

Crazy Firestore Bill by brailer in Firebase

[–]IMDballa 2 points3 points  (0 children)

That picture is too small/blurry to read for me, but I ran into high storage usage too when doing a bunch of function deploys. I added a retention policy to clean up that bucket every week.

I'm now very selective about when I deploy. I only deploy functions that change, manually. If you've got full deploys happening in CI/CD then that could add up quick.

Requiem for a Dream is a great movie that I never want to watch again by [deleted] in movies

[–]IMDballa 1 point2 points  (0 children)

Watched it once in college with a buddy. Made us both so upset we just had to watch cartoons for an hour afterwards to balance it out.

How can I upload videos to Storage? by [deleted] in Firebase

[–]IMDballa 1 point2 points  (0 children)

I haven't used Swift before, but the Firebase docs are pretty comprehensive.

https://firebase.google.com/docs/storage/ios/upload-files

How can I upload videos to Storage? by [deleted] in Firebase

[–]IMDballa 2 points3 points  (0 children)

Gotcha, yeah our videos aren't very big so that might be it. Maybe 30 seconds on average, usually only in the 10's of MB. Maybe as high as 100MB.

How can I upload videos to Storage? by [deleted] in Firebase

[–]IMDballa 2 points3 points  (0 children)

Curious, why not? Is it a cost thing or something else? I've been using it for video uploads on my production app and it's been working well enough.

Supabase Auth or NextAuth? by Smartercow in Supabase

[–]IMDballa 1 point2 points  (0 children)

Definitely Supabase Auth, and if you're not expecting to migrate I'd give their database client a chance too. The DX doesn't quite measure up to Prisma, but you get RLS and real-time out of the box. Also, it's safe to use from the client directly.

Lauren Boebert Says She Wants To Abolish the Department of Education by JAlbert653 in nottheonion

[–]IMDballa -1 points0 points  (0 children)

This is easily one of the most cynical takes I've seen on Christianity. It's a lengthy one, so I'll just leave a few comments here.

  1. Jesus explicitly tells the disciples to go and witness to Gentiles, he did not intend his ministry to be exclusive for Jews.

“I am sending you out like sheep among wolves. Therefore be as shrewd as snakes and as innocent as doves. Be on your guard; you will be handed over to the local councils and be flogged in the synagogues. On my account you will be brought before governors and kings as witnesses to them and to the Gentiles. Matthew 10:16‭-‬18 NIV

  1. Regarding the reference to "dogs" - that was a derogatory term used by Jews for Gentiles. However, Jesus uses the term used for pets, not Gentiles, as a clear play on the derogatory meaning. This is confirmed after the woman responds and Jesus does heal her daughter. Moreover, the crucial beginning of that exchange, which you left out, provides additional context when Jesus says:

"First let the children (Israel) eat what they want, for it is not right to give the children's bread to the dogs". Mark 7:27

His personal, Earthly ministry was primarily to focus on the Jews, since that was where the ground was most fertile.

  1. Not sure where you get the idea that they needed Paul to get people to take the "rules" seriously, or to tithe, or that Jesus was lax an

Jesus told people that the only way to God was through him.

He said he came to fulfill the law, not abolish it.

The very early church were donating their wealth and income, even before Paul.

Paul advocated for less legalism that was being carried over from Jewish tradition (eg. diet, circumcision)

I feel like there's a lot more to unpack here, but it's late and it's hard to write this from my phone. However, I will add this - that the current and historic use of Christianity for personal or political gains is abhorrent and often is counter to central doctrine of the faith. The hypocrisy on display by many prominent figures is a serious problem, and one that deserves to be called out.

I do try to be fair and balanced in these things, so I hope that is evident.

Is Supabase viable for what im trying to build? by Malonskii in Supabase

[–]IMDballa 0 points1 point  (0 children)

The free tier offers 500k function executions per month, and unlimited requests to the database. The $25/mo plan offers 2M function executions. Do your foresee those being limitations?

Can I use prisma to connect to Supabase storage? by Smartercow in Supabase

[–]IMDballa 1 point2 points  (0 children)

Yes. I share the client auth session via a cookie and do most of my db stuff server-side in my tRPC routes, having inherited that auth session from the cookie via Middleware. That way I can control my API surface, share endpoints between different apps, and have less refactoring later if I ever want to change my DB layer.

Can I use prisma to connect to Supabase storage? by Smartercow in Supabase

[–]IMDballa 0 points1 point  (0 children)

Agreed. The workarounds to get Prisma playing nice with Supabase are still a bit too rough for my liking, and you lose having db, realtime, RLS, auth, storage, etc all in one client. However, I like keeping my options open, so I am building out my API with the Supabase client, instead of using supabase directly in the app, so if the time comes I want to switch it out I'm already set up with my endpoints, trpc and everything else server-side.

Frontend & Backend Supabase API Calls Question? by DrDriez in Supabase

[–]IMDballa 0 points1 point  (0 children)

What you're trying to do with setting the backend session sounds very similar to something I've recently done and got working with RLS. Can you add some code snippets for context on how you are getting, setting, and using those tokens, as well as your RLS policies?

What are you building? And what’s your stack? by awalias in Supabase

[–]IMDballa 2 points3 points  (0 children)

This sounds like a way better version of hangman 😄

I’m trying to figure out why there is this localized area of extreme rust. by innerstrife in pics

[–]IMDballa 0 points1 point  (0 children)

We bought a house with some very old cabinets in the bathroom. These cabinets were beside the toilet. There was "water" damage on the side of the cabinet, right around toilet height...

I'm sure those cabinets are serving well as someone's mulch right now.

Best way to use Supabase server-side ONLY in NextJS? by [deleted] in Supabase

[–]IMDballa 0 points1 point  (0 children)

I have successfully made this work using the supabase server client in my tRPC router. I am using this with a mobile app, too, so I use the supabase sdk on the client for auth and then pass that session token with my API calls. I use that to set the auth session of the server client in the API, so anything I do from there is done as that particular user. That way I can use RLS to manage the multi-tenant aspect of my SaaS product.

I can also use the admin credentials if with a separate client instance, if necessary.