RGPV Alerts

RGPV Alerts Project - Aaditya Jain Blog - Aditya Jain - AadityaJain-Dev

Project Name: RGPV Alerts

Aim: To create a reliable & user-friendly platform where users can subscribe to receive real-time notifications from RGPV & our website.

Language: Javascript
Database: [none]
Server: Github Pages
Others: Onesignal libraries

Status: [Live]
Source Code: https://github.com/AadityaJain-Dev/alerts.rgpvnotes.in
Project / YouTube link: http://alerts.rgpvnotes.in/

Information is power

Description: The previous version was fine, but it had its flaws & they had to be addressed. so after a lot of research, I was able to solve it & create a much better system to deliver notifications/alerts.

Problem: The problem with the previous version was that my hosting provider has limited my mail sending limit to 50 per day, even those 50 emails are not landing in inbox & are marked as spam. I needed a better & reliable way to deliver notifications.

Solution I suggest: A simple & completely free subscription-based system. All a user needs is any modern browser that supports push notification (which is most of them).

after I encountered the problems with email being marked as spam I was clueless about what I should do now. I first thought about using services like MailChimp, I even tried to register it but for some reason, my account was blocked so after a few more attempts, I gave up.

Then I started my research & after reading a lot of websites & blogs I came across OneSignal & push notifications. After reading their documentation & the features they provide, I decided to use them.
By using their documentations I created a web-app & hosted it on 000webhost. The only problem I had with it was, it was slow. All the execution of function starts only when their script was loaded from their CDN. It usually took a few seconds & until it loaded the page. Since I was their functions to check if the browser is supported or not, is the user subscribed or not, etc. I  was not able to render anything until the scripts loads.

All this lead me to understand the working of web push notification in more depth. Documentation by Mozilla devs was very useful for it. I read about web workers, web workers API, push notifications & push notification API. After reading all that I understood that I can easily check supported browser, notification permission, etc with vanilla javascript & inbuilt APIs, there is no need to use OneSignal functions.
After implementing it, the speed increased significantly & this implementation is more flexible.

Todo list:

  • Improve UX & UI