Package by feature

com.myapp
├── order
│   ├── dto
│   ├── repository
│   ├── service
│   └── controller
├── product
│   ├── dto
│   ├── repository
│   ├── service
│   └── controller
└── user
    ├── dto
    ├── repository
    ├── service
    └── controller

Package by layer

com.myapp
├── dto
├── repository
├── service
└── controller

https://medium.com/sahibinden-technology/package-by-layer-vs-package-by-feature-7e89cde2ae3a

developmentarchitecturedesign