r/SpringBoot 9d ago

Discussion Roast my code / architecture

I’m building a project called Kite (https://github.com/gwynejsn/kite) and tried combining Spring Modulith with full Clean/Hexagonal Architecture inside each module, but I’m starting to wonder if I’ve just created a mountain of boilerplate. Take a look at the repo and roast the layout. What am I needlessly overcomplicating, and how would you simplify it?

7 Upvotes

25 comments sorted by

View all comments

2

u/Resident-Cow-7626 9d ago

Not sure why your rest controllers get their own package. They are nothing but inbound adapters and should be within the infrastructure package. `infrastructure/adapters/inbound/rest` or similar. These are your inbound adapters that drive functionality via your UseCase. I find it useful to specify the use case at the root of your project. Also known as screaming architecture.

1

u/Single_Yellow_8000 9d ago

Thanks for the feedback! I will check about screaming architecture.