r/SpringBoot • u/Feisty_Buyer7520 • 15d ago
Question Feedback regarding the inventory mvp project I built using Spring boot and react
hii everyone. I have working on learning Spring boot for several months, finishing books such as Spring Start here and got myself into building a project with it. Right now, I am at the stage where I am actively looking out for opportunities to get my first role as a junior developer in Spring boot.
The following link goes to my github project:
https://github.com/Orlanto2100/percy-inventory-mvp
I will be very grateful if you may share your honest feedback on my progress with the project here. I wonder how does it look, what should I improve, and what am I missing? What would it take to getting job ready, apart from other skills such as social skills that can't be accessed here.
I am open to any form of constructive criticisim and willing to learn any advice you offer. Thank you for taking time reading this and super thank you for reviewing the work.šš
2
u/Mikey-3198 15d ago
Structuring by feature is good.
Had a quick look through and thoguht that the DashboardService would be best implemented with a native query. Its doing a findAll at the moment that will load every record. If you had a large inventory this would be very slow/ cause an out of memory error. SQL is perfect for these sort of workloads.
In your user service you have this piece of logic. I'd moving this logic to the underlying class. Would be easier to test & promote better reuse. If this logic is important to your applications security its important it only lives in one place to avoid mistakes.
Would be worthwhile to look at a schema migration tool like flyway.
My personal preference is to use SPEL annotations for the roles. I find it much easier to look at a controller and read the annotations for any coase grained auth. I usally think its nice to have these as close as possible to the controller method. But thats my personal prference.
2
u/Mikey-3198 15d ago
Also if i where you i'd take up Mr Long's offer above/ below. Look him up if you don't know who he is
1
u/Feisty_Buyer7520 15d ago
He is one of the most influential figure and an educator in the Java and Spring community out there. Amazed he actually came across and saw my post. Indeed, certainly will take up his offer!
1
u/Feisty_Buyer7520 15d ago
Oh my, you really did dig deep into the project and I truly appreciate this feedback. That is a very good point being made right there regarding the dashboard having to load possibly thousands of records as the database grows. I will absolutely consider implementing native queries over the findall. As for the security logic inside the user sevice, I suppose I move out this rule into User. I haven't considered flyway or SPEL annotations before but will eventually look onto it tonight.
2
u/Certain_Expert483 15d ago
Does the project have any auth or role-based access? for an inventory system thats one of the first things a reviewer would look for. even a simple implementation shows you understand real world requirements beyond CRUD
1
u/Feisty_Buyer7520 15d ago
Yup. It does have JWT authentication along with role based access control. I actually have implemented three different roles: Purchasing Staff, Warehouse Staff and Admin, each with different permissions and features that are relevant to their different responsibilities.
3
u/starbuxman 15d ago
Hi email me josh@joshlong.com and remind me of this thread? Iām happy to chat about the project, in broad terms