Beyond Firebase Magic: Backups, Testing and Extensions

Firebase is pretty magic and for the most part delivers on the idea of an instant-on backend for your mobile or web-app. The problem with magic though is its hard to plan for if or when something does break. Take database backups for example. While traditional database backups are a known science, backing up Firebase’s storage (FireStore) setup is still a poorly documented / infrequently attempted effort.

I tried implementing that today and the official documentation only stressed me out. Thankfully, I found this article which got me most of the way there, though of course a few things had changed (api endpoints are now versioned v1 and the GoogleAuth library has a minor change on how it is initialized). Anyway, I am glad its finally done, but I wanted to share it here in case anyone else is looking for it.

While in Firebase, I also got a chance to play around with Firebase’s testing setup (my one cloud function in my project didn’t have a test so I implemented one). The local testing setup seems interesting but unfortunately I couldn’t get too far since FirebaseAuth isn’t supported yet, so for now my tests actually connect to a real Firebase account and run the test. Hopefully FirebaseAuth Triggers will be supported soon.

Finally I did try using Firebase Extensions for the first time and tied my Firebase Auth system to MailChimp. That worked flawlessly. I am really excited about the future of Firebase Extensions. Hopefully we’ll start seeing more functionality available as just a one-click addition to your project.

Author: Arpit Mathur

Arpit Mathur is a Principal Engineer at Comcast Labs where he is currently working on a variety of topics including Machine Learning, Affective Computing, and Blockchain applications. Arpit has also worked extensively on Android and iOS applications, Virtual Reality apps as well as with web technologies like JavaScript, HTML and Ruby on Rails. He also spent a couple of years in the User Experience team as a Creative Technologist.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: