Firebase Cloud Functions Template

Generate Firebase Cloud Functions with triggers, authentication, and Firestore

6/11/2026
Prompt
Create Firebase Cloud Functions for:

Project Type: {{PROJECT_TYPE}}
Functions Needed: {{FUNCTIONS}}
Runtime: {{RUNTIME}} (Node.js/Python)

Generate complete Firebase Functions setup:

1. **Project Structure:**
   - functions/src/index.ts
   - functions/src/triggers/
   - functions/src/callable/
   - functions/src/scheduled/
   - functions/src/utils/

2. **HTTP Functions:**
   - Express app integration
   - CORS handling
   - Request validation
   - Response formatting
   - Error handling

3. **Callable Functions:**
   - Function definition
   - Authentication context
   - Data validation
   - Error responses

4. **Firestore Triggers:**
   - onCreate
   - onUpdate
   - onDelete
   - onWrite
   - Document path patterns

5. **Auth Triggers:**
   - onCreate user
   - onDelete user
   - Custom claims

6. **Scheduled Functions:**
   - Pub/Sub schedule
   - Cron expressions
   - Time zone handling

7. **Storage Triggers:**
   - Object finalized
   - Object deleted
   - Image processing

8. **Configuration:**
   - Environment config
   - Secret management
   - Runtime options
   - Memory/timeout settings

9. **Deployment:**
   - firebase.json config
   - Deployment groups
   - Emulator setup
   - CI/CD integration

10. **Testing:**
    - Firebase test SDK
    - Emulator testing
    - Mock functions

Include proper error handling and logging.

Or press ⌘C to copy

Variables (3)

Replace these placeholders with your own content before using the prompt.

[{PROJECT_TYPE][{FUNCTIONS][{RUNTIME]

Ready to use?

Copy and paste into your favorite AI tool

Test this prompt live

Try it in our AI Playground with Claude

Open Playground

Explore more Coding prompts

Browse Coding

Command Palette

Search for a command to run...