Calling Firebase Cloud Functions directly from Dashboard#814
Calling Firebase Cloud Functions directly from Dashboard#814rolivares93 merged 12 commits intomainfrom
Conversation
|
Can we use it (or do we need to use it) from other clients that also want to use firebase?
From: Rodrigo Olivares ***@***.***>
Sent: Friday, February 27, 2026 11:31 AM
To: levante-framework/levante-dashboard ***@***.***>
Cc: Subscribed ***@***.***>
Subject: [levante-framework/levante-dashboard] Firekit into dashboard (PR #814)
Proposed changes
I created a class called FirebaseService to handle cloud-function queries directly from the dashboard. It's just an initial thought, but this PR shows it working. I used a hard-coded mocking query, but if we keep this approach, we can place the queries into separate files as members of subclasses.
https://github.com/user-attachments/assets/3a11cf07-76ff-4138-829d-1395961848c9<https://urldefense.com/v3/__https:/github.com/user-attachments/assets/3a11cf07-76ff-4138-829d-1395961848c9__;!!G92We9drHetJ8EofZw!ZZGXpEvu4AeZnALK497VxESbI-_y56I5nuoD-sHwdrdXpu8jzQ5M4RDnuPR-53Iik5xBMcc38PRqM2dwjBJ5LQRXTnsu$>
Types of changes
What types of changes does this pull request introduce?
* [ ] Bugfix (non-breaking change which fixes an issue)
* [X] New feature (non-breaking change which adds functionality)
* [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
* [ ] Refactor (non-breaking change that does not add functionality but makes code cleaner or more efficient)
* [ ] Tests (new or updated tests)
* [ ] Styles (changes to code styling)
* [ ] CI (continuous integration changes)
* [ ] Other (please describe below)
Additional Notes
…________________________________
You can view, comment on, or merge this pull request online at:
#814<https://urldefense.com/v3/__https:/github.com/levante-framework/levante-dashboard/pull/814__;!!G92We9drHetJ8EofZw!ZZGXpEvu4AeZnALK497VxESbI-_y56I5nuoD-sHwdrdXpu8jzQ5M4RDnuPR-53Iik5xBMcc38PRqM2dwjBJ5LZDi6IqG$>
Commit Summary
* 4cea3b8<https://urldefense.com/v3/__https:/github.com/levante-framework/levante-dashboard/pull/814/commits/4cea3b88295eb923fd9d4c28d58c575c7898b339__;!!G92We9drHetJ8EofZw!ZZGXpEvu4AeZnALK497VxESbI-_y56I5nuoD-sHwdrdXpu8jzQ5M4RDnuPR-53Iik5xBMcc38PRqM2dwjBJ5LWNqpwsm$> new wrapper class to connect to firebase
* 56b3fa0<https://urldefense.com/v3/__https:/github.com/levante-framework/levante-dashboard/pull/814/commits/56b3fa04db53678b09cfb0dffe6d7205d0e4035b__;!!G92We9drHetJ8EofZw!ZZGXpEvu4AeZnALK497VxESbI-_y56I5nuoD-sHwdrdXpu8jzQ5M4RDnuPR-53Iik5xBMcc38PRqM2dwjBJ5Lb1OFxV9$> init new firebase service together with roarfirekit
* 98c219c<https://urldefense.com/v3/__https:/github.com/levante-framework/levante-dashboard/pull/814/commits/98c219cd2f00eb9afffcb9292218c94e6b79dc30__;!!G92We9drHetJ8EofZw!ZZGXpEvu4AeZnALK497VxESbI-_y56I5nuoD-sHwdrdXpu8jzQ5M4RDnuPR-53Iik5xBMcc38PRqM2dwjBJ5LaC3_Wys$> change app name and update mocking query for testing
File Changes
(2 files<https://urldefense.com/v3/__https:/github.com/levante-framework/levante-dashboard/pull/814/files__;!!G92We9drHetJ8EofZw!ZZGXpEvu4AeZnALK497VxESbI-_y56I5nuoD-sHwdrdXpu8jzQ5M4RDnuPR-53Iik5xBMcc38PRqM2dwjBJ5LYfkKyYv$>)
* A src/firestore/index.ts<https://urldefense.com/v3/__https:/github.com/levante-framework/levante-dashboard/pull/814/files*diff-e0d7248e65b088eb8f0e0194feece10327d0c875a3123bb567f15552d07f4b25__;Iw!!G92We9drHetJ8EofZw!ZZGXpEvu4AeZnALK497VxESbI-_y56I5nuoD-sHwdrdXpu8jzQ5M4RDnuPR-53Iik5xBMcc38PRqM2dwjBJ5LXKSERQa$> (210)
* M src/store/auth.ts<https://urldefense.com/v3/__https:/github.com/levante-framework/levante-dashboard/pull/814/files*diff-775915c41f222b3275cda6e221412b4581137d0eadddecc5404c6ddaf3de3378__;Iw!!G92We9drHetJ8EofZw!ZZGXpEvu4AeZnALK497VxESbI-_y56I5nuoD-sHwdrdXpu8jzQ5M4RDnuPR-53Iik5xBMcc38PRqM2dwjBJ5LQZ7IQTH$> (14)
Patch Links:
* #814.patch<https://urldefense.com/v3/__https:/github.com/levante-framework/levante-dashboard/pull/814.patch__;!!G92We9drHetJ8EofZw!ZZGXpEvu4AeZnALK497VxESbI-_y56I5nuoD-sHwdrdXpu8jzQ5M4RDnuPR-53Iik5xBMcc38PRqM2dwjBJ5LfhYWj6l$>
* #814.diff<https://urldefense.com/v3/__https:/github.com/levante-framework/levante-dashboard/pull/814.diff__;!!G92We9drHetJ8EofZw!ZZGXpEvu4AeZnALK497VxESbI-_y56I5nuoD-sHwdrdXpu8jzQ5M4RDnuPR-53Iik5xBMcc38PRqM2dwjBJ5LVx4ehww$>
—
Reply to this email directly, view it on GitHub<https://urldefense.com/v3/__https:/github.com/levante-framework/levante-dashboard/pull/814__;!!G92We9drHetJ8EofZw!ZZGXpEvu4AeZnALK497VxESbI-_y56I5nuoD-sHwdrdXpu8jzQ5M4RDnuPR-53Iik5xBMcc38PRqM2dwjBJ5LZDi6IqG$>, or unsubscribe<https://urldefense.com/v3/__https:/github.com/notifications/unsubscribe-auth/ABJ4N3FMTZVCFY77YWR3RWT4OCLORAVCNFSM6AAAAACWCC6WKCVHI2DSMVQWIX3LMV43ASLTON2WKOZUGAYDENJUGI2DOMA__;!!G92We9drHetJ8EofZw!ZZGXpEvu4AeZnALK497VxESbI-_y56I5nuoD-sHwdrdXpu8jzQ5M4RDnuPR-53Iik5xBMcc38PRqM2dwjBJ5LaVF_V1l$>.
You are receiving this because you are subscribed to this thread.Message ID: ***@***.******@***.***>>
|
|
Visit the preview URL for this PR (updated for commit 13c1911): https://hs-levante-admin-dev--pr814-firekit-into-dashboa-7q8z1687.web.app (expires Fri, 13 Mar 2026 15:12:28 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: 7889bff1da3bcc333d7422b9fc863c65b3962be7 |
|
For example, we are creating non-dashboard tools that we want to have secure access for our partners (the audio approval tool for example). They need to use our auth system as they require the ability to read/write buckets and potentially firestore records. That is a must have capability. |
|
@digital-pro I just updated this PR and I left the auth as it is, so the non-dashboard tools will keep their access also as it is, ok? |
src/helpers/query/administrations.js
Outdated
| families: a.families, | ||
| }; | ||
| // Convert dates to Date objects, handling both timestamp strings and Date objects | ||
| const convertToDate = (dateValue) => { |
There was a problem hiding this comment.
Not directly related to this PR but can you move convertToDate out of here? It is a pure function and can be moved at the same place as getTitle.
asengupta3
left a comment
There was a problem hiding this comment.
Looks good. Can you add to the REAME.md on how to use this new script and build a class and use it for a new set of functions? And also, how to add functions to a class.
|
@rolivares93 can you also update the title to |
asengupta3
left a comment
There was a problem hiding this comment.
This looks great! Thanks @rolivares93
Proposed changes
I created a class called
FirebaseServiceto handle cloud-function queries directly from the dashboard. It's just an initial thought, but this PR shows it working. I used a hard-coded mocking query, but if we keep this approach, we can place the queries into separate files as members of subclasses.Screen.Recording.2026-02-27.at.16.24.53.mov
Types of changes
What types of changes does this pull request introduce?
Additional Notes