PromptStack

E-commerce store

An online shop: a product catalogue with variants, a cart, checkout and payment, order management, fulfilment, and returns. Payments and tax handling are required, not optional.

You can change every choice once the builder opens.
Core features for the MVP
  • Product catalogue with variants, images, and stock levels
  • Category browsing and product search
  • Cart that survives a page reload and a return visit
  • Checkout with address capture, shipping options, and tax
  • Payment through a hosted provider, with webhook-confirmed orders
  • Order management for the shop owner, including refunds
  • Customer order history and status emails
Left for later
  • Discount codes and promotional pricing
  • Abandoned cart recovery emails
  • Product reviews and ratings
  • Multi-currency and regional pricing

Recommended stack

SectionRecommended
LanguageTypeScript
Frontend frameworkNext.js
UI and stylingTailwind CSSshadcn/ui
BackendNext.js server
API styleServer actions
Database enginePostgreSQL
Database providerNeon
ORM and data accessDrizzle
CachingCDN cachingUpstash Redis
AuthenticationClerk
Authorization and rolesRole-based access control
SecurityInput validationRate limitingCORS and CSRF protectionSecurity headers and CSPSecrets managementAudit logs
File storageAWS S3
SearchPostgres full-text search
Background jobs and cronInngest
Email and notificationsResend
PaymentsStripe
Hosting and deploymentVercel
CI/CDGitHub Actions
Monitoring and analyticsSentryPostHog
TestingVitestPlaywright
ExtrasSEOAccessibility (WCAG)BackupsDocumentation

Data model draft

Product

Something for sale, which may have several variants.

  • id
  • slug
  • title
  • description
  • status
  • categoryId
  • createdAt
  • Has many ProductVariants
  • Belongs to one Category
ProductVariant

A specific buyable version: size, colour, or pack.

  • id
  • productId
  • sku
  • optionValues
  • priceMinorUnits
  • currency
  • stockQuantity
  • Belongs to one Product
  • Has many OrderLines
Order

A completed purchase and its fulfilment state.

  • id
  • reference
  • customerId
  • status
  • subtotalMinorUnits
  • taxMinorUnits
  • shippingMinorUnits
  • totalMinorUnits
  • currency
  • placedAt
  • Belongs to one Customer
  • Has many OrderLines
  • Has one Payment
OrderLine

One variant, at the price and quantity bought.

  • id
  • orderId
  • variantId
  • quantity
  • unitPriceMinorUnits
  • titleSnapshot
  • Belongs to one Order
  • Belongs to one ProductVariant
Payment

The provider transaction backing an order.

  • id
  • orderId
  • provider
  • providerReference
  • status
  • amountMinorUnits
  • currency
  • confirmedAt
  • Belongs to one Order
Customer

Someone who has bought or has an account.

  • id
  • email
  • fullName
  • defaultAddressId
  • createdAt
  • Has many Orders
  • Has many Addresses