Firestore Explorer for VS Code
Firestore Explorer is a VS Code extension that provides a seamless interface for browsing, editing, and managing your Firebase Firestore databases directly within
Features
- Real-time Database Access: Browse and edit Firestore documents in real-time
- Native File System Integration: Work with Firestore documents as if they were local files
- Hierarchical Navigation: Explore collections and documents in a tree view
- Document Creation and Editing: Create and edit documents with VS Code's powerful editor
- Real-time Sync: Changes synchronize automatically in real-time
- Secure Authentication: Uses Firebase service account for secure access
Getting Started
1. Install the Extension
- Open VS Code
- Go to Extensions view (Ctrl+Shift+X)
- Search for "Firestore Explorer"
- Click "Install"
2. Firebase Setup
Firestore Explorer requires a Firebase project with Firestore enabled:
- Create a Firebase project at Firebase Console
- Enable Firestore database in your project
- Generate a service account key:
- Go to Project Settings > Service Accounts
- Click "Generate new private key"
- Save the JSON file securely
- Click on the Firestore Explorer icon in the sidebar
- Click the settings gear icon to configure Firebase
- Paste the entire content of your service account JSON file
- You're ready to start exploring your Firestore database!
Using Firestore Explorer
Exploring Your Database
The Firestore Explorer sidebar provides a hierarchical view of your Firestore database:
- Collections appear as folders
- Documents appear as files
- Click on a document to view/edit its content
Creating New Documents
- Click the "New Document" button in the explorer toolbar, or
- Right-click on a collection and select "New Document"
- Enter a name for your document
- Edit the document content (in JSON format)
- Save the document to update Firestore
Creating New Collections
- Click the "New Collection" button in the explorer toolbar, or
- Right-click on the root or a document and select "New Collection"
- Enter a name for your collection
Managing Documents and Collections
Right-click on documents or collections to:
- Rename them
- Delete them
- Create new items inside them
Real-time Sync
All changes made to documents through Firestore Explorer are automatically synchronized with your Firestore database in real-time. Similarly, changes made to your database from other sources will be reflected in the explorer.
Working with Documents
Documents are presented as JSON files, allowing you to:
- Edit document fields
- Add new fields
- Remove fields
- Format document structure
- Save to update Firestore
Authentication and Security
Firestore Explorer uses Firebase Admin SDK with your service account credentials for authentication. Your credentials are securely stored in VS Code's secret storage.
Best Practices
- Keep service account secure: Never share your service account credentials
- Organize collections: Use a consistent naming convention for collections
- Document structure: Maintain consistent document structure within collections
- Regular backups: Regularly backup important Firestore data
Troubleshooting
- Connection Issues: Ensure your service account has proper permissions
- Firestore Not Enabled: Make sure Firestore is enabled in your Firebase project
- Configuration Reset: Use "Reconfigure Firebase" from the command palette if needed
License
This extension is licensed under the MIT License.