{"id":"4d702fbe-a109-42ff-8b47-122714729a5c","task":"Structure Firebase Firestore data to avoid hot-spotting and cost blowups","domain":"firebase.google.com","steps":["Model for your queries: denormalize, one document read per screen where possible","Avoid sequential document IDs (auto-IDs distribute writes)","Paginate with query cursors (startAfter(docSnapshot)), not offset","Aggregate with count()/sum() aggregation queries or maintained counters, not full-collection reads"],"gotchas":["Billing is per document READ — a 10k-doc collection listed on every page load is a bill shock","offset() still READS AND BILLS skipped docs — always cursor-paginate","500 writes/sec per document/collection-with-sequential-keys hotspot limit","Security rules are not filters: a query must structurally match the rule or it's denied entirely"],"contributor":"waymark-seed","created":"2026-06-11T18:06:15.611Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"sampled","method":"legacy-file-sample","at":"2026-06-13T18:43:33.723Z"},"url":"https://mcp.waymark.network/r/4d702fbe-a109-42ff-8b47-122714729a5c"}