A Simple Production-Launch Checklist for your Firebase Web App

Mafalda.Lome
2 min readMay 27, 2021

To help keep track of things that need to get done before the big day

Setup third party configurations and API keys

Some examples of this would include Stripe accounts or third party email/notification systems like SendGrid or MailGun. It’s helpful to have a running list of third party services being used on a project so payments or limits don’t get overlooked.

Pull Firebase indexes and security rules into your code base

Maintaining these in your code base from the start would be best practice but if you’ve forgotten, make sure to do it before launching to production so it’s easier to deploy them in a consistent manner.

If you’re deploying to multiple environments, adding aliases to your .firebaserc or through the command line can help keep track of those environments. firebase use --add should prompt your command line tools to show you your connected database options — choose an option and assign it an alias like staging or production so later on you can deploy using the command firebase deploy -P staging or firebase deploy -P production .

Deploy your cloud functions

With your command line tools already set up, just run firebase deploy -P production --only functions

Configure firebase hosting

In your firebase.json add the proper configurations under the hosting key like so:

"hosting": [{  "target": "app",  "public": "packages/fan-fix/dist",  "predeploy": [     "npm --prefix \"$RESOURCE_DIR/..\" run build-prod"   ],  "ignore": [    "firebase.json",    "**/.*",    "**/node_modules/**"  ],  "rewrites": [{    "source": "**",    "destination": "/index.html"  }]}]

Setup your DNS (GoDaddy, Namecheap…etc)

Add environment variables for prod

If you have a .env.dev, you’ll need to create a .env.production with API keys and variables for the same services for production. Also, don’t forget to write your npm script to build-production using that .env file. Then under hosting > predeploy, you can run that production build script.

Turn on the proper authentication types in Firebase Authentication

In your firebase console under the authentication panel you should flip on the different types of authentication allowed for your app (phone, email, Facebook, Gmail, etc…) Additionally, make sure the third party auth systems (i.e., Facebook for Developers or Twitter for Developers) have the proper redirect-url’s for production and are in live-mode instead of test-mode.

Turn on basic analytics in the Firebase console

Run through a bunch of end-to-end tests to make sure those environment variables stuck

It helps to make a list of screens/flows that would be most effected by changes in configuration for QA but you should personally test them yourself as well!

--

--