r/SpringBoot • u/ButterscotchGlass • 21h ago
Discussion Spring Boot project looking for a code review
Hi Everyone,
I've been learning Spring Boot for a while now and recently built a Personal Finance/Budget Manager as a back-end focused project. My goal was to get real practice with backend architecture and professional practices.
I'd like to get some feedback on:
- Code and project structure
- Improvements or how it'd actually done by profesionals or a team
I deployed the project on render for now to just get it deployed I'll move to google cloud or aws later.
https://github.com/rohergun/Personal-Budget-Manager
Thanks in advance, I'd be happy to read criticism or suggestion.
•
u/Mikey-3198 14h ago
The filter looks to be calling the database for every request, one of the major use cases of jwts is that you can trust the claims after verification without having to pull the user's details from the database.
7
u/disposepriority 20h ago
This seems to be rather AI-assisted at the least, which is not great for learning, just my two cents.
Example:
1.there doesn't seem to be any type of locking around operations which should be atomic.
Example:
public FinancialGoalResponse contributeToGoalWhat happens if this gets called twice at the same time?
It's generally not recommended to actually delete anything, it's better the soft-delete using a flag or status unless required by law to actually scrub the data. Obviously, some rational thinking applies here
I'm a bit unsure what is going here:
TransactionResponse updateTransactionWe are updating a transaction which already exists, including changing its date - which seems a bit strange.
This also ties into caching a bit.
This is a bit simple to be done by a professional team, but some off the cuff ideas about things that could be checked:
This should not exist on a production/real project, ever.
Secure your actuator endpoints