Comment on page
Setup database
Go to Firestore in Firebase admin panel

Firestore and indexes tab
Click on "Add index" and add following index:

Creating composite 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