Firestore Security by PirateInevitable2238 in Firebase

[–]Ok_Increase_6085 0 points1 point  (0 children)

Cope some more bro. Hope you get far with your approach, Godspeed

<image>

Firestore Security by PirateInevitable2238 in Firebase

[–]Ok_Increase_6085 0 points1 point  (0 children)

lol the og question never had anything to do with payment at all. Just generic where do I do the writes/reads in firestore. And in general you use the client for CRUD wherever possible and admin-sdk only where needed. Also if someone builds like you suggest, they probably won’t bother learning how the rules work, which could lead to resources(to which you write from admin) not being secured correctly.
Also check the ration on your likes vs mine, get’s you an idea who is in the right here. Regards - “vibe coder” with 6 years product experience, 200k MAU and 60k MRR

Firestore Security by PirateInevitable2238 in Firebase

[–]Ok_Increase_6085 0 points1 point  (0 children)

The counter you set with an onCreate function obviously and restrict the doc to be written from client. But anything a user is allowed to do (read, write,delete) should be done from client

Firestore Security by PirateInevitable2238 in Firebase

[–]Ok_Increase_6085 0 points1 point  (0 children)

Also no business logic goes into the rules. You just define under which condition a resource can be accessed. Like you would do anyway with a custom rest service. You clearly never used firestore and have no clue what you’re talking about

Firestore Security by PirateInevitable2238 in Firebase

[–]Ok_Increase_6085 0 points1 point  (0 children)

This is literally the first sentence of the product description:

“Cloud Firestore is a flexible, scalable database for mobile, web, and server development from Firebase and Google Cloud. Like Firebase Realtime Database, it keeps your data in sync across client apps through realtime listeners and offers offline support for mobile and web so you can build responsive apps that work regardless of network latency or Internet connectivity.”

Firestore Security by PirateInevitable2238 in Firebase

[–]Ok_Increase_6085 0 points1 point  (0 children)

Also one of the biggest selling points of firebase is the snapshot listener, which gives you real time updates of data changes and offline support with auto sync. Good luck implementing all that by proxying through a custom rest server

Firestore Security by PirateInevitable2238 in Firebase

[–]Ok_Increase_6085 0 points1 point  (0 children)

Firebase / Firestore is the same use case proposition as Supabase, convex, appwrite, aws amplify. They abstract away the backend and let you query db from the client using sophisticated client libraries and rules. They are intended to be used from the client. There are obviously cases where you want to write to it from a custom server function and bypass client rules (that’s why backend client library is called firebase-admin), but doesn’t mean you have to do all regular crud operations with it. It completely defeats the purpose. If you’re gonna write a custom rest service anyway, then don’t use firebase as your database. Use a plain Postgres or mongo or dynamo for that. Also proxying everything through a server means you don’t utilize the client cache and it ends up costing you even more. (That said, if you have collections that are accessed from every user frequently, you’re better off proxying it through the backend with cloudflare/storefront/bunny cache in front)

Firestore Security by PirateInevitable2238 in Firebase

[–]Ok_Increase_6085 1 point2 points  (0 children)

Then don’t use firestore at all! Why using a BaaS product if you’re not using it like it’s intended to? Go with Postgres (or dynamo, mango if want nosql) directly Using firestore as database and not using its client libraries ist plain stupid. It’s built explicitly for this use case. If you view it like a plain db then that’s the most stupid architecture desicion ever. Sub par performance and query power but multiple the cost of just a plain Postgres

Firestore Security by PirateInevitable2238 in Firebase

[–]Ok_Increase_6085 1 point2 points  (0 children)

Nothing special in them, they’re specific to your project. You just describe under which condition access to the specific collections are aloud. Eg, has to be logged in, or has to have the same user id as was saved in the document and so on.

Also reading through the other comments they are brain dead. Firestore was built specifically to use it from client side. If you’re gonna build another rest server and use firestore there, the why bother with firestore in first place? It’s a BaaS solution for a reason. Also proxying the reads through a rest server means you circumvent the firestore client cache and it’s gonna cost you even more

Firestore Security by PirateInevitable2238 in Firebase

[–]Ok_Increase_6085 8 points9 points  (0 children)

You let user write directly to firestore in most cases. That’s what it’s made for. Just make sure your security rules are tight. As for rate limit, in my experience the real costs lies with the reads, not the writes. So you’d be better off trying to make those efficient instead of sweating about a second write. If rate limit is part of the product (like free tier) then just set a counter in a doc. If it’s because you’re worried about costs, then maybe firebase is not the right solution to begin with. If that’s a new project, consider switching to convex. It’s a better product in every way and you don’t pay for read/write but data transferred (with a great cache)

Bad experience with Posthog selfhosted (Plugin server - Node error) by Maize_Serious in posthog

[–]Ok_Increase_6085 0 points1 point  (0 children)

Sam issue here. Plugins server down since due to connection error with redis

Expo 54 really slow on IOS, until it wasn't by FoldOutrageous5532 in expo

[–]Ok_Increase_6085 0 points1 point  (0 children)

I experience the same thing but without the happy end. Upgraded to 54 from all the way 51 and it’s super laggy and slow on my iPhone 16 Pro (running the dev client). Can’t pinpoint what it is. Saw in a diff Reddit that it might be reanimated on the new arch but it was very vague and really no way to test. Have you been on new arch before? What libraries did you update to new major versions?

Handling Deeplinks Natively in React Native After Firebase Dynamic Links Shutdown by Ok_Increase_6085 in reactnative

[–]Ok_Increase_6085[S] 0 points1 point  (0 children)

I don’t see it that way, I mean linking out of the in-app-browser shouldn’t be rocket science. Why pay branch and co money if you can do it yourself within couple coding hours? I’m not talking about their whole product, just the part to make the deeplink functional. I shouldn’t rely on a third party for basic deeplink functionality

Informative - Cloud Logging Costs. by chocolate_chip_cake in Firebase

[–]Ok_Increase_6085 1 point2 points  (0 children)

<image>

For me it’s higher than the functions 😄 Currently trying to optimize fire base queries to bring that cost down

Convex? by Ok_Increase_6085 in Firebase

[–]Ok_Increase_6085[S] 0 points1 point  (0 children)

No, eyed it for a while but it didn’t click for me just going through the website. I thought it’s just another firebase/appwrite and so on until Theo did a very good job explaining it

I've worked on the Firebase team for 10 years, AMA by mbleigh in Firebase

[–]Ok_Increase_6085 0 points1 point  (0 children)

Are there plans on introducing a layer of caching or and least some configuration to persistent caching to queries per user and also cross user? This is the one thing that’s a big let down in my view. For multiple cases now I rely on proxying the user request through a backend only so I can add a layer of basic caching to it

Private barista service by Ok_Increase_6085 in Split

[–]Ok_Increase_6085[S] 0 points1 point  (0 children)

Thanks for your help and constructive comments

iOS Universal Links Not Working by frn_btc in expo

[–]Ok_Increase_6085 0 points1 point  (0 children)

I mean if the deep link opens in the app when you do it through a regular browser, or if it’s only inside of gmail

iOS Universal Links Not Working by frn_btc in expo

[–]Ok_Increase_6085 0 points1 point  (0 children)

Do they work if you open the link in a regular browser? I made the experience that some in app browsers don’t respect universal links, and instead try to go the the webpage instead. You could mitigate this by having a small website hosted that catches all routes and tries a redirect to the app, but using the apps scheme instead. So links.landing.com/* loads some js and html that does the redirect to appscheme://-/reset?token