project/controllers/account --> project/shared/calc ^ | project/components/menu <------------
Try to keep your import dependency shallow.
When the dependency graph becomes deeper (i.e package x
imports y
, y
imports z
, z
imports x
) then circular dependencies
become more likely.
Sometimes code repetition is not a bad idea, which is exactly opposite of DRY (don't repeat yourself).