Skip to content

v0.12.0

Latest

Choose a tag to compare

@raouf-b-dev raouf-b-dev released this 19 Oct 14:27
v0.12.0
0bc71a5

This release prepares the API for a hybrid hosted demo: a richer demo catalog with unique product photos, a secured demo-reset endpoint for scheduled seed refresh, and env-gated SameSite cookie settings so cross-origin admin and storefront clients can use HttpOnly refresh against a public HTTPS API. Local defaults stay closed (reset off, SameSite=strict).

Added

  • Demo catalog is 29 products across 7 categories, with stock headroom for public click-through checkout (ELEC-EWM-005 stays out of stock; ELEC-PRJ-003 stays at its low-stock threshold).
  • POST /v1/admin/demo/reset reconciles the demo seed for a scheduled job (src/infrastructure/demo/, ADR-0009). Off unless DEMO_RESET_ENABLED=true and DEMO_RESET_TOKEN is at least 32 characters. Header X-Demo-Reset-Token. Rate-limited, single-flight, constant-time token compare. Returns 404 when disabled.
  • AUTH_COOKIE_SAMESITE=strict|lax|none (default strict). none requires an https PUBLIC_BASE_URL and the refresh cookie stays Secure.

Changed

  • db:seed and the demo reset rebuild inventory from the four fixture orders, so shopper checkouts do not permanently drain demo stock. Shopper accounts and orders are not deleted. db:seed still refuses NODE_ENV=production.
  • Demo product photos: one unique WebP per SKU under assets/demo-media/v2/ (DEMO_MEDIA_VERSION=v2). Only the current version folder is shipped; the path segment is a cache bust, not a second photo set.

Full changelog: v0.11.3...v0.12.0