Componentizing Shopify’s Tax Engine - Shopify
Jul 5, 2019

Summary
This post details the componentization of Shopify's tax engine. The team educated themselves on the tax domain, identified and refactored existing tax logic spread across the codebase, defined a clear interface with `TaxesRequestSchema` and `TaxesResponseSchema`, moved all tax-related source files into a new tax component, and implemented GitHub bot triggers to enforce boundaries. They updated testing suites with unit and integration tests, and released the component through an experimental code path that ran old and new calculations in parallel for comparison, followed by a phased rollout to 100% of shops.