r/Firebase • • 23d ago • Bravo 1

Emulators I rebuilt the Firebase emulators with no Java, 10× less memory, and a new UI for the best dev experience

Post image

I build with Firebase almost every day and keep the local emulators running all day, and two things wore me down. The suite is heavy with Java to install, a heap past 22 GiB on our app, out-of-memory crashes, and data gone at every stop unless you export it. And it's hard to see what your app is doing. It had become almost unusable for us, so I built a replacement: Firenook. It's open source, and I'd really like to know what you think.

Lighter, with no Java. One npm package with a native engine. On a real app's two-hour workload it peaked at 2.11 GiB where the official emulator reached 22.57 GiB, and answered writes in 5.1 ms against 208 ms at the median. That 40× is under load; on an idle emulator a write is only 1.5× faster (how it was measured). Add --keep-data and Firestore, Auth and Storage come back with your data in about half a second, with no export at every stop.

A new UI, built from scratch. It sits on the Emulator UI's port (screenshots) and shows:

  • every function call with what triggered it, its request, answer, duration and logs; open a failed one, read the stack, run it again;
  • your rules beside each allow or deny, with the line that decided it, plus a playground and coverage;
  • an inbox of the verification emails, sign-in links and SMS codes Auth would have sent;
  • Pub/Sub messages, Cloud Tasks queues and Eventarc events, which the official UI has no pages for;
  • Firestore and Storage to browse and edit, even with millions of documents.

The terminal shows each function call as one line with its outcome and stack, and npx firenook mcp add lets Claude Code, Cursor or VS Code use all of it.

Trying it:

  1. npx firenook init --adopt --dry-run checks your project and changes nothing.
  2. npm install --save-dev firenook (keep firebase-tools for deploying).
  3. Change firebase emulators:start to firenook emulators:start. --only, --project, --import and --export-on-exit carry over.

Your firebase.json, rules, Functions code and app stay as they are.

It's still new and I'm sure it misses things. If something behaves differently from the official emulator, please tell me here or open an issue. That's the most useful feedback I can get.

Repo: https://github.com/firenook-dev/firenook · Docs: https://firenook.dev

57 Upvotes

12 comments sorted by

16

u/Which_Policy 23d ago

Is it just me or is there another vibecoded firebase emulator clone written in rust comming out every 2 days? This is the 3rd i have seen.

8

u/Mountain-Comparison6 23d ago

Haha, not just you. I think a lot of us was hitting the same wall with Java emulators. I've been developing this for the past 2 months tho, and been running this internally for about a month. What i personally wanted was not just faster emulators that don't take memory much but also a new UI for better devexp. Give it a try and let me know your opinion :)

1

u/ImmediateCat975 17d ago

yeah ive noticed that too, it really has become the new default side project lately

3

u/lcssgml 22d ago

Does it fail a query that needs a composite index? The official emulator lets those through, so for me it worked locally and failed in production with the "requires an index" error. If Firenook could at least warn about it, that alone would be a reason to switch for me :)

2

u/Mountain-Comparison6 21d ago

Not yet. On emulators:start that query still succeeds with no warning. The check itself is already built though: "Explain this query" in the console tells you the index production needs and gives you the entry to copy. Warning automatically in the log is the next step, will be implementing this soon!

Enough of the days, we push to prod and nothing works and turns out in console there is a link for indexes :)

1

u/Mountain-Comparison6 16d ago

Update: this is in now :)

If your app runs a query that needs a composite index that isn't in firestore.indexes.json, Firenook still answers it like the official emulator does, but it logs a warning with the exact index entry you need to add. If you'd rather have it fail like prod, start it with --strict-indexes and you get the same FAILED_PRECONDITION error. Handy for CI.

And 0.2.3 (out today) adds an Indexes page to the console. It lists every missing index with the query that needed it, and Add / Add all writes it straight into your firestore.indexes.json, no restart.

u/Elegant_Response1635 it's in the conformance suite too, CI runs a strict-index pass on every change.

Docs if you want to try it: https://firenook.dev/docs/services/firestore#queries-and-indexes

2

u/Elegant_Response1635 22d ago

That’s an excellent compatibility test. Supporting firestore.indexes.json and warning when a query would fail in production would be more valuable than silently matching the emulator’s permissive behavior. I’d make it part of a conformance test suite.

2

u/p0werel 22d ago

Any plans on making this a self hostable, actual replacement for firebase itself?

1

u/Mountain-Comparison6 22d ago

Yes! I do have that in plan, but for now, we need to proof Firenook reliable running for all. Then we will definitely do the self-hosting one, that would be a fun way to host existing firebase projects too :)

1

u/data_expert_9 22d ago edited 22d ago

did u tried local.cloud 's firebase?
its easy to write emulator that covers basic operations, but hard to create real replacement