Use cases
The people, systems, and flows your e-commerce project supports.
Actors
| Actor | Type | Description |
|---|---|---|
| Guest | Person | Visitor who is not logged in |
| Customer | Person | Registered user who buys products (inherits everything a Guest can do) |
| Admin | Person | Store staff who manage products, orders, stock and reports |
| Payment Gateway | External system | Mock gateway (behaves like PayMongo); confirms online payments through a webhook |
| Mail Service | External system | Delivers emails the system sends |
| ID | Use case | Actors | Module |
|---|---|---|---|
UC-01 | Register an account | Guest | Users & Auth Group 1 |
UC-02 | Log in / log out | Guest, Customer, Admin | Users & Auth Group 1 |
UC-03 | Reset password | Guest | Users & Auth Group 1 |
UC-04 | Manage profile and addresses | Customer | Users & Auth Group 1 |
UC-05 | Browse products by category | Guest, Customer | Product Catalog Group 3 |
UC-06 | View product details | Guest, Customer | Product Catalog Group 3 |
UC-07 | Manage products and categories | Admin | Product Catalog Group 3 |
UC-08 | Search and filter products | Guest, Customer | Search & Filters Group 9 |
UC-09 | Manage cart | Customer | Cart & Wishlist Group 4 |
UC-10 | Manage wishlist | Customer | Cart & Wishlist Group 4 |
UC-11 | Check out | Customer | Checkout & Orders Group 5 |
UC-12 | View order history and details | Customer | Checkout & Orders Group 5 |
UC-13 | Cancel a pending order | Customer | Checkout & Orders Group 5 |
UC-14 | Manage orders and statuses | Admin | Checkout & Orders Group 5 |
UC-15 | Pay online | Customer, Payment Gateway | Payments Group 6 |
UC-16 | Confirm payment (webhook) | Payment Gateway | Payments Group 6 |
UC-17 | Restock and adjust inventory | Admin | Inventory & Stock Group 7Two modules |
UC-18 | View stock history | Admin | Inventory & Stock Group 7Two modules |
UC-19 | View dashboard and sales reports | Admin | Admin Dashboard & Reports Group 7Two modules |
UC-20 | Export sales report (CSV) | Admin | Admin Dashboard & Reports Group 7Two modules |
UC-21 | Receive order emails | Customer, Mail Service | Notifications Group 8Two modules |
UC-22 | Receive low-stock alerts | Admin, Mail Service | Notifications Group 8Two modules |
UC-23 | Manage shipping rates | Admin | Shipping & Tracking Group 8Two modules |
UC-24 | Mark order as shipped | Admin | Shipping & Tracking Group 8Two modules |
UC-25 | Track an order | Customer | Shipping & Tracking Group 8Two modules |
UC-26 | Write a product review | Customer | Reviews & Ratings Group 10 |
UC-27 | Moderate reviews | Admin | Reviews & Ratings Group 10 |
UC-11 · Check out
- Actor
- Customer
- Precondition
- Customer is logged in and the cart has at least one item
- Trigger
- Customer clicks Checkout on the cart page
- Postcondition
- An order exists with status Pending, the cart is empty, stock is reduced, a confirmation email is sent
Main flow
- System shows the cart items, default address, shipping fee and payment options.
- Customer picks an address and a payment method (COD or online) and may enter a voucher code.
- Customer clicks Place order.
- System re-checks stock for every item.
- System creates the order and its items, then empties the cart.
- System fires OrderPlaced; stock is deducted, a shipment is prepared and an email is sent.
- For COD, system shows the order in My Orders. For online payment, system sends the customer to the gateway (continues in UC-15).
Alternative flows
- 4a. An item is out of stock: system returns to the cart and names the item.
- 2a. Voucher code is invalid or expired: system places the order without a discount and says why.
- 7a. Online payment fails: the order stays Pending; the customer can retry from the order page.
Vouchers is unassigned this semester; checkout accepts the demo code WELCOME10 as part of UC-11.