
FireMongo Bridge
Made by BKR Tools
Sync Firestore collections to MongoDB in real-time with comprehensive data transformation and management APIs.
<10
installs
- Works with
- Cloud Firestore
- Version
- 1.0.7 | Source code
- Tags
- utilities, Database
- License
- Apache-2.0
- Publisher
- BKR Tools
- Report
- Bug
- Abuse
Getting started
Configurable parameters
Resources created
How to install
Billing
How this extension works
FireMongo Bridge Extension - Pre-Installation Guide
π° Pricing Information
This extension uses Firebaseβs pay-per-use pricing model with no fixed monthly cost.
Whatβs Included
- Real-time Firestore to MongoDB synchronization
- Batch processing for existing documents
- Data transformation for Firestore-specific types
- Management APIs for monitoring and control
- Automatic index creation
- Comprehensive error handling and logging
- Connection pooling and performance optimization
Costs
- Cloud Functions: Pay per invocation (~$0.40/million invocations)
- Firestore: Standard read/write costs (~$0.06/100K reads, ~$0.18/100K writes)
- MongoDB: Your MongoDB provider costs (Atlas, self-hosted, etc.)
Cost Estimation Example
For a typical application with:
- 10,000 documents
- 1,000 daily updates
- 100 daily reads
Monthly Cost Breakdown:
- Cloud Functions: ~$0.12
- Firestore Operations: ~$0.05
- Total: ~$0.17/month
Visit Firebase Pricing for detailed pricing information.
π Prerequisites
Required Setup
- Firebase Project: Must have billing enabled
- MongoDB Database: Atlas cluster or self-hosted MongoDB
- Firebase CLI: For local development and testing
- Node.js 20+: For development environment
MongoDB Requirements
- MongoDB 4.4+ (recommended: 6.0+)
- Network access from Google Cloud Functions
- User with read/write permissions
- Sufficient storage for your data
Firebase Requirements
- Blaze (pay-as-you-go) billing plan
- Firestore database enabled
- Cloud Functions API enabled
- Appropriate IAM permissions
π§ What You Need Before Installing
1. MongoDB Connection String
mongodb+srv://username:password@cluster.mongodb.net/database
- Username and password for MongoDB access
- Cluster hostname and port
- Database name
- Connection options (if needed)
2. Collection Planning
Decide on your collection mapping strategy:
{
"users": "firestore_users",
"products": "firestore_products",
"orders": "firestore_orders"
}
3. Sync Strategy
Choose your synchronization mode:
- Real-time: Immediate sync for all changes
- Batch: Manual sync only (for compliance or cost control)
4. Performance Considerations
- Document Size: Large documents may require smaller batch sizes
- Collection Count: More collections = more function invocations
- Update Frequency: High-frequency updates increase costs
- Data Volume: Consider MongoDB storage and performance
π Common Use Cases
1. Analytics and Reporting
- Sync Firestore data to MongoDB for complex analytics
- Use MongoDB aggregation pipelines
- Integrate with BI tools
2. Backup and Compliance
- Create MongoDB backups of Firestore data
- Meet regulatory requirements
- Disaster recovery planning
3. Multi-Database Architecture
- Use Firestore for real-time features
- Use MongoDB for complex queries
- Hybrid application architecture
4. Data Migration
- Migrate from Firestore to MongoDB
- Gradual transition strategy
- A/B testing with both databases
π Security Considerations
MongoDB Security
- Use MongoDB Atlas for managed security
- Enable network access lists
- Use strong authentication
- Consider encryption at rest
Firebase Security
- MongoDB credentials stored as secrets
- No sensitive data in logs
- CORS configured for management APIs
- Input validation on all parameters
Network Security
- MongoDB must be accessible from Google Cloud
- Consider VPC peering for private networks
- Use SSL/TLS for all connections
π Performance Guidelines
Recommended Settings
- Batch Size: 100-500 documents (adjust based on document size)
- Memory: 512MB for real-time sync, 1GB for batch processing
- Timeout: 540 seconds for large collections
- Concurrency: 1000 for real-time sync
Optimization Tips
- Indexes: Enable for better query performance
- Collection Mapping: Use to organize data efficiently
- Batch Processing: Use for large initial syncs
- Monitoring: Watch function logs for performance issues
π¨ Important Notes
Data Consistency
- Real-time sync provides eventual consistency
- Small delays possible during high load
- Use management API to verify sync status
Error Handling
- Failed operations are logged with details
- Automatic retry for transient errors
- Manual recovery options available
Monitoring
- Function logs available in Firebase Console
- Sync status API for monitoring
- Performance metrics in Cloud Functions
Limitations
- Maximum document size: 1MB (MongoDB limit)
- Maximum batch size: 1000 documents
- Function timeout: 540 seconds
- Memory limit: 1GB per function
π Getting Help
Before Installation
- Review Firebase Extensions Documentation
- Check MongoDB Node.js Driver Documentation
- Test MongoDB connectivity from Google Cloud
After Installation
- Use management API to verify setup
- Check function logs for any issues
- Monitor sync status regularly
Support Resources
β Installation Checklist
Before proceeding with installation, ensure you have:
- Firebase project with billing enabled
- MongoDB database accessible from Google Cloud
- MongoDB connection string ready
- Collection mapping strategy planned
- Sync mode decided (real-time vs batch)
- Performance requirements understood
- Security measures in place
- Monitoring strategy planned
π― Next Steps
After installation:
- Configure extension parameters
- Test MongoDB connectivity
- Run initial sync for existing data
- Verify sync status
- Monitor performance and costs
- Set up alerts and monitoring
Ready to install? Proceed to the installation step and configure your extension parameters.