Skip to content

Dependency Rules

Allowed Dependency Direction

flowchart LR
    Core[core] --> DomainA[domain app A]
    Core --> DomainB[domain app B]
    Core --> DomainC[domain app C]

Interpretation:

  • Domain apps may depend on core.
  • Domain apps should not depend on peer app internals.

Practical Rules

  • Use core for shared utility and policy code.
  • Keep module URLs, views, and templates in their owning module.
  • Prefer explicit interfaces for cross-domain integration points.

Review Checks

  • No peer private-module imports.
  • No circular imports introduced by new features.
  • Tests remain module-scoped unless integration behavior is intended.

Refactor strategy

If two domains need the same behavior, move it to core or a shared service module rather than importing one domain from the other.