Skip to main content

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:

  1. Go to your Firebase console and select your project
  2. Click on "Firestore Database" in the left navigation menu
  3. Click "Create database"

Enable Firestore 1

  1. Choose "Start in production mode" or "Start in test mode" based on your needs

Enable Firestore 2

  1. Select a location for your database (choose the region closest to most of your users)
  2. Click "Enable"

Enable Firestore 3

Security Rules

For production environments, you should set up proper security rules:

  1. Go to the "Rules" tab in your Firestore Database dashboard
  2. Update the security rules to secure your application

Change Security Rules

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;
}
}
}