How to structure a project
Quite often, I open a project’s code and see the basic framework scaffold dominating the landscape. But when I open a project, my first question usually isn’t which framework was used to create it, but rather: _what the heck does this app do?
For me, it is always better when, at first glance, I see not technical layers (controllers, components, repositories, etc.) but domain concepts instead. I would even argue that when a project is structured around domain concepts, it facilitates better communication between developers and product stakeholders, ultimately promoting the interests of the business.
So, instead of a structure like this:
- controllers
- repositories
- entities
I would go for:
- user
- product
- shipping