Generate Firebase Cloud Functions with triggers, authentication, and Firestore
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
Replace these placeholders with your own content before using the prompt.
[{PROJECT_TYPE][{FUNCTIONS][{RUNTIME]