How to associate Firestore documents to a user in Flutterflow

Поділитися
Вставка
  • Опубліковано 5 жов 2024
  • Got a request via email asking how to let the user add favorites of a certain collection, such as services or products, to their account. Thought more people would find this helpful so recorded this video. Nothing more to say about it, just watch the video.
    Here is my email if you got any question:
    leomcmillion@gmail.com
    #flutterflow #firebase #firestore #documents #user #webdevelopment #appdevelopment #developer #education #learning #tutorial #ux #ui

КОМЕНТАРІ • 11

  • @Martininindia
    @Martininindia Місяць тому

    Had to watch this 4 times, but finally got it. Its so simple really. Data goes in, data comes out. I was working with Claude to do it with code and was so tiring and useless.

  • @DjDavzZ
    @DjDavzZ 5 місяців тому +1

    Great tutorial. The only thing i would be aware of when creating references like this, is the amount of queries you make. The cost will increase and not be scaleable.
    This is because you apply normalization logic from SQL to a noSQL database. I would advise when using firestore to denormalize the data, even though it creates more maintenance.
    Essentially duplicating your data multiple places to minimize read/write costs.

    • @leomcmillion
      @leomcmillion  5 місяців тому +1

      Thanks for the insight! Really great point, definitely something to fix if this data where to be used multiple times in the app by a user. And/or if the app has no limit on the number of items in the sub-list. Should have mentioned this in the video. Will mention this in my next video.
      However, if someone is building a relatively small/medium sized app and they have a limit on how many documents your app will allow in the users sub-list. Then it is not that big of a deal.
      For example I use this method for associating "members" (user documents) in a team document for my awsme ai app. A team normally has between 0-3 team members, so not really affecting the cost at all.

  • @adeterminedpolarbear
    @adeterminedpolarbear 6 місяців тому +1

    can you please make a more in depth video on firestore rules? also IAP/subscriptions with revenuecat? thanks!

    • @leomcmillion
      @leomcmillion  6 місяців тому

      Here is a more in depth video about firestore security rules: ua-cam.com/video/VUxgra9yISQ/v-deo.htmlsi=2gwqGlyHzIbkhYYR
      It could be a while before I upload a video about revenuecat since I always use strip for subscriptions.

  • @iam-peacemaker
    @iam-peacemaker 4 місяці тому

    Great tutorial! but I think if an item has already been added to the favorites list and user clicks on add to favorite again, we remove the item from the fav list and update the fav icon color. So can I go about that?

    • @leomcmillion
      @leomcmillion  4 місяці тому

      You can in the icon click logic check if the current item is already in your fav list, and based on that either remove it or add it.

  • @ti9502
    @ti9502 6 місяців тому +1

    Shows how to use Cloud Functions within FLutterflow?

    • @leomcmillion
      @leomcmillion  6 місяців тому +2

      Great suggestion, can try and upload a video about cloud function in the near future.

    • @leomcmillion
      @leomcmillion  5 місяців тому +1

      Here is my most recent videos on this (I show some real applications of cloud functions and breifly how the work): ua-cam.com/video/43LHq8-AxGg/v-deo.htmlsi=pTvgPF-b9Wn4oz5a
      And here is a other tutorial on youtube, showing more in detail how a cloud fucntion works: ua-cam.com/video/9JsR0aqA9K0/v-deo.htmlsi=1TFmm-GMzm7ATjHS

    • @ti9502
      @ti9502 5 місяців тому +1

      @@leomcmillion Thank you my friend ;)