Organisation at scale.
WHAT BREAKS DOWN FIRST
Finding where something lives Knowing what a change affects Shared code accumulating unrelated things Duplicate implementations of the same thing
WHAT TO ESTABLISH
A consistent structure, documented Naming conventions Rules about what may import what
WHAT A FEATURE FOLDER SHOULD CONTAIN
Everything belonging to that feature.
WHAT IT SHOULD EXPOSE
A defined public interface, rather than every internal file.
WHY
It allows internal reorganisation without breaking others.
WHAT TO DO ABOUT SHARED CODE
Review periodically, moving anything used once back into its feature.
WHAT TO AVOID
A utilities folder collecting everything unclassifiable Deep folder nesting Circular dependencies
WHAT CIRCULAR DEPENDENCIES CAUSE
Unpredictable initialisation and build failures.
WHAT TO DETECT AUTOMATICALLY
Those, and imports violating your rules.
WHAT TO CONSIDER AT GREAT SCALE
Splitting into separately built packages.
WHAT THAT COSTS
Tooling complexity and coordination.
WHAT TO DO BEFORE THAT
Fix the structure within one codebase.