Introduce shopping carts and cart items. You'll create carts, add and update items, and return computed totals. This course establishes the data flow that powers checkout in the final course.
Overview
Syllabus
- Unit 1: Creating and Viewing Carts
- Observe Cart Creation and Retrieval
- Implement Cart Creation
- Implement Cart Retrieval with Totals
- Harden GET /api/carts/:id
- Unit 2: Adding Cart Line Items
- Observe Adding Items and Price Snapshots
- Validate Add-Item Payloads
- Make Add-or-Increment Atomic
- Enforce Inventory and Return 201
- Unit 3: Managing Cart Line Items
- Observe Quantity Updates and Deletion
- Implement Update and Delete in cartsRepo
- Enforce Rules for Quantity Updates
- Complete PATCH/DELETE Routing and Deletion