felikshetalia's contribution for Flashcards app - #223
Conversation
There was a problem hiding this comment.
Hey @felikshetalia 👋,
I've reviewed your project, and it looks really solid. You put a lot of effort into it, and it definitely shows💪.
🟢 Your solution fulfills all of the project requirements👌
🟢 Your code is very well written, and I really like that you included both unit and integration tests even though they weren't required for this project. It shows that you're thinking about code quality and maintainability💪
⭐ I noticed you didn't complete the optional challenge, but that's completely fine. You can always come back to it later and give it a try. Those challenges, not only in this project but across the roadmap, are a great way to explore new concepts and learn even more😁
Suggestions
I've left some comments with suggestions and ideas for improvement👍. They're non-blocking, so feel free to implement whichever ones you find useful.
🟡 I noticed that validation logic is currently placed inside the repository layer. It might be worth moving it somewhere else, since repositories are usually responsible for database operations rather than business rules.
One downside of this approach is that verifying validation logic now requires integration tests, along with the extra setup and database interaction that involves. A cleaner approach would be to keep validation and business rules in the service layer, possibly by extracting them into separate validator classes that can be easily covered with unit tests. There's also a DDD-style approach to this, but that's probably a bigger conversation for another time😅
🟡 Instead of asking the user to enter the stack name manually, you could use SelectionPrompt with pagination: https://spectreconsole.net/console/prompts/selection-prompt/ . This would improve the user experience because users wouldn't need to remember exact stack names or go back and forth to check which stack they want to select.
🟡 Instead of returning an error about a UNIQUE constraint violation, it would be much better for the user experience to handle this case and display a friendly message, for example: "A stack with this name already exists."
Congrats on completing this project! 🎉 See you in the next ones. Keep up the great work 😎
|
Thanks a lot :) |
didn't attempt the challenge this time :(
spent all my energy on tests :(