FRGet In Touch
← Tech stack

Firebase

Google’s app development platform: ready-made backend services for sign-in, data, notifications and crash reporting.

Type
Backend-as-a-service platform
Created by
Firebase, acquired by Google in 2014
Includes
Auth, Firestore, Cloud Messaging, Crashlytics, Hosting
In my stack
Push notifications, crash reports and fast MVPs

What it is

Firebase gives web and mobile apps a set of backend services they can use directly, without writing or running a server: user sign-in with email, Google or Apple, Firestore (a real-time document database), file storage, hosting, and Cloud Functions for server code.

Some of its pieces are useful even in apps that have their own backend. Firebase Cloud Messaging (FCM) is the standard way to send push notifications on Android, and it also delivers to iPhones through Apple’s push service. Crashlytics reports app crashes with the exact line of code and device, and Remote Config changes app behaviour without publishing a new version.

Why I use it

Push notifications that work. FCM handles device tokens and delivery on both platforms, so the backend just says who should be notified and what to say.

Crashes are visible. With Crashlytics, a crash on a field worker’s phone shows up with its stack trace, instead of a vague complaint a week later.

Very fast for MVPs. Sign-in, a database and hosting are ready in an afternoon, which is ideal to test an idea before investing in a full backend.

Generous free tier. Small apps and prototypes often run for free.

Where I use it

In React Native apps, I use Firebase for what it does best: Cloud Messaging for push notifications, for example to tell someone a corrective action was just assigned to them, and Crashlytics for crash reports. The business data itself stays in my own backend and database, where I control the rules, the audit trail and where the data is hosted. For a quick MVP, I sometimes go further and use Firebase Auth and Firestore as the whole backend.

Best use cases

  • Push notifications for mobile and web apps, even when the rest of the backend is custom.
  • Crash reporting and stability tracking for apps used in the field.
  • MVPs and prototypes that need sign-in and live data with no backend to build.
  • Real-time features like chat or live status in small to medium apps.

When I’d use something else

For business systems with complex rules, relations between records, reporting and audit requirements, I use my own backend with PostgreSQL: Firestore is hard to query for reports, and its cost grows with every read. Firebase also ties the app to Google’s services, and choices about where data is stored are limited, which matters to some clients.

A small example

Sending a push notification from a Go backend with the Firebase Admin SDK. The app registered its device token when the user signed in.

app, err := firebase.NewApp(ctx, nil)
if err != nil {
	return err
}
client, err := app.Messaging(ctx)
if err != nil {
	return err
}

_, err = client.Send(ctx, &messaging.Message{
	Token: deviceToken,
	Notification: &messaging.Notification{
		Title: "New corrective action",
		Body:  "Replace the damaged guardrail on level 2, due Friday",
	},
	Data: map[string]string{"actionId": actionID}, // opens the right screen
})
return err

Often used with

Need a mobile app with reliable push notifications?

Get in touch and tell me about your project.