Merged
Conversation
… into refactor-mvc
RedHellier
approved these changes
May 23, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📌 Summary
This pull request refactors the back-end route and folder structure to improve clarity and maintainability. The previous routing setup mixed responsibilities between admin and user functionality, which caused confusion and overlap in the service layers.
🔍 Related Issues / Tickets
📂 What’s Changed (in the back end)
Refactored folder and route structure for better separation of concerns
Reorganized the following routes:
adminRoutes➜ handles high-level access to users and resourcesuserRoutes➜ for user-specific operations like updating profiles or viewing public inforesourceRoutes➜ for posting and updating resources (user-driven actions)authRoutes➜ dedicated to authentication logicMoved createUser from users route into auth route under signup.
🧪 How to Test
npm installnpm run devto start the server`POST http://localhost:5000/resources
Content-Type: application/json
{
"title": "New Resource Title",
"content": "This is the content of the new resource.",
"created_by": "2fc9e2a7-776c-43ba-bd24-9b863096120b"
}`
`
POST http://localhost:5000/auth/signup
Content-Type: application/json
{
"email": "somethingsomething@gmail.com",
"password": "supersecretpassword69",
"role": "user"
}
`
✅ Checklist
🧠 Notes for Reviewers
Please verify:
userServiceandresourceServiceno longer have mixed concerns