Saltar al contenido principal

E-Commerce Integration Module

Reference for apps/backend/src/ecommerce/.

Detailed architecture and operational behavior now lives in: dev/integrations/ecommerce-adapter-architecture


Overview

The ecommerce module connects a FlowPOS business to external storefront providers through a provider-port architecture.

Current provider status:

  • Shopify: implemented
  • WooCommerce: in progress (adapter not yet registered)

API surface (high level)

Authenticated (EcommerceController):

  • GET /ecommerce/connection
  • GET /ecommerce/oauth/url
  • GET /ecommerce/sync/log
  • POST /ecommerce/sync/products
  • POST /ecommerce/sync/collections
  • POST /ecommerce/sync/poll
  • GET /ecommerce/debug/poll (dev-oriented)
  • GET /ecommerce/debug/scopes (dev-oriented)
  • DELETE /ecommerce/connection

Public:

  • GET /ecommerce/oauth/callback
  • POST /ecommerce/webhooks/shopify

Most authenticated endpoints require businessId query parameter.


Quick operational notes

  • Webhook route POST /ecommerce/webhooks/shopify is public and HMAC-protected.
  • Polling fallback uses BullMQ queue ecommerce-polling.
  • Connection credentials are encrypted at rest.

For architecture layers, runtime flows, and troubleshooting details, use: dev/integrations/ecommerce-adapter-architecture.