Skip to main content

0001: Providers sit behind ports owned by the Application layer

Status: Accepted ยท Date: 2026-09-29

Contextโ€‹

The Avalara contract and NDA aren't signed yet, Mexico may need another tax engine, and Sage may dictate a different FX source. Callers can't be rebuilt every time a provider changes.

Decisionโ€‹

Callers use this service's contracts only. The Application layer defines ITaxProvider, IAddressProvider, IPartyProvider, ICertificateProvider and IExchangeRateProvider. AvaTax, the Bank of Canada and the simulated engines are adapters. Architecture tests keep the Avalara SDK inside Integrations.Providers.AvaTax.

Consequencesโ€‹

  • Development and the public demo run on deterministic simulated providers.
  • A new provider is one adapter plus its registration. Contracts don't change.
  • Some AvaTax-specific capabilities have to be expressed in neutral terms first.