Rebasely Beta: data may be purged

examples/storefront Public

Move payments into its own Worker #2

Changed files

30 files changed345 additions238 deletionssince main at 94db762

System

1 component added, 2 changed, 1 removed, 3 connections added, 3 connections removed, 1 view changed, 3 dataflows changed

  • Added
  • Changed
  • Removed
What this pull request changes in the system: 8 components, 10 connections storefront-api to db (d1)storefront-api to images (r2)storefront-api to payments (rpc): addedstorefront-api to order-events (queue)payments to storefront-api (rpc): addedpayments to stripe (https): addedfulfilment to storefront-api (rpc)storefront-api to stripe (https): removedstripe-webhook to storefront-api (rpc): removedstripe-webhook to stripe (webhooks): removedd1r2rpcqueuerpchttpsrpchttpsrpcwebhooksstorefront-api (changed)storefront-apiWorker · changedpayments (added)paymentsWorker · addedfulfilmentfulfilmentWorkerdbdbD1 databaseimagesimagesR2 bucketorder-eventsorder-eventsQueuestripe (changed)stripeExternal · changedstripe-webhook (removed)stripe-webhookWorker · removed

The system at the head of this pull request, with what it adds, changes and removes from the merge base 94db762. Select a component for what changed in it.

storefront-api

The public HTTP API (wrangler.jsonc, Worker storefront-api). Shoppers browse the catalog, fill carts and check out; the merchant edits products and uploads their images with the admin token. Its OrdersService entrypoint is how the other Workers change orders: it is the only Worker with the database binding. A cron trigger expires unpaid orders every five minutes. Payments go through the payments Worker; this Worker has no Stripe key.

Changed by this pull request:

  • description

Connections: storefront-api → payments added, payments → storefront-api added, storefront-api → stripe removed, stripe-webhook → storefront-api removed.

Takes part in Checking out a cart, Uploading a product image, Expiring an unpaid order, Fulfilling a paid order.

Changes

  • Changed: ~ storefront-api: description
  • Added: + component payments (worker)
  • Changed: ~ stripe: description
  • Removed: − component stripe-webhook (worker)
  • Added: + edge storefront-api → payments (rpc)
  • Added: + edge payments → storefront-api (rpc)
  • Added: + edge payments → stripe (https)
  • Removed: − edge storefront-api → stripe (https)
  • Removed: − edge stripe-webhook → storefront-api (rpc)
  • Removed: − edge stripe-webhook → stripe (webhooks)
  • Changed: ~ view checkout: components +payments −stripe-webhook
  • Changed: ~ flow checkout: 1 step added, 3 rerouted, description changed
  • Added: + flow order-expiry
  • Changed: ~ flow order-fulfilment: 2 steps rerouted, description changed

Knowledge base

Back to the conversation