Organizing code into type buckets (controllers/, models/, services/, utils/) scatters every feature across the whole tree — a single change touches five folders, and files pile up flat with no ownership boundaries.
Fix: Organize folders by domain/concern (e.g. auth/, billing/, db/), with each folder owning everything for its concern. A new concern gets a new folder. This keeps changes local, makes ownership obvious, and is the top-ranked practice in the largest community-curated Node.js best-practices guide.
code-qualityproject-structurefolder-structure
References
- https://github.com/goldbergyoni/nodebestpractices — Section 1.1 'Structure your solution by business components' explicitly recommends component/domain folders over technical-role folders.