RVM.ShopEngine
E-commerce engine with catalog, session-based cart, checkout with stock control and payment lifecycle.
Overview
RVM.ShopEngine is a complete e-commerce engine with product catalog by categories (with slug), session-based cart, checkout with validation and automatic stock decrement, and full payment lifecycle (Pending -> Authorized -> Captured -> Failed -> Refunded). Supports multiple payment methods (CreditCard, DebitCard, Pix, BankSlip, Wallet) and maintains product snapshots at order time.
Features
- Product catalog with categories, slugs, SKU, prices and stock
- Session-based cart with automatic total calculation
- Checkout: creates Order from Cart with stock validation and atomic decrement
- Automatic OrderNumber generation
- Product snapshot at order time (price, name saved in OrderItem)
- Order lifecycle: Pending -> Confirmed -> Processing -> Shipped -> Delivered / Cancelled / Refunded
- Payment lifecycle: Pending -> Authorized -> Captured -> Failed -> Refunded
- 5 payment methods: CreditCard, DebitCard, Pix, BankSlip, Wallet
- Product search with filters by query, category and active status
Technologies
Patterns & architecture
REST endpoints
| Method | Path | Description |
|---|---|---|
| GET | /api/products | Search products |
| GET | /api/categories | List categories |
| GET | /api/cart/{sessionId} | View cart |
| POST | /api/cart/{sessionId}/items | Add to cart |
| POST | /api/orders | Create order from cart |
| POST | /api/payments/{orderId}/capture | Capture payment |