| name | theme-ecommerce |
| description | E-commerce application palette: variants, pages, entities, and flows for building a varied online-shopping app. Use when theme_preset is ecommerce.
|
E-commerce theme
Domain
Apps where users browse a catalog, build a cart, pay, and track orders. The
money flow (price โ discount โ total โ payment โ fulfillment) and the
ownership of orders/addresses are the parts that make exploits feel real.
Application variants โ pick ONE per lab
Choose a single variant; it biases everything below. If theme_free_text or
custom_prompt hints at one (e.g. "sneaker shop", "marketplace"), honor it โ
otherwise pick one at random so labs diverge.
- Fashion / general storefront โ single-seller catalog, sizes & variants,
reviews, coupons.
- Multi-vendor marketplace โ independent vendors, per-vendor storefronts,
payouts, commission.
- Digital downloads โ license keys / downloadable files after purchase, no
shipping.
- Grocery / delivery โ delivery slots, substitutions, address book, tips.
- Subscription box โ recurring plans, billing cycles, pause/skip, prorations.
- Auction / resale marketplace โ listings with bids, reserve prices, watch &
outbid, settle to the highest bidder.
- Print-on-demand / custom goods โ base products, per-order customization
(text/art), design previews, production status.
Roles โ choose the set that fits the variant
- anon โ browse catalog, search, view product (guest checkout optional).
- user (customer) โ cart, checkout, orders, reviews, addresses.
- vendor (service/seller) โ marketplace only: manage own products & orders.
- admin โ catalog, coupons, refunds, all orders.
Most exploits run as user.
Candidate pages โ select a coherent subset
Size the subset to endpoint_count (small โ home + catalog + cart + checkout;
xlarge โ the full list). Candidates: home/landing, category listing, search
results, product detail, cart, checkout, order confirmation, order history,
order detail, account/profile, address book, wishlist, reviews, coupon entry,
vendor storefront (marketplace), seller dashboard (marketplace), payouts
(marketplace), downloads / license library (digital), delivery slot picker
(grocery), subscription plans / manage subscription (subscription box), admin
catalog, admin orders, admin refunds.
Candidate entities (seed tables) โ select what the variant needs
Core (most variants):
- users โ id, email, password_hash, role, created_at
- products โ id, title, description, price_cents, stock, category_id, vendor_id?
- categories โ id, name, parent_id?
- carts / cart_items โ id, user_id, product_id, qty
- orders โ id, user_id, status, total_cents, address_id, created_at
- order_items โ id, order_id, product_id, qty, unit_price_cents
- reviews โ id, product_id, user_id, rating, body
- coupons โ id, code, kind (percent/fixed), value, max_uses, used
- addresses โ id, user_id, line1, city, postal, country
- payments โ id, order_id, amount_cents, method, status, created_at
Fashion / general storefront (variant):
- product_variants โ id, product_id, size, color, sku, stock
- wishlists โ id, user_id, product_id
Multi-vendor marketplace (variant):
- vendors โ id, name, owner_user_id, commission_bps, payout_balance_cents
- payouts โ id, vendor_id, amount_cents, status, requested_at, paid_at
Digital downloads (variant):
- license_keys โ id, order_item_id, user_id, product_id, key, revoked
- downloads โ id, license_key_id, file_path, max_downloads, used, expires_at
Grocery / delivery (variant):
- delivery_slots โ id, date, window, capacity, booked
- order_substitutions โ id, order_item_id, replacement_product_id, status
- tips โ id, order_id, amount_cents
Subscription box (variant):
- plans โ id, name, price_cents, cadence, active
- subscriptions โ id, user_id, plan_id, status, next_bill_at, paused_until?
- subscription_invoices โ id, subscription_id, amount_cents, period, paid_at
Seed โฅ5 rows in each content table, and multiple users each owning their own
orders/addresses, so cross-account exploits are possible.
Candidate user flows โ select the ones matching chosen pages/features
- Browse category โ open product โ add to cart โ checkout โ confirmation.
- Search โ filter/sort โ product detail.
- Apply coupon at checkout โ recalculated total โ pay.
- View order history โ open an order โ (request refund / track shipment).
- Write a review on a purchased product.
- Manage the address book โ set a default shipping address โ use it at checkout.
- (fashion) Pick a size/color variant โ add to wishlist โ move wishlist item to cart.
- (marketplace) Vendor adds a product โ it appears in catalog โ sells โ requests a payout.
- (digital) Buy a downloadable product โ retrieve license key โ download the file.
- (grocery) Reserve a delivery slot โ set substitution preferences โ check out โ add a tip.
- (subscription) Subscribe to a plan โ skip/pause a cycle โ billing updates on next run.
Candidate endpoints โ a feature may span several
Endpoints are a shared surface, not owned 1:1 by a feature (a single feature
often spans several, and an endpoint can back multiple features). Pick a coherent
subset alongside the pages above. Grouped by area:
- catalog / search โ
GET /api/products, GET /api/products/{id}, GET /api/search?q=&category=&sort=
- cart โ
GET/POST/DELETE /api/cart, PUT/DELETE /api/cart/items/{id}, POST /api/cart/coupon
- checkout / orders โ
POST /api/checkout, GET /api/orders, GET /api/orders/{id}, POST /api/orders/{id}/refund
- reviews / wishlist โ
POST /api/products/{id}/reviews, GET/POST/DELETE /api/wishlist
- account โ
GET/PUT /api/profile, GET/POST/PUT/DELETE /api/addresses
- vendor (marketplace) โ
GET/POST /api/vendor/products, GET /api/vendor/orders, GET/POST /api/vendor/payouts
- digital (downloads) โ
GET /api/licenses, GET /api/downloads/{id}
- grocery (delivery) โ
GET /api/slots, POST /api/slots/{id}/reserve, POST /api/orders/{id}/substitutions, POST /api/orders/{id}/tip
- subscriptions (box) โ
GET /api/plans, POST /api/subscriptions, POST /api/subscriptions/{id}/pause, POST /api/subscriptions/{id}/skip
- admin โ
/api/admin/products, /api/admin/orders, POST /api/admin/orders/{id}/refund
Where vulnerabilities fit naturally
- idor โ
GET /api/orders/{id}, /api/addresses/{id}, /api/licenses, vendor payouts โ view/edit another user's resource.
- sqli โ search/filter params (
q, sort, category).
- business_logic โ coupon reuse / stacking, negative-quantity or price-tamper at checkout, refund more than paid, inventory oversell, subscription proration abuse.
- xss โ review body, product Q&A, seller storefront description.
- file_upload โ product image / avatar / digital-good upload.
- race_condition โ coupon
max_uses, last-in-stock checkout, delivery-slot capacity, subscription credit.
- idor/privilege_escalation โ vendor accessing another vendor's orders; customer reaching
/api/admin/....
Diversity guidance
Pick ONE variant and a coherent subset of pages/entities/flows โ never emit
the whole menu. Let endpoint_count set the size and theme_free_text /
custom_prompt bias the variant and product naming. Two ecommerce labs should
look like different stores, not the same template twice.