Cloud Firestore Integration
Elite Quiz uses Cloud Firestore to store user data and game progress. This page explains how to set up and configure Cloud Firestore for your application.
Enabling Cloud Firestore
Follow these steps to add cloud firestore:
- Go to your Firebase console and select your project
- Click on "Firestore Database" in the left navigation menu
- Click "Create database"
- Choose "Start in production mode" or "Start in test mode" based on your needs
- Select a location for your database (choose the region closest to most of your users)
- Click "Enable"
Security Rules
For production environments, you should set up proper security rules:
- Go to the "Rules" tab in your Firestore Database dashboard
- Update the security rules to secure your application
Here's a security rules for Elite Quiz:
rules_version = '2';
service cloud.firestore {
match /databases/{database}/documents {
match /{document=**} {
allow read, write: if request.auth.uid != null;
}
}
}