# E-commerce Store Requirements

## Overview
I want to build an online store where customers can browse products, add them to a cart, and checkout.

## User Journeys

### Customer Checkout Flow
1. Customer visits the homepage
2. Customer browses products in the catalog
3. Customer clicks on a product to see details
4. Customer adds product to cart
5. Customer clicks "View Cart"
6. Customer reviews items in cart (can adjust quantities or remove items)
7. Customer clicks "Proceed to Checkout"
8. Customer selects payment method:
   - PayPal
   - Klarna
   - Credit Card (via Stripe)
9. Customer enters payment details
10. Customer clicks "Place Order"
11. Customer sees order confirmation screen
12. Customer receives order confirmation email

### Admin Order Management
1. Admin logs into admin panel
2. Admin views list of all orders
3. Admin clicks on an order to see details:
   - Customer information
   - Items ordered
   - Payment method used
   - Order status
4. Admin can update order status (pending → processing → shipped → delivered)

## Payment Integration Requirements
- **PayPal**: Use PayPal SDK for payment processing
- **Klarna**: Use Klarna Payments API
- **Stripe**: Use Stripe Elements for credit card processing
- All payment methods should redirect to the same confirmation page
- Failed payments should show clear error messages

## Email Requirements
- **Order Confirmation**: Send immediately after order is placed
  - Include order number, items, total, estimated delivery
- **Shipping Notification**: Send when order status changes to "shipped"
  - Include tracking number
- Use SendGrid for email delivery

## Technical Stack Preferences
- **Frontend**: React with TypeScript
- **Backend**: Node.js with Express
- **Database**: PostgreSQL
- **Styling**: Tailwind CSS
- **State Management**: React Context (keep it simple for now)

## Design Preferences
- Clean, modern design
- Mobile-responsive
- Primary color: Blue (#3B82F6)
- Use card-based layouts for products

## Future Features (not now, but keep in mind)
- Wishlist functionality
- Product reviews
- Related products recommendations
- Discount codes
