> ## Documentation Index
> Fetch the complete documentation index at: https://vlyai-1c28d863.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# E-commerce apps

> Prompts for online stores — catalog, cart, checkout, inventory, orders.

E-commerce shares structure with marketplaces but is **single-seller**. Foundation prompt:

```text theme={null}
**Goal**: An online store selling {product type}.

**User**: Buyers (anyone, signed in or guest). Admins manage catalog and orders.

**Data**:
- `products`: { name, description, priceUsdCents, imageUrls, inventory, active }
- `cartItems`: { userId or sessionId, productId, quantity }
- `orders`: { buyerId, items, totalUsdCents, status, stripePaymentIntentId, shippingAddress, createdAt }

**Behavior**:
- Public catalog with search, filter by category, sort by price/popularity
- Product detail page with image gallery, add-to-cart
- Cart drawer always accessible from header
- Checkout: collect address, ship method, redirect to Stripe Checkout
- Order confirmation page + email
- Admin dashboard for orders and inventory

**Constraints**:
- Inventory decremented atomically on successful payment (in webhook handler)
- Out-of-stock products show but disable add-to-cart
- Guest checkout supported (cart by sessionId; convert to userId on signup)
```

## Variations

<Tabs>
  <Tab title="Variants (size / color)">
    Each product has variants. Each variant has its own SKU, inventory, optionally price.
  </Tab>

  <Tab title="Discounts / coupons">
    Add: coupon codes with % off, \$ off, free shipping. Validate at checkout.
  </Tab>

  <Tab title="Subscriptions">
    Add: subscription products (monthly box). Use Stripe subscriptions.
  </Tab>

  <Tab title="Reviews">
    Add: product reviews (1-5 stars + text), average rating displayed.
  </Tab>
</Tabs>

## Related

<CardGroup cols={3}>
  <Card title="Stripe integration" icon="credit-card" href="/integrations/stripe">
    Payment setup.
  </Card>

  <Card title="Marketplace recipe" icon="shopping-cart" href="/recipes/marketplace-with-stripe">
    Two-sided variant.
  </Card>

  <Card title="Five-layer method" icon="layers" href="/prompting/the-five-layer-method">
    The framework.
  </Card>
</CardGroup>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.