JohnCoene / firebase

Google FIrebase for shiny
https://firebase.john-coene.com
GNU Affero General Public License v3.0
171 stars 26 forks source link

Feature request - Firestore #25

Open fsty opened 2 years ago

fsty commented 2 years ago

Hello! There is any plan to add support for Firestore database ?

JohnCoene commented 2 years ago

Sorry, only just saw this. The support for Firestore is difficult to integrate with R given how it works. I tried, it's not impossible but makes for a very ugly API

udurraniAtPresage commented 1 year ago

Sorry, only just saw this. The support for Firestore is difficult to integrate with R given how it works. I tried, it's not impossible but makes for a very ugly API

It would be awesome if firestore feature is available even with an ugly API. Thanks for your package.

emillykkejensen commented 1 year ago

Have you thought about integrating something like this: https://gabrielcp.medium.com/introduction-to-working-with-firestore-in-r-99443489b01b ?

durraniu commented 1 year ago

Have you thought about integrating something like this: https://gabrielcp.medium.com/introduction-to-working-with-firestore-in-r-99443489b01b ?

Yes, I have used the functions from that post and also wrote my own for query filtering. It would be awesome if {firebase} also has these available.

JohnCoene commented 1 year ago

The issue is not technical but how we manage to nicely wrap the query API.

We cannot do HTTP requests, {firebase} is all based on the official JavaScript SDK's and I think it should remain like this.

If you anyone has anything to propose in that regard it is more than welcome,

e.g.: take a look at this, I think it shows some of the complexities I hint at.

We need an R API not just around R/shiny (sendCustomMessage) we need to map the firestore ORM in R, and that's a lot of work I'm not sure where to start.

udurraniAtPresage commented 1 year ago

I understand. I'd love to contribute but I have little to no experience with JavaScript.

I guess the best way to go is to use the Cloud Firestore REST API using {httr} as I am doing now.

Thank you for your thorough response.

JohnCoene commented 5 months ago

Initial work on firestore support on a new branch

remotes::install_github("JohnCoene/firebase@firestore")

See this document if you want to try

durraniu commented 5 months ago

This is really cool, thanks @JohnCoene.

I understand that {firebase} won't use HTTP requests. So, if anyone else is interested, I authored this package based on Firestore REST API: https://github.com/Presage-Group/frstore

But {firebase} native solution for Firestore will be awesome.