One production ecommerce lesson from Loosh Boutique: treat the browser as a convenience layer, not the source of truth.
The React storefront keeps guest conveniences locally. Price/discount calculation, delivery eligibility, stock validation + row locking, reservations, idempotent order creation, order transitions, and admin authorization stay server-owned in Express/PostgreSQL.
Why this matters when rescuing a SaaS or ecommerce app: UI bugs are annoying; duplicated orders, oversold stock and unsafe admin mutations are existential.
The debugging order I use:
1. establish server-owned invariants
2. reproduce failures at the API/database boundary
3. add idempotency, locking and validation
4. only then polish the frontend
That turns “random production bugs” into bounded state transitions you can test.