# ADR-003: Import Boundaries and Dependency Direction

Status: Accepted
Date: 2026-07-03

## Context

Without strict dependency direction, large Angular codebases accumulate circular dependencies and feature coupling that block reuse.

## Decision

Enforce one-way dependency flow:

Website/Builder/Backoffice -> Pages -> Layouts -> Widgets -> UI Library -> Shared -> Core

Additional constraints:

- No circular dependencies.
- No feature importing another feature directly.
- Core does not depend on any feature.
- Shared does not depend on features.
- UI Library does not depend on features.

## Consequences

Positive:

- Stable architecture evolution.
- Easier testability and extraction.
- Faster onboarding with clear module contracts.

Negative:

- Some existing direct imports must be replaced by contracts.

## Compliance Requirements

- Enforce via lint boundaries and dependency checks.
- Violations block merge.
