Skip to content

Commit a0b6c83

Browse files
Improve Firestore initialization guide (#9189)
* Improve Firestore initialization guide - Update deploy command to use --only firestore flag for targeted deployment - Add comprehensive security check section before deployment - Improve verification and testing workflow - Enhance security configuration guidance - Add detailed next steps for authentication and user management - Polish overall structure and readability * Update src/mcp/resources/guides/init_firestore.ts Co-authored-by: Michael Bleigh <[email protected]> * Fix formatting for Firestore console access instructions Updated instructions for accessing Firestore in the Firebase console. --------- Co-authored-by: Michael Bleigh <[email protected]>
1 parent 820cb41 commit a0b6c83

File tree

1 file changed

+24
-11
lines changed

1 file changed

+24
-11
lines changed

src/mcp/resources/guides/init_firestore.ts

Lines changed: 24 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,22 +17,35 @@ export const init_firestore = resource(
1717
### Setup Firestore Database
1818
1919
**Database Setup:**
20-
- Set up Firebase Firestore as the primary database for the application
21-
- Implement client code for basic CRUD operations using Firestore SDK
22-
- Run \`firebase deploy\` command to provision the database automatically
20+
- Configure Firebase Firestore as the primary database for the application
21+
- Implement client code for basic CRUD operations using the Firestore SDK
22+
- Run \`firebase deploy --only firestore\` to provision the database automatically
2323
- Use production environment directly (avoid emulator for initial setup)
2424
25+
**Pre-Deployment Security Check:**
26+
- **Important**: Before running \`firebase deploy --only firestore\`, check if the project has open security rules
27+
- If open security rules are detected, show developers the current rule content
28+
- Recommend keeping open rules for a maximum of 24 hours for development purposes only
29+
- Explain that open rules are acceptable for development but must be restricted for production
30+
31+
**Deployment:**
32+
- Run \`firebase deploy --only firestore\` to provision the database automatically
33+
2534
**Verification & Testing:**
26-
- Only proceed to verification after running the \`firebase deploy\` command
27-
- Guide developers to verify database creation at the [Firebase Console](https://console.firebase.google.com/)
28-
- Navigate to "Firestore Database" in the left navigation to confirm database creation
29-
- Ask developers to test their application and confirm they can see test data in the console
30-
- Only proceed to the next step after confirmation
35+
- Only proceed with verification after successfully running \`firebase deploy --only firestore\`
36+
- Guide the user to visit \`https://console.firebase.google.com/u/0/project/{PROJECT_ID}/firestore\` where \`{PROJECT_ID}\` is the project they're currently using (or use \`_\` if project id is unknown).
37+
- Have developers test their application functionality and verify test data appears in the console
38+
- Only proceed to the next step after confirming successful database setup and data visibility
3139
32-
**Security:**
33-
- Recommend implementing authentication if the application handles sensitive user data
40+
**Security Configuration:**
3441
- Guide users to navigate to "Firestore Database" → "Rules" tab to configure security rules
35-
- **Warning**: Never make Firestore security rules public (allowing read/write without authentication)
42+
- **Critical Warning**: Never make Firestore security rules public (allowing read/write without authentication)
43+
- Ensure security rules are properly configured and tested before moving to production
44+
45+
**Next Steps:**
46+
- **Authentication**: Recommend implementing Firebase Authentication if the application handles sensitive user data or has open security rules
47+
- **User Management**: Implement user sign-up and login features with Firebase Authentication to establish proper data validation and access controls
48+
- **Security Rules**: Configure user-based security rules based on your application's specific requirements
3649
`.trim(),
3750
},
3851
],

0 commit comments

Comments
 (0)