hi everyone! I have been using Plasmic for some weeks, and I absolutely love this builder! I have a quick question on a booking platform that I am building and would love to see if I can get some help/ideas here:
Context: I am using Supabase and Plasmic to work on a barber’s booking app. I have a table for bookings, barbers, services, and hours of operation.
Question: What would be the best way to fetch the available booking slots based on different things:
• Date
• All slots based on the hours of operation table
• Taken slots from the bookings table
• Duration of the service
I will definitely need some custom functions here, but not sure if this should be done via Plasmic or Supabase. I am very new to coding overall, but please let me know if this is not the right forum.
Hi Mauricio, glad to know that you have enjoying Plasmic. I am not sure if I follow your question exactly, but I imagine you would need some custom function, there are some tradeoffs. If you decide to do it in Plasmic by fetching all the information and running the function to find the available slots in some custom code in Plasmic, this can be way slower for your users as they will be downloading a bunch of data that is going to be filtered out by the application, if you know it’s not going to be too much data then it’s fine. If you decide to do in Supabase, you can achieve a faster application as it’s only going to fetch the required data, but this can be a bit more hard as you could need to write some more complex query. Just to be clear the queries that you write in the data source picker they run in the Supabase, so you can write your complex query there. Does it make sense ?
About the right forum, feel free to post in any channel, I would say this is more suited to help or issues , but here it’s fine too