CodeHavenX / MonoRepo

This is a project that aims to provide a scalable architecture for mobile development.
https://cramsan.com/
0 stars 0 forks source link

Investigate how to connect to the FIreStore #27

Open gaaliciA1990 opened 2 months ago

gaaliciA1990 commented 2 months ago

Need a proof of concept for how to READ and WRITE to the firebase Cloud Firestore

https://firebase.google.com/products/firestore https://firebase.google.com/ https://firebase.google.com/docs/firestore

gaaliciA1990 commented 2 months ago

Backend will handle event triggers from Firestore. When a new data point is added to the Firestore DB, we handle triage to:

  1. create a new sheet or update the existing one for that day,
  2. Upload an image with the event ID as the name in the drive

Frontend will talk directly to Firestore for POST/GET requests.

Firestore will be our source of truth that we pull from

gaaliciA1990 commented 2 months ago

Implemented some code for firestore, need to continue testing

https://firebase.google.com/docs/firestore/quickstart?hl=en&authuser=1 https://console.firebase.google.com/u/1/project/edifikana/settings/serviceaccounts/adminsdk

CRamsan commented 2 months ago

Here is some documentation on how to trigger functions form Firestore events: https://cloud.google.com/functions/docs/calling/cloud-firestore#functions_cloudevent_firebase_firestore-java

gaaliciA1990 commented 2 months ago

https://firebase.google.com/docs/admin/setup#java_1

CRamsan commented 2 months ago

This is also an example of how someone created a Kotlin function: https://github.com/GaryLaurenceau/kotlin-google-cloud-function

This can be a good reference for once we need to deploy the code.

github-actions[bot] commented 3 days ago

Stale issue message