backend
backend copied to clipboard
Notification System Version2(backend)
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.