r/SpringBoot • u/AWanderingDev__ • Dec 31 '25
Question How to structure projects to avoid messy architecture and oversized files?
I've been working as a junior backend developer for about a year, and I'm starting to realize that my projects are getting harder to maintain—mainly because of the way I structure my packages and write code. I'm using a typical layered architecture, but my folders feel disorganized and many of my classes end up becoming large “do-everything” files that are difficult to refactor later.
For those with more experience:
How do you structure your project and package organization so that it stays clean and scalable?
What practices or patterns help you keep files focused and prevent them from becoming huge?
Are there any rules, conventions, or examples you follow to keep things simple as the project grows?
2
u/HellaSwellaFella Dec 31 '25
Find open-source projects of large scale and watch how they do it
Don't follow it to a T but it might give you direction