A cart page: pick the items to check out, change quantities, remove items and apply a coupon code; the summary recalculates with every change.
The cart comes from DummyJSON's first cart, and every change sends it a real request. DummyJSON keeps no change, so a reload starts the cart over. Try WELCOME10 or SAVE20 as a coupon.
.env.local, set your API's address in NEXT_PUBLIC_API_URL (Next.js) or VITE_API_URL (TanStack Start), and the cart's path in CART_PATH. The coupon sends no request yet: connect coupon.api.ts to your API. If your API sends the totals too, show them instead of getCartTotals.npx virastack add cart brings the cart page at /cart, and stops if your project already has a route there; --no-pages installs the feature alone. Change it freely, or remove it with npx virastack remove cart.