Design: E-commerce Cart and Order Management
Design focuses on the core classes and their interactions for product catalog, cart management, and order processing. Payment, shipping, and user authentication are out of scope.
Functional Requirements
FR1: Allow users to browse products with details like name, price, and stock quantity
FR2: Users can add products to a shopping cart with specified quantities
FR3: Users can update or remove items in the cart
FR4: Users can place orders from their cart
FR5: Orders should capture product details, quantities, prices, and total amount
FR6: Support multiple users with separate carts and orders
Non-Functional Requirements
NFR1: Handle up to 10,000 concurrent users
NFR2: Ensure cart updates and order placements have p99 latency under 200ms
NFR3: Maintain data consistency between cart and order
NFR4: Availability target of 99.9% uptime