Purpose: Documents every read, write, and gate in the SKU-limit lifecycle — the two frontend gates (ProductModal save, bulk import), the two mutating cloud functions (
deleteProducts,batchImportProducts) plus the frontend-direct Firestore CRUD path, the daily scheduled reconciliation, and the manual reconciliation callable. Covers both the pure counting helpers (shared between frontend and backend) and the Firestore paths the counter lives on.Last verified: 2026-04-12 against
import-fetchbranch
Purpose: Documents the complete order lifecycle — from marketplace order sync (pull), through webhook-driven status updates (push), to fulfillment actions (pack, ship, print AWB, cancel). Covers every Firestore read/write, Cloud Function call, marketplace API call, and inventory pipeline handoff in execution order.
Last verified: 2026-04-15 against
inventory-refactorbranch
Purpose: Documents the complete data flow for inventory allocation — from user/webhook/cron entry through deltas, allocation math, and marketplace sync. Covers BOTH the Pub/Sub v2 path (current target architecture) and the cron legacy path (being phased out). Every entry point, every Firestore touch, every retry and failure-recording path is traced.
Last verified: 2026-04-15 against
inventory-refactorbranch