despensa-app / despensa-rest-api

Despensa-app es una aplicación que te permite gestionar los productos que compras de forma habitual.
https://despensa-app.nmarulo.dev/
MIT License
5 stars 10 forks source link

Improve Folder Structure for Better Code Organization #14

Open PavanendraBaahubali opened 3 days ago

PavanendraBaahubali commented 3 days ago

I reviewed your code and noticed that the project structure could be improved for better organization and easier navigation. Specifically, in the path:

src/main/java/dev/nmarulo/depensaapp/app/products

Currently, all services, controllers, and repositories are placed within the same products folder. This structure makes it more difficult to navigate through the project and maintain separation of concerns.

Suggestion:

To improve the organization, you could create subfolders within the products folder, such as:

This structure would follow better practices and make the codebase easier to manage and navigate in the long run.

PavanendraBaahubali commented 3 days ago

So, can I work on this?

nmarulo commented 2 days ago

Hello @PavanendraBaahubali. Thank you for your interest.

It is not very clear to me the final result, if you prefer to do the PR or detail me a little more about the change.

However, if you mean partly why the APP package? My idea was to locate in one place all the resources (API) grouping them by “functionalities”, for example, the resources related only to the products are in the app/products package and so on with the others. I'm not following any architecture, I just found it comfortable this way. I am not saying that it is the best and if the need to change it arises, it will be changed. Moreover, I hope it will be so, I am not closed to change 🙂

PavanendraBaahubali commented 2 days ago

Thank you for the clarification!

To enhance the organization while keeping your current structure, one suggestion is to create subfolders within the products folder.

Thank You.

Hello @PavanendraBaahubali. Thank you for your interest.

It is not very clear to me the final result, if you prefer to do the PR or detail me a little more about the change.

However, if you mean partly why the APP package? My idea was to locate in one place all the resources (API) grouping them by “functionalities”, for example, the resources related only to the products are in the app/products package and so on with the others. I'm not following any architecture, I just found it comfortable this way. I am not saying that it is the best and if the need to change it arises, it will be changed. Moreover, I hope it will be so, I am not closed to change 🙂

nmarulo commented 2 days ago

@PavanendraBaahubali I agree with your comments.

Although, I still don't see the final result, if it's ok you can make a PR, if it's not too expensive with the minimum changes, and so we can see some code.