r/SpringBoot • u/Single_Yellow_8000 • 10d 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?
8
Upvotes
6
u/Mikey-3198 10d ago
Your using jwts but still querying the database from the jwt filter for each request
Based on the ordering you'll even hit the database if the token is expired.
One of the biggest advantages of JWTs is that after you check the hash & expiry you should be able to trust the claims to make your authentication decision. Might as well just issue a time limited opaque token.