Setup database

Adding Firestore indexes

Go to Firestore in Firebase admin panel

Click on "Add index" and add following index:

In the bottom of the form in "Query scopes" field select "Collection" option.

After filling form click "Create index"

This step is required for dashboard cloud function works

Let's setup firestore rules. Go to rules tab and replace existing rules with following:

service cloud.firestore {
  match /databases/{database}/documents {
    match /{document=**} {
      allow read;
      allow write: if request.auth != null;
    }
  }
}

Congratulates! Database is ready

Last updated