Product Requirements Document (PRD): E-Commerce Platform
1. Overview
This document defines the functional requirements for a modular, scalable e-commerce platform based on the UML Class Diagram. The system enables users to browse products, manage carts, place orders, apply coupons, track deliveries, leave reviews, and securely pay via Stripe or PayPal.
Target users:
- End Customers
- Customer Support / Admin (implicit for order/delivery/coupon management)
- Payment Gateway Integrators (Stripe, PayPal)
2. Functional Requirements
2.1 User Management
FR-USER-001: User Registration & Profile
- Users must be able to register with email, password, first/last name, and phone number.
- System shall store and allow users to view/update their profile information.
FR-USER-002: User Authentication
- Users must authenticate to access cart, orders, reviews, and checkout.
FR-USER-003: User Order History
- Users must be able to view all past and current orders.
FR-USER-004: User Review History
- Users must be able to view all reviews they have submitted.
FR-USER-005: Coupon Usage History
- Users must be able to view all coupons they have redeemed.
2.2 Product Catalog
FR-PROD-001: Product Browsing
- System shall display products with name, description, price, category, and stock quantity.
FR-PROD-002: Product Search & Filtering
- Users must be able to search and filter products by name, category, price range, and availability.
FR-PROD-003: Product Detail View
- Each product must display full details including user reviews and average rating.
FR-PROD-004: Stock Availability Check
- System shall prevent adding out-of-stock items to cart or order.
2.3 Shopping Cart Management
FR-CART-001: Cart Persistence
- Each user shall have a persistent cart tied to their account.
FR-CART-002: Add to Cart
- Users must be able to add any in-stock product to their cart with specified quantity.
FR-CART-003: Update Cart Quantity
- Users must be able to increase or decrease item quantities in cart.
FR-CART-004: Remove from Cart
- Users must be able to remove any item from cart.
FR-CART-005: View Cart Total
- System shall calculate and display real-time cart subtotal (before tax, shipping, discounts).
2.4 Order Management
FR-ORDER-001: Place Order
- Users must be able to convert cart contents into an order with calculated total.
FR-ORDER-002: Order Summary
- System shall display order ID, items, quantities, prices, and total amount.
FR-ORDER-003: Order Status Tracking
- Users must be able to view current status (e.g., “Pending”, “Confirmed”, “Shipped”, “Delivered”, “Cancelled”).
FR-ORDER-004: Order History
- Users must be able to view all past and current orders with details.
FR-ORDER-005: Apply Coupon to Order
- Users must be able to apply a valid coupon code during checkout to receive discount.
FR-ORDER-006: Recalculate Total
- System shall recalculate order total upon coupon application or item modification.
2.5 Coupon Management
FR-COUPON-001: Coupon Creation (Admin)
- Admin must be able to create coupons with code, type (percentage/fixed), value, validity period, and usage limits.
FR-COUPON-002: Coupon Validation
- System shall validate coupon code, check expiry, and verify usage limits before applying.
FR-COUPON-003: Apply Coupon
- Users must be able to apply one coupon per order during checkout.
FR-COUPON-004: Track Coupon Usage
- System shall record which user applied which coupon to which order and when.
FR-COUPON-005: Display Applied Discount
- System shall show discount amount and updated total after coupon is applied.
2.6 Delivery Tracking
FR-DELIVERY-001: Assign Delivery to Order
- System shall generate a delivery record upon successful payment.
FR-DELIVERY-002: Carrier & Tracking Number
- Delivery record must include carrier name and tracking number.
FR-DELIVERY-003: Delivery Status Updates
- System shall allow updating delivery status (e.g., “Shipped”, “Out for Delivery”, “Delivered”).
FR-DELIVERY-004: Estimated & Actual Delivery Dates
- System shall display estimated delivery date and record actual delivery date when available.
FR-DELIVERY-005: User Tracking Access
- User must be able to view delivery status and tracking information for each order.
2.7 User Reviews and Ratings
FR-REVIEW-001: Submit Review
- Authenticated users must be able to submit a rating (1–5) and optional comment for any product they ordered.
FR-REVIEW-002: View Product Reviews
- All users must be able to view aggregated ratings and individual reviews for each product.
FR-REVIEW-003: Edit/Remove Own Review
- Users must be able to edit or delete their own reviews within a configurable time window (e.g., 30 days).
FR-REVIEW-004: Average Rating Display
- System shall calculate and display average rating for each product.
2.8 Payment Integration (Stripe & PayPal)
FR-PAYMENT-001: Select Payment Method
- Users must be able to select either Stripe or PayPal at checkout.
FR-PAYMENT-002: Process Payment via Stripe
- System shall integrate with Stripe API to process card payments and return transaction ID and status.
FR-PAYMENT-003: Process Payment via PayPal
- System shall redirect to PayPal or use embedded SDK to complete payment and capture transaction ID and status.
FR-PAYMENT-004: Payment Status Handling
- System shall update order status based on payment result (success → “Confirmed”, failure → “Payment Failed”).
FR-PAYMENT-005: Transaction Record
- System shall store payment method, transaction ID, amount, status, and timestamp for every payment attempt.
FR-PAYMENT-006: Refund Handling (Future Scope)
- System shall support recording refund transactions (not implemented now, but Payment class designed to support it).
3. Key User Flows
3.1 Browse → Add to Cart → Checkout → Pay → Track Order → Review
- User browses products and adds desired items to cart.
- User reviews cart, updates quantities, applies coupon.
- User proceeds to checkout, selects payment method (Stripe/PayPal).
- Payment is processed; upon success, order and delivery records are created.
- User receives order confirmation and can track delivery status.
- After delivery, user can submit product review and rating.
3.2 Admin Coupon Management
- Admin creates coupon with rules (code, discount, validity, usage limits).
- User applies coupon during checkout — system validates and applies discount.
- System records usage and decrements available uses.
4. Out of Scope (Non-Functional & Future)
- Performance, scalability, security hardening
- Tax calculation, multi-currency, international shipping
- Inventory management beyond stock quantity
- Recommendation engine, wishlists, notifications
- Returns, refunds, exchanges
- Admin UI or CMS
- Mobile app or responsive UI specs
5. Dependencies
- Stripe API (for card payments)
- PayPal API (for PayPal checkout)
- Email/SMS service for order/delivery notifications (assumed, not modeled)
- External carrier tracking APIs (optional enhancement)
6. Success Metrics
- % of successful checkouts (payment success rate)
- Average order value (with/without coupons)
- Number of reviews per product
- Delivery status update accuracy
- Coupon redemption rate
- User retention and repeat purchase rate
✅ This PRD is derived directly from the UML Class Diagram and covers all modeled entities and relationships. Each requirement maps to at least one class or method in the diagram. Implementation teams can use this to build features incrementally while ensuring architectural alignment.
Version: 1.0
Last Updated: April 2025
Author: Product Architect, E-Commerce Platform Team