Documentation/Commerce user guides

Architecture and domain boundaries

Understand service responsibilities and commerce authority.

On this page

Service responsibilities

ComponentResponsibility
Rust gatewayAuthentication, domain operations and receipts.
PostgreSQLTransactional records, constraints and migrations.
Admin/storefrontTyped operational and shopping interfaces.
Node rendererPublic documents from approved snapshots.
Python assistantOrchestration through scoped capabilities.
Node language engineSupported interpretation contracts.
WorkersSearch, reporting, exports and asynchronous work.

Keep authority in the owning domain

Domain services own catalog, stock, checkout, orders and other business rules. The gateway authenticates and admits requests.

Clients collect intent. The backend validates current identity, price, stock and revisions; committed records or receipts establish success.

Plan for synchronous and asynchronous state

  • Commerce transactions own related writes and reservations.
  • Search and reporting are derived, asynchronous views.
  • Published snapshots remain separate from revisioned drafts.
  • Availability subtracts live holds, independently of cleanup backlog.
  • Monitor worker tasks and dependency health.

Design integrations around contracts

Use supported APIs and preserve required revisions/replay keys. Keep business validation in its owning domain.

Each client has an independent database and configuration. Channels, themes and stock pools do not provide client isolation.