-
Notifications
You must be signed in to change notification settings - Fork 431
Add a README for the kits directory #2976
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+82
−0
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
3f4e49e
Add a README for the kits directory
IzaakGough 61ff5b7
Update kits/README.md
IzaakGough 1098242
Update kits/README.md
IzaakGough b2c2b43
chore: use ID instead of id and use - placeholder
IzaakGough c7a6c9a
chore: change wording in kit definition section
IzaakGough File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,80 @@ | ||
| # Firebase Function Kits | ||
|
|
||
| This directory contains the source for Firebase Function Kits. A kit is a | ||
| Firebase Extension repackaged as an npm package that you add to your own | ||
| Firebase Functions codebase and deploy into your own project. | ||
|
|
||
| While an extension is installed as a managed instance configured through the | ||
| Firebase console or CLI, a kit is code you own: you install the package, export | ||
| the functions you want from your functions entry file, configure it with a | ||
| `.env`, and deploy with `firebase deploy`. There is no hosted version, so the | ||
| functions run in your project, under your service account, on your deployment | ||
| schedule. That also means you can read the source, fork it, or import the | ||
| package's `./lib` entry point and register the triggers yourself. | ||
|
|
||
| Each directory here contains the source code for a kit and a README explaining | ||
| how it works, including the roles it needs, the settings it reads, and the | ||
| functions it exports. | ||
|
|
||
| ## Available kits | ||
|
|
||
| | Kit | Description | | ||
| |---|---| | ||
| | [`bigquery-firestore-export`](bigquery-firestore-export) | Reverse-sync rows from BigQuery into Firestore | | ||
| | [`delete-user-data`](delete-user-data) | Delete user data across Firestore, RTDB, and Storage on account deletion | | ||
| | [`firestore-bigquery-export`](firestore-bigquery-export) | Stream a Cloud Firestore collection to BigQuery | | ||
| | [`firestore-bundle-builder`](firestore-bundle-builder) | Build and serve Firestore data bundles | | ||
| | [`firestore-counter`](firestore-counter) | Distributed, sharded counters for Firestore | | ||
| | [`firestore-genai-chatbot`](firestore-genai-chatbot) | Conversational GenAI chatbot backed by Firestore | | ||
| | [`firestore-incremental-capture`](firestore-incremental-capture) | Incremental point-in-time capture of Firestore changes | | ||
| | [`firestore-send-email`](firestore-send-email) | Send emails based on documents written to Firestore | | ||
| | [`firestore-translate-text`](firestore-translate-text) | Translate text written to a Firestore collection | | ||
| | [`firestore-vector-search`](firestore-vector-search) | Vector similarity search over a Firestore collection | | ||
| | [`rtdb-limit-child-nodes`](rtdb-limit-child-nodes) | Limit the number of child nodes under a Realtime Database path | | ||
| | [`speech-to-text`](speech-to-text) | Transcribe Cloud Storage audio with Cloud Speech-to-Text | | ||
| | [`storage-resize-images`](storage-resize-images) | Resize images uploaded to Cloud Storage | | ||
|
|
||
| ## Using a kit | ||
|
|
||
| Kits need Firebase CLI 15.25.1 or later with the `kits` experiment enabled: | ||
|
|
||
| ```sh | ||
| firebase experiments:enable kits | ||
| ``` | ||
|
|
||
| Install the package into your functions codebase, export the functions you want | ||
| from your entry file, and add a `kit` stanza to `firebase.json` naming the | ||
| instances to deploy: | ||
|
|
||
| ```json | ||
| { | ||
| "functions": [ | ||
| { | ||
| "source": ".", | ||
| "kit": "firestore-send-email", | ||
| "instances": { | ||
| "default": "." | ||
| } | ||
| } | ||
| ] | ||
| } | ||
| ``` | ||
|
|
||
| Each instance ID maps to the directory holding that instance's `.env`, and the | ||
| CLI prefixes every function name with `kit-<instance-id>-`, so one kit can run | ||
| several independently configured instances side by side. See each kit's README | ||
| for its exports, its settings, and the roles the CLI grants on deploy. | ||
|
|
||
| ## Migrating from an extension | ||
|
|
||
| A kit ports the extension's behavior, but it is not a drop-in replacement for | ||
| an installed instance. Deployment still handles the platform setup for you: Firebase | ||
| CLI 15.23.0 or later creates the runtime service account, grants it the roles | ||
| the kit needs, enables the required APIs, and connects any secrets. What moves | ||
| to you is the configuration itself, so check the kit's README against your | ||
| installed instance's settings before deploying, rather than copying the `.env` | ||
| across unchanged. | ||
|
|
||
| Extensions themselves are unaffected and remain available. To learn more about | ||
| Firebase Extensions, including how to install them, visit the | ||
| [Firebase documentation](https://firebase.google.com/docs/extensions). | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.