1.2 KiB
1.2 KiB
Dependency Rules
Status: Mandatory Date: 2026-07-03
Rule Set
- One-way dependency direction only.
- No circular dependencies.
- No feature imports another feature directly.
- Shared is dependency-minimal and feature-agnostic.
- Core is platform base and does not consume feature modules.
- UI Library is pure presentation and cannot depend on facades/services with business behavior.
- Widgets depend on UI Library and contracts, not on feature internals.
- Pages compose layouts/widgets via contracts and facades.
- Facades depend on services/contracts, never on UI components.
- Integrations isolate external systems and expose stable interfaces.
Dependency Injection Rules
- Depend on interfaces/tokens where replacement is expected.
- Avoid direct concrete service references across bounded contexts.
- Use adapter pattern for legacy stable modules.
Cross-Domain Communication
- Allowed through contracts, events, and facade APIs.
- Forbidden through direct state mutation across domains.
Forbidden Patterns
- Component to HttpClient direct calls in reusable visual components.
- Direct environment import in visual components.
- Direct localStorage/sessionStorage usage in UI components.
- Route navigation logic in UI library components.