Finish the backend with checkout and orders. You’ll convert carts into orders transactionally and implement order listing plus state transitions (pay/cancel).
Overview
Syllabus
- Unit 1: Remix Checkout Implementation
- Observe checkout flow from cart to order
- Map checkout errors in the orders service
- Implement createOrderFromCart transaction in the orders repo
- Complete the checkout route action with validation and 201 responses
- Unit 2: Retrieving Order Data
- Observe listing orders and fetching an order by id
- Implement GET /api/orders listing behavior
- Implement GET /api/orders/:id data loading
- Validate query params and ids in orders routes
- Unit 3: Managing Order Transitions
- Observe pay and cancel workflows for order status transitions
- Update order status in the database and return the updated order
- Validate allowed status transitions for pay and cancel
- Complete POST /api/orders/:id/pay and POST /api/orders/:id/cancel routes