GSOC 2019 Project Proposal
OpenWISP Notifications Module
Problem Statement
Notifications are a good way of informing users about the occurence of
certain actions in a system. These notifications could be as a result of
an error, successful completion of a task or informative.
Currently in OpenWISP, there is a notification module which resides as
a submodule in openwisp-monitoring but this notification module is
only accessible by openwisp-monitoring. The notification module is still
under development as it only supports general email and web
notifications and can not be easily integrated into other modules.
In addition to being unable to receive in-app and email notifications
from other modules, users have limited options when customize their
notification settings. For example, disabling certain notification types
over a time period etc.
Languages and Technologies required
● Django
● Python
● Javascript ES6
● JQuery
● HTML5
● CSS
Project Objectives
● Extract the notification module from openwisp-monitoring and
update its code of openwisp-monitoring to use the new module.
● Add concept of notification types where users can disable
notification by types and over a period of time.
● Provide a general email notification template which is
configurable and accepts extra CSS
● Provide a javascript widget which supports infinite scrolling and
allows admins to view their notifications.
● Write API endpoints to get notification list, notification detail and
update read status of notifications.
● Make the notification module an optional dependency in
openwisp-controller and openwisp-network-topology.
Solution to Problem Statement
Provide a new notification module based on the submodule in
openwisp-notification. The module will support multiple notification
types with each having a customizable message and can be enabled
and disabled from the user’s profile page.
Notifications will be categorized into notification types. Each user will be
able to manage their notification types via their notification settings.
Each notification setting will have boolean fields for email and web.
When a user sets the email setting to true, the web value will also
change to true. A class diagram of the module is shown below.
Other modules that use the notification module will extend the notification
types by creating new NotificationType records. Once a new user gets
registered, notification settings get created for each of the notification types
with email and web notification channels set to true by default(indicating the
channel has been enabled to receive notification of that type). Each
notification type will have a message which will be configured from a text
template.
All notification settings for a user will be rendered on the user’s detail page
with two checkboxes (one for email and the other for web). When any of
these is unchecked the notification for that notification type gets disabled
for that user.
An HTML template will be used to generate the body of email notifications.
The template will have a letterhead containing the organization’s logo. A
section will be provided in the template for additional style by other models
which will extend it.
A javascript widget will be provided for the admin area which will support
infinite scrolling and permit admins to view notification details upon clicking
on them. This action will make an API call to the backend which changes
the status of the given notification to read if the previous status was unread.
In addition to this, two other API endpoints will be written,
● Get list of notifications filter by user id
● Get single notification detail
Disabling of Notifications
As earlier mentioned, each notification setting record for a user will contain
two boolean fields (web and email) to disable and enable web and email
notifications. Notifications will also get disabled for a given period of
time. This feature will be implemented with the use of Celery Beat. This
will be temporal disabling of notifications.
The temporal periods will include 1day, 3days, 1week, 1month and a
custom date. This feature will apply for all the notification channels
(web, email). So the admin will be able to independently disable either
web or email temporarily. What this does is, it will set the specific
field(email or web) on the notification_settings table to false and after
the specified period expires, the value will get toggled to true.
TIMELINE
Present - June 1, 2020: Community Bonding
● Familiarize myself with the OpenWISP codebase especially the
openwisp-controller, django-ipam, openwisp-network-topology,
openwisp-monitoring.
● Complete some issues to get more knowledge of the codebase.
Some issues include: #
28, #91, #3.
● Gather more information about the project and refine my
approach on how to solve the problem.
June 1 - June 7, 2020: Extract Notification Module
Extract the existing notification module from openwisp-monitoring as
an independent module.
● Create a new repository on Github for the project.
● Write database models and generate migrations for notification
tables.
● Write functions to create user notification settings.
June 8 - June 21, 2020: Email and Web notification
Write classes and functions which extend from django-notification to
create web notifications and send email notifications. This will use a
general template to generate the email body.
June 22 - June 28, 2020: JS Widget Implementation
Write a javascript widget for the admin which supports infinite scrolling.
● API endpoints to list notifications and notification detail
● API endpoint to mark notification(s) as read
June 29 - July 3, 2020: First Evaluation
Wrap up with any pending tasks and prepare to submit the first
evaluation.
Deliverable: Initial working version of openwisp-notification
July 4 - July 12, 2020: Add Celery Beat tasks
● Add celery tasks for temporal disabling of notification types
● Add celery tasks to delete old notifications
● Customize user detail page in include notification settings
July 13 - July 26, 2020: Add notification module to other modules
● Add notification module as an optional module in
openwisp-controller
● Add notification module as an optional module in
openwisp-network-topology
July 27 - July 31, 2020: Second Evaluation
Wrap up with any pending tasks and prepare to submit the second
evaluation.
Deliverable: user manage notification settings, notification subapps in
openwisp-controller and openwisp-network-topology.
August 1 - August 23, 2020: Testing and Documentation
● Prepare a travis-ci build
● Write unit tests
● Perform QA tests and ensure test coverage is above 95%
● Add a readme with a list of all available features, how to use the
module and how to contribute
August 24 - August 31, 2020: Final Evaluation
Wrap up with any pending tasks and prepare to submit the final
evaluation.
Deliverable: Completed working version of openwisp-notification with
documentation
Mentors
● Federico Capoano
About Me
My name is Lenya Hope Nembi, software engineering student at the
University of Buea in Cameroon. I was introduced into computer
programming at the age of 16 at a local startup which ran a search engine
for jobs listings. I started off learning/working with Java for the first three
years and then PHP (third year in the university). During my fourth year at
the University, I had a course on Python which was just basic python so I
decided to build my skill in python and the one of the possible ways was to
join, contribute to an open-source organization and potentially do GSoC.
I program in Python, Javascript, Java, PHP. I have some experience
working on real life projects and in collaboration with team members. I am
open to suggestions, excited about learning new things and love solving
problems, especially the ones that keep me up at night. This internship is
an opportunity for me to build up my skill and gather more experience in
software development.
Student Information
Name: Lenya Hope Nembi
Email: lehone4hope@[Link]
Telephone/Whatsapp: +237 675 230 094
Time Zone: GMT+1
Location: Buea, South West region, Cameroon
Pre-GSoC
[PR] [Link]
[PR] [Link]
[PR] [Link]
[ISSUE] [Link]
[ISSUE] [Link]
POST GSOC
● Continue Contributing to OpenWisp, especially to the project.
● Would love to mentor other internships like Google Code-in and
Outreachy.
● Help new members get started with OpenWISP.
● Provide Support on Chat and Forums.
● Hopefully participate in GSOC 2021 as a mentor.
ADDITIONAL INFORMATION
LinkedIn
University University of Buea
Major Software Engineering
Current Year/ Masters Yr 1
Expecting Graduation 2022
Github lehone-hp
OpenWISP handles lehone / lehone-hp