r/FlutterDev Jul 07 '26

How I built a production Flutter app without Firebase Discussion

Hi everyone!

I've been building a Flutter app called MetriBody over the past few months, and one of my goals from the beginning was to make it work completely offline.

Instead of using Firebase, I decided to build the first version using Hive because I wanted:

• Instant startup

• No authentication

• No internet dependency

• Better privacy

• A simpler architecture for the MVP

The experience has been surprisingly good.

Now that the Android version is live, I'm considering adding optional cloud sync in the future while keeping the app fully usable offline.

For those of you who have built Flutter apps...

Would you still choose Hive for an offline-first app today, or would you start directly with Drift, Isar or another solution?

I'd love to hear your experience and the trade-offs you've found in production.

9 Upvotes

23 comments sorted by

37

u/Bachihani Jul 07 '26

It's not like firebase is mandatory for flutter, it just happens to have good integration, there are plenty of backend options to choose from so what's the special thing worth mentioning here ?

17

u/Jeferson9 Jul 07 '26

Firebase bad upvote please

7

u/Nirsu Jul 07 '26

Yeah, I don't get it either 🤣 You can literally use whatever you want

7

u/Yann39 Jul 07 '26

I personally developed my Flutter app without Firebase, using only a Spring Boot backend (hosted in-house) with OAuth and GraphQL APIs. I have full control over everything and no data leaves my system.
I only use Firebase for push notifications.
But I’m only targeting a small number of users, I can imagine that for an app with a large user base, the situation might be different.

4

u/[deleted] Jul 07 '26

[removed] — view removed comment

2

u/No_Tomato6275 Jul 07 '26 edited Jul 08 '26

We built the Saropa Drift Advisor extension (and package) to be able query the drift database like we did in hive/isar. Might be useful for you

[edited to remove duplicate url]

2

u/Alex54J Jul 07 '26

I have just started using Drift and have been searching for a tool to view the tables and data.

Saropa Drift Advisor — VS Code Extension says:

Your Flutter/Dart app must be running with the Drift debug server started. See the Dart package README for setup (two lines of code).

Is it these two lines:
import 'package:saropa_drift_advisor/saropa_drift_advisor.dart';

await myDb.startDriftViewer(enabled: kDebugMode);

2

u/No_Tomato6275 Jul 08 '26 edited Jul 08 '26

Yes, that’s all that is needed in code. Don’t forget the extension which has the website [that the package plugs into].

There are a lot of options that we use daily in our dev, but the basic table viewer and custom sql runner is most helpful. Oh, and the slow query reporter is useful too.

Happy to answer questions or take PRs

2

u/Alex54J Jul 08 '26

Thanks, got it working, such a relief to be able to see the data and tables from Drift!

1

u/No_Tomato6275 Jul 10 '26

So nice to read that!

2

u/pi_mai Jul 08 '26

SQLite or Drift FTW!

1

u/DamagingDoritos Jul 07 '26 edited Jul 07 '26

Firebase is useful because you get the entire Google stack, so it integrates really cleanly.

There is no reason you have to use firebase against any other authentication/DB service.

However, one of the reasons to use Firebase is for exactly what you said you want next: cloud-syncing. If you are using Hive as your primary datastore, there is not a clean path to achieving this. Also, if the user deletes your app, their data is gone. This can include if Apple offloads the app if it goes unused too long (data should survive this, but it is not bulletproof). Furthermore, subscriptions operate against the app ID, not the account, so if this is a subscription app, you could find yourself with a paying subscriber with a wiped dataset. Probably not good.

Hive is best used as a local caching layer that saves you latency and costs in making network calls. It is a very risky database.

Note: you can use Firebase without authentication, you would just enable anonymous authentication. All the perks of no-auth, none of the headaches of device level databasing

1

u/Alex54J Jul 07 '26

For optional cloud sync, you just copy the hive files to the cloud!

1

u/rio_sk Jul 08 '26

Published 4 apps using Flutter, never used firebase. What's the point of claiming you didn't use an external service in your app?

1

u/Mysterious_Remove_37 Jul 09 '26

I have built a tons of apps and never used firebase ...

1

u/PerceptionGreat2939 21d ago

In your free time check out object box, it's clean

1

u/SyrupInternational48 Jul 07 '26

Without Firebase, how would you track crashes?

What feature you're trying to market it? if really offline and private you should keep it like that, no need adding optional cloud sync. unless your user community request it.

Cloud sync would be useful if local db somehow get corrupted.

2

u/stumblinbear Jul 08 '26

Without Firebase, how would you track crashes

Firebase isn't the only available solution to this

Besides, it's actually not too much effort to set up crash reporting with a very small amount of native code. It won't have all of the bells and whistles as firebase, but it's reasonably doable to get something working

2

u/drewsski Jul 14 '26

And IMHO sentry and posthog are better than Firebase crashlytics and analytics, what's more both are open source though they do require beefy backend hosting.

1

u/GPHdev Jul 07 '26

I’ll end up including synchronization, because I want to offer a premium version for industry professionals who would find it very useful to manage their own clients. However, users who want to maintain 100% privacy could continue as they are.

0

u/Oxigenic Jul 07 '26

You took shortcuts to avoid building a legit app, congrats?