backend icon indicating copy to clipboard operation
backend copied to clipboard

Notification System Version2(backend)

Open Catherine9898 opened this issue 1 year ago • 1 comments

This project builds upon the work of Junyi and Santosh, enhancing the notification system of Source Academy. This project builds upon the work of Junyi and Santosh, enhancing the notification system of Source Academy First and foremost, a comprehensive analysis of the existing notification system reveals its lack of security assurance, and the project's codebase exhibits issues in terms of code style. The following is an in-depth analysis of these concerns.

There are significant issues with the backend routing. The current system fails to differentiate between various roles and their respective pages, raising security concerns. To address this, I've implemented a separate router for different roles, supplemented by appropriate middleware for verification and validation, thereby reinforcing security. The backend must remain robust, independent of the frontend's behavior, as security forms the bedrock of the entire system.

Moreover, there are design flaws in the overall system architecture. The conceptual framework of Source Academy involves creating courses, each housing various types of assessments. The notification module should logically belong to each distinct assessment type. Unfortunately, this aspect was overlooked in the previous design. Consequently, I've restructured all notification system-related routes under distinct courses, implementing middleware to check the course registration information prior to accessing specific routes.

Maintaining consistent language style within the Elixir project is crucial. Elixir projects are characterized by pattern matching and the use of a piping fashion. Adhering to a consistent language style enhances the maintainability and scalability of the code repository.

The project incorporates Oban for task processing and Bamboo for email delivery. The notifications have been categorized into three types: trigger notifications, scheduled notifications, and periodic notifications. Among these, only scheduled notifications are time related. The entire notification system has been reconstructed, encompassing data, backend business logic, and frontend page design, based on these considerations. Moreover, future extensibility for various functionalities of the notification system has been considered.

Catherine9898 avatar Sep 06 '23 09:09 Catherine9898

Coverage Status

coverage: 88.345% (-7.0%) from 95.388% when pulling 9d6ff076d5e685a9d413ed595151b3f0672bc2ab on Catherine9898:sv into fdeb111ade9c38319bd92488412aced6c03cac6c on source-academy:master.

coveralls avatar Sep 19 '23 23:09 coveralls