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

Notification System Version2(backend) #996

Open
wants to merge 101 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.

Santosh3007 and others added 30 commits February 14, 2023 15:32
- Create Notifications module and NotificationType model
- Start migration for adding notifications
- No functionalities added yet only template code
Changes:
* Replaced is_enable to is_enabled for Notification Preferences
* Update default is_enabled to true for Notifcation Types
`import_config` must always appear at the bottom for environment
specific configurations to be applied correctly. All configurations
after this line will overwrite configurations that exists in the
environment specific ones.
- remove auto-generated controllers and views that are not used
If user preference has no time option, use the time_option from
notification_config instead. This is so that the behaviour of these
users with no preferences would always follow the default chosen by the
course admin
@Catherine9898 Catherine9898 marked this pull request as ready for review September 6, 2023 13:49
@coveralls
Copy link

Coverage Status

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

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.

None yet

6 participants