Analysis updated 2026-05-18
Find out which API route or feature is causing a sudden spike in your Firestore or Postgres bill.
See which specific users are responsible for the most database reads in your app.
Separate background job database usage from user-driven usage so you can optimize each independently.
| crossdeckhq/buckets-oss | airirang/airirang-builder | aisurfer/mcp_ui_app_example | |
|---|---|---|---|
| Stars | 0 | 0 | 0 |
| Language | TypeScript | TypeScript | TypeScript |
| Setup difficulty | easy | moderate | moderate |
| Complexity | 2/5 | 3/5 | 3/5 |
| Audience | developer | developer | developer |
Figures from each repo's GitHub metadata at analysis time.
Works without any account in local-file mode, a Crossdeck API key is only needed for the cloud dashboard.
Buckets is a small TypeScript library that tracks exactly how many database reads, writes, and deletes your app is making, and which user or function caused each one. The core problem it solves is a common billing surprise: your Firestore, MongoDB, or Postgres bill jumps unexpectedly and your database provider's dashboard shows you the total count but not which part of your app triggered the spike or whose request caused it. The library installs as a thin layer in front of your database calls. You initialize it once at app startup and it automatically intercepts every read and write across your entire codebase, counting them in memory without adding extra queries to your database. You can wrap a specific function or API route with a bucket() call to give it a label, and all the database operations inside that wrapper are grouped under that name in the output. Operations you do not label explicitly still appear, grouped by collection or table name. To connect a database read to the specific user who triggered it, you call setActor(userId) at your request boundary, the moment you know who is logged in. From that point, every database operation in that request is tagged with that user's ID. Background jobs and scheduled tasks can be labeled as machine so they are tracked separately from user-driven activity. The readout is a plain Markdown file written to a .crossdeck folder in your project directory, listing each bucket by name and its read count in order of size. You can print it with a single terminal command at any time. A cloud dashboard is available through the Crossdeck service if you supply an API key, but the local readout works with no account at all. Supported databases are Firestore, MongoDB, and Postgres. The library is MIT licensed and published as an npm package. The full README is longer than what was shown.
A TypeScript library that tracks database read and write costs per function and per user, so you can see exactly who and what is driving your database bill.
Mainly TypeScript. The stack also includes TypeScript, Firestore, MongoDB.
MIT license, use, modify, and distribute freely for any purpose, including commercial projects.
Setup difficulty is rated easy, with roughly 5min to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Verify against the repo before relying on details.