Firebase Project Setup
Overview
This sub-skill guides initializing a new Firebase project with proven architecture patterns. It handles Firebase CLI setup, architecture decisions, emulator configuration, and initial project structure.
Key principles:
- Use TypeScript for all functions
- Configure emulators from the start
- Choose architecture patterns early (hosting, auth, functions, security)
- Set up testing infrastructure immediately
When This Sub-Skill Applies
- Starting a brand new Firebase project
- Setting up Firebase for the first time in a repository
- User says: "new firebase project", "initialize firebase", "firebase init", "set up firebase"
Do not use for:
- Adding features to existing projects →
firebase-development:add-feature
- Debugging existing setup →
firebase-development:debug
Architecture Decisions
Use AskUserQuestion to gather these four decisions upfront:
1. Hosting Configuration
- Single Site - One hosting site, simple project
- Multiple Sites (site:) - Multiple independent URLs
- Multiple with Builds (target:) - Multiple sites with predeploy hooks
Reference: docs/examples/multi-hosting-setup.md
2. Authentication Approach
- API Keys - MCP tools, server-to-server, programmatic access
- Firebase Auth - User-facing app with login UI
- Both - Firebase Auth for web + API keys for tools
Reference: docs/examples/api-key-authentication.md
3. Functions Architecture
- Express API - Many related endpoints, need middleware, RESTful routing
- Domain Grouped - Feature-rich app with distinct areas (posts, admin)
- Individual Files - Independent functions, maximum modularity
Reference: docs/examples/express-function-architecture.md
4. Security Model
- Server-Write-Only (Preferred) - Cloud Functions handle all writes
- Client-Write - High-volume writes, need fastest UX, complex rules
Reference: docs/examples/firestore-rules-patterns.md
##...