Hub-like Dependency / God Component

A component with too many incoming/outgoing dependencies.

“A component that knows too much or is known by too much.” – Brown, AntiPatterns

Signs of Use (Symptoms)

  • One module is imported by almost every other module.
  • Changes to this component require widespread retesting.

Why it is bad (Consequences)

  • Bottleneck: Everyone depends on it.
  • Instability: Any change is high-risk.

Why it happens (Root Cause)

Utility classes, shared services, or central “managers” accumulate responsibilities.

Refactoring Solution

  • Extract Class: Break the hub into smaller, focused modules.
  • Facade: If it must aggregate, make it delegate without holding logic.

Code example

Typescript

Bad

Good