---
title: Quality Gates & Verification
summary: Static boundary enforcement, isolated component testing, end-to-end journey validation, and production build gates across all frontend surfaces.
owners:
  - catalog-experience-team
badges:
  - content: Architecture
    backgroundColor: purple
    textColor: purple
  - content: Reference
    backgroundColor: blue
    textColor: blue
---

## Purpose & Scope

This reference defines the mandatory verification pyramid and release quality gates for **Storefront**, **Commerce**, **Backoffice**, and shared workspace layers. It ensures architectural boundaries, type safety, accessibility rules, and end-to-end user journeys are validated before code reaches production.

## Verification Pipeline

Every change to frontend surfaces or shared layers progresses through sequential automated gates before merge:

<Steps>
<Step title="Formatting & Static Boundary Enforcement">

Automated checks verify uniform code formatting, strict workspace tier boundaries (preventing upward or circular imports), strict type checking, and zero-warning linting including static accessibility rules.

</Step>
<Step title="Isolated Unit & Component Verification">

Offline component and logic suites execute against deterministic mock service handlers and synthetic data factories, validating business rules, form schemas, and accessible DOM semantics without requiring live backend containers.

</Step>
<Step title="Production Bundle & Route Compilation">

Full production builds compile all three Next.js surfaces, validating Server/Client Component boundaries, environment schema completeness, and microfrontend routing manifests.

</Step>
<Step title="End-to-End Behavioral & Accessibility Journeys">

Behavior-driven browser suites exercise real customer journeys (catalog discovery, authentication, AI assistant, basket, and checkout across **Storefront** and **Commerce**) and staff workflows in **Backoffice**, alongside automated `axe-core` contrast and landmark audits.

</Step>
</Steps>

<Admonition type="warning" title="Zero-Warning Static Gate">
	Linting and type-checking operate with zero tolerance for warnings. Any static accessibility
	violation, illegal tier import, or type mismatch blocks pull request integration.
</Admonition>

## Patterns & Boundaries

| Concern / Surface             | Architectural Approach                                                                    | Responsibility Boundary                                                                          | Key Trade-off                                                                         |
| :---------------------------- | :---------------------------------------------------------------------------------------- | :----------------------------------------------------------------------------------------------- | :------------------------------------------------------------------------------------ |
| **Boundary & Type Gates**     | Workspace-wide tier validation and strict type checking with affected-task caching        | Shared config tier defines rules; CI enforces across all surfaces and libraries                  | Requires contributors to place shared abstractions in the proper tier upfront         |
| **Isolated Component Tests**  | Deterministic mock API handlers with per-worker isolated storage                          | Feature slices own unit/component specs; shared mock layer owns contract parity                  | Fast offline feedback, but cannot catch gateway routing or real session-cookie issues |
| **End-to-End BDD Suites**     | Gherkin-backed browser journeys covering **Storefront**, **Commerce**, and **Backoffice** | **Storefront** suite covers cross-zone customer checkout; **Backoffice** suite covers staff CRUD | Higher execution cost; requires running gateway and target surfaces                   |
| **Unified Quality Reporting** | Aggregated test and defect categorization across all three surfaces                       | Shared reporting config normalizes failures across unit and browser runs                         | Adds post-test aggregation step in CI pipelines                                       |

<Accordion title="Coverage Boundaries by Surface">

- **Storefront:** Covered by unit/component tests and 9 end-to-end behavioral suites spanning discovery, AI chat, authentication, accessibility, and cross-zone checkout.
- **Commerce:** Covered by unit/component tests; its end-to-end basket and checkout journeys are validated through the **Storefront** gateway suite.
- **Backoffice:** Covered by unit/component tests and 6 end-to-end behavioral suites covering authentication, catalog, customers, orders, and review moderation.

</Accordion>

## Quality & Operational Impact

- **Architectural Integrity:** Continuous boundary checks guarantee that the four-tier dependency model does not erode over time.
- **Release Confidence:** Combining fast offline mock tests with real cross-zone browser journeys catches both logic regressions and gateway routing/auth integration defects.
- **Accessibility Assurance:** Enforcing static accessibility rules alongside browser `axe-core` checks prevents common UI regressions from reaching production.
