- Set env vars in .env files
- update package.json with project title and description
- create Firebase config file at
config/firebase-config.<ENVIRONMENT>.json
- Go to "Sign-in Providers" and enable Email and Google
- Enable Realtime database and seed the database by importing the file
fixtures/database-seed.json
- Update rules as follows:
{
"rules": {
"pages": {
".read": true,
".write": "auth != null && root.child('users').child(auth.uid).child('isEditor').val() == true"
},
"users": {
"$user_id": {
".write": "$user_id === auth.uid",
".read": "$user_id === auth.uid"
}
},
}
}
- Enable storage with directories for
files
andimages
- Get service account keys and add to
config/firebase-config.<ENVIRONMENT>.json
- Enable hosting
- Under "Project Settings > General", create a new web app to get the firebase config and add to
config/firebase-config.<ENVIRONMENT>.json
- Under "Project Settings > Service Accounts", click "Generate a new private key" and add it to
config/firebase-config.<ENVIRONMENT>.json
- create separate projects for staging and production