r/Firebase • • 9h ago

Billing Sanity-checking a Firestore cost model for a 30-person workspace

2 Upvotes

I’m a graphic designer working on WeSyn Basic, a paid collaboration app. A question on r/SideProject made me realize I need to be much more careful about explaining the Firebase running costs.

Each team uses its own Firebase project on Blaze and pays Google directly. I’d like to check the assumptions in our model rather than turn a small estimate into a promise.

The workload includes task updates, room chat, project notes and looking back through saved task reviews.

For Firestore Standard in us-central1, we worked through two illustrative volumes for the whole team:

  • Light use: 3,450 document reads and 600 writes per day.
  • A separate high-read scenario: 500,000 document reads and 1,000 writes per day, repeated for 30 days.

The light scenario fits within the eligible daily document read/write quotas. Using the listed US$0.03 per 100,000 reads and US$0.09 per 100,000 writes, my document-operation subtotal for the high-read scenario is US$4.05 over 30 days after the daily free quota. That excludes network transfer, storage and indexes, and any other Firebase or Google Cloud services.

These are design calculations, not measured bills from 30 people. I’m also keeping transferred bytes separate from document counts rather than assuming that a read always has the same payload size.

What I’d really appreciate help with is the usage model:

  1. For chat listeners, how do you estimate the effect of multiple clients receiving the same updates, initial snapshots and reconnects?
  2. What is a good way to measure Security Rules dependent reads and query index-entry reads before presenting a cost example to a team?
  3. Beyond accumulated storage, indexes and transfer, what billing details tend to get missed in an app like this?

I’ve been reading the Firestore pricing sections on listeners and Security Rules, but I’d value practical experience with checking an estimate against actual billed usage.

Pricing reference: https://cloud.google.com/firestore/pricing

I’m not treating 30 seats as a cost limit, or a budget alert as a spending cap.


r/Firebase • • 15h ago

General I built an open-source logger that puts a Firebase app's browser errors in your own Cloud Logging

2 Upvotes

I built this for Pour5, an app I'm working on. My wife was testing it on her phone (installed from the web page, so no dev tools anywhere near it) and mentioned an error from earlier in the week. Normally that error would be gone by the weekend. It happened in her browser, and nothing sent it anywhere.

A Firebase backend already writes to Cloud Logging. The browser half gets nothing. fsl is that missing half:

- The browser sends each log to a Cloud Function in your own project. No third-party service, nothing leaves.

- The function resolves the minified stack with your source maps, which never ship to the browser. `app-4f2a.js:1:98432` becomes `Checkout.tsx:42`.

- Browser and backend entries share labels, so one query (`labels.userId="..."`) shows what one user did on both sides.

- Each error carries the trail before it: the pages, the marked clicks, the open dialog.

- Errors are grouped in Cloud Error Reporting, with no extra product.

- A flood of the same error costs three entries and a count.

It also ships a CLI (`fsl logs`) and two skills for coding agents. That's how the Pour5 bug got fixed. I asked Claude to check the logs and switched tabs. When I came back it had found the error, fixed it and written a test. I wasn't the glue between the logs and the code anymore.

MIT, on npm as `@dasasian/firebase-structured-logger`. Works with Cloud Functions, Cloud Run, or any Node server. Needs Node 22.

- Docs: https://fsl.dasasian.com/

- Source: https://github.com/dasasian/firebase-structured-logger

How do you see frontend errors in your Firebase app today? And what would stop you from trying this?