This diagram illustrates the interactions between different actors (users) and the system itself.
Actors:
Customer: Represents a user who browses products, adds them to a cart, and makes purchases.
Administrator: Represents a user who manages products, users, and orders.
Payment Processor: An external system that handles payment transactions.
Use Cases: These are the actions that the actors can perform.
View Products: Allows customers to browse the product catalog.
Add to Cart: Allows customers to add products to their shopping cart.
Checkout: The process of purchasing the items in the cart.
Manage Products: Allows administrators to add, update, and remove products.
Manage Users: Allows administrators to manage customer accounts.
Process Payment: A use case for handling the payment.
Include: An "include" relationship indicates that one use case's behavior is included in another. In this diagram, Checkout includes Process Payment. This means that processing a payment is a mandatory part of the checkout process.
Extend: An "extend" relationship shows that one use case provides optional functionality to another. Here, Add to Cart is extended by Apply Discount. A customer can add an item to their cart without applying a discount, but they have the option to do so.
Generalization: This relationship shows that one use case is a more specialized version of another. In this example, Pay by Credit Card and Pay by PayPal are specializations of the more general Process Payment use case.
Constraints: A constraint is a rule that must be followed. In this diagram, a constraint is placed on the Checkout use case: {must be logged in}
. This means a customer must be logged into their account to complete the checkout process.