Files
mercadodevida/work/artifacts/F-018/documenter.md
2026-08-17 22:23:10 +02:00

1.5 KiB

Documenter — F-018 Cart module

Summary

Documented F-018 cart behavior in this evidence artifact. Project README updates are not applied during document stage because the active repository guard restricts project/ edits to build/implementer state.

Public API notes

Cart is authenticated-user scoped. It stores only productId, variantId and quantity; price, tax, discount and stock truth are recalculated through Pricing and Inventory services on every read.

Route Access Result
GET /cart authenticated Current cart with recalculated totals
POST /cart/items authenticated Adds item or increments existing item
PATCH /cart/items/:variantId authenticated Changes item quantity
DELETE /cart/items/:variantId authenticated Removes item and returns updated cart

Rules

  • Client-supplied price, tax, discount, total or stock fields are ignored.
  • Cart persistence has no price/stock columns.
  • available=false when either pricing is missing or inventory availability is insufficient.
  • Totals are based on currently persisted server-side prices, not add-time prices.

Evidence

  • work/artifacts/F-018/architect.md
  • work/artifacts/F-018/implementer.md
  • work/artifacts/F-018/reviewer.json
  • work/artifacts/F-018/security.json
  • work/artifacts/F-018/qa.json