Skip to main content

Other Project Files

File or AreaPurpose
external.package.jsonAdd npm packages to your app. Client-side packages should go in the web object, and server-side packages should go in the node object. Use the same syntax as package.json dependencies.
functions/src/index.tsAdd custom Cloud Functions. Use this to add custom server operations to your app. See Custom Cloud Functions below.
Firebase ExtensionsIn addition to Cloud Functions above, you can add Firebase Extensions to extend your app's server functionality.
testsWrite tests for your app. Tests are powered by Vitest.
functions/prompts/chat.promptCustomize the system prompt used for your app's AI chat.
firebase-rules/firestore.custom.rulesAdd custom Firestore Security Rules.
firebase-rules/firestore.custom.indexes.jsonAdd custom Firestore indexes.
ops.jsRun back-end operations on your data.
remoteconfig.template.jsonConfigure Firebase Remote Config.
firebase.hosting.jsonEdit the headers, including CSP, for the Admin UI app.
.migrationReview the record of migration operations for schema updates.
.devcontainerConfigure GitHub Codespaces for cloud development.
warning

Custom Cloud Functions​

Anything at module scope in a function file is shared between tenants. Keep per-tenant state inside the function handler. Call initializeStoker inside the handler too, never at module scope.

Module scope is still the right place for tenant-agnostic setup such as defineSecret or a shared third-party SDK client.