benjaminsunliu / Group6-SOEN341_Project_F24

SOEN341 Peer Assessment Project Fall 2024
2 stars 0 forks source link

Code Review: Refactor Backend Codebase into Modular Structure #108

Closed benjaminsunliu closed 1 week ago

benjaminsunliu commented 1 week ago

Summary

Backend routes have been refactor to different units for easier maintainability.

Detailed Summary

This pull request includes significant updates to the backend of the application, adding new middleware, models, and routes to enhance authentication, user management, and team functionalities. The most important changes are summarized below:

Middleware Enhancements:

Model Additions:

Route Implementations:

Dependency Updates:

These changes collectively enhance the backend capabilities, providing robust user authentication, role-based access control, and comprehensive team and rating management functionalities.

YehJordan commented 1 week ago

The server.js is a lot more clean and less cluttered. It is now more readable with all the endpoints being put into their own file based on functionality. It makes it more maintainable at the same time. Good comments indicating which route is being used. Functionality seems to be maintained (nice)

Having the jwt secret key exposed in server.js, authenticateToken,js and authentication.js is a vulnerability to be considered.

Consider adding missing tests later on.

Overall, the server refactoring seems really good.