Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Notifications System Version 2 #2667

Open
wants to merge 41 commits into
base: master
Choose a base branch
from

Conversation

Catherine9898
Copy link
Contributor

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 Catherine9898 marked this pull request as ready for review September 6, 2023 13:49
@RichDom2185 RichDom2185 changed the title Notification System Version2(fronted) Notifications System Version 2 Sep 9, 2023
@coveralls
Copy link

coveralls commented Sep 9, 2023

Pull Request Test Coverage Report for Build 8029218091

Details

  • -98 of 98 (0.0%) changed or added relevant lines in 5 files are covered.
  • 6 unchanged lines in 3 files lost coverage.
  • Overall coverage decreased (-0.04%) to 37.174%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/pages/academy/adminPanel/subcomponents/notificationConfigPanel/TimeOptionCell.tsx 0 1 0.0%
src/pages/academy/adminPanel/subcomponents/NotificationConfigPanel.tsx 0 3 0.0%
src/commons/sagas/RequestsSaga.ts 0 7 0.0%
src/pages/academy/notiPreference/subcomponents/TimeOptionCell.tsx 0 20 0.0%
src/pages/academy/notiPreference/NotiPreference.tsx 0 67 0.0%
Files with Coverage Reduction New Missed Lines %
src/pages/academy/adminPanel/subcomponents/notificationConfigPanel/TimeOptionCell.tsx 1 0.0%
src/pages/academy/adminPanel/subcomponents/NotificationConfigPanel.tsx 1 0.0%
src/pages/academy/notiPreference/NotiPreference.tsx 4 0.0%
Totals Coverage Status
Change from base Build 8029208794: -0.04%
Covered Lines: 5811
Relevant Lines: 14717

💛 - Coveralls

Copy link
Member

@RichDom2185 RichDom2185 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the reason for the differences between the behaviours of the two different TimeOptionCell components? Was this intentional?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants