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 for Dalgo #442

Open
16 tasks
fatchat opened this issue Jan 31, 2024 · 23 comments
Open
16 tasks

Notification System for Dalgo #442

fatchat opened this issue Jan 31, 2024 · 23 comments
Assignees
Labels

Comments

@fatchat
Copy link
Contributor

fatchat commented Jan 31, 2024

Description

This project will build a notification system for Dalgo. Although this ticket is part of the DDP_backend repo, the selected contributor will work on the frontend webapp repo as well, and possibly on the prefect-proxy repo if required

Goals

  • An interface for a Dalgo admin to post a notification to a user or to a set of users
  • Support for multiple notification channels
  • Email should be one channel
  • Discord should be one channel
  • Users should be able to choose their preferred channel
  • Users should be able to turn off notifications to all channels
  • Notifications should appear in the React frontend
  • Indicator for unread notifications for a user in the frontend
  • "Urgent" notifications should appear as a horizontal bar in the frontend e.g. for "System is going down in 10 minutes!" type of messages

Expected Outcome

In the backend:

  • a Python interface to create new notifications, fetch unread notifications for a user, fetch the notification history and more
  • an API to create new notifications (this API will be invoked by the dalgo-admin tool)
  • a pub-sub model in which handlers for the various notification channels can subscribe and receive new notifications to be sent out
  • handlers for Email and Discord to start off with

In the frontend

  • Notifications in the toolbar (e.g. a "bell icon") showing number of unread
  • User should be able to view their unread notifications by clicking on the icon
  • A notification bar for "urgent" notifications, possibly with a red background or something similarly eye-catching
  • A UX where a user can set and manage their notification preferences

Acceptance Criteria

  • Text-only notifications are acceptable, but extra points for rich text (html, markdown)
  • Admin should be able to send notifications to individual users
  • Admin should be able to send notifications to a set of users (including all users)
  • Admin should be able to send "urgent" notifications
  • Users should receive or not receive channel notifications based on their preferences
  • Users should see notifications in the frontend as described above
  • Notification history should be stored in the database

Implementation Details

Libraries may be used but must be open-source
Our backend is Django and our frontend is NextJS

Mockups / Wireframes

None but we will decide on designs before the frontend work begins

Product Name

Dalgo

Project Name

Notification System for Dalgo

Organization Name:

Project Tech4Dev

Domain

Other

Tech Skills Needed:

Python, Django, JavaScript, NextJS

Mentor(s)

@fatchat

Complexity

High

Category

Integrations, Feature

Sub Category

API, Frontend, Backend

@Shruti3004
Copy link

@Ishankoradia Ishankoradia moved this to Jul - Sep 2024 in Dalgo Roadmap Feb 22, 2024
@venkatramanm
Copy link

@SaumyaSamagra , The requirements seem quite clear and it seems to be doable in the timeframe of the internship.
What is the pub-sub mechanism to be used, is not mentioned. Some clarity may be added or may need to be figured out earlier on on the project. That may be added to the skill set requirement as a preference.

@Snehil-Shah
Copy link

@fatchat is the plan to use something like RabbitMQ/Kafka for the pub-sub model?

@fatchat
Copy link
Contributor Author

fatchat commented Mar 10, 2024

@Snehil-Shah I'm looking for a solution which uses an existing library. Having said that, I'd want to avoid a library which uses Kafka since that would be overkill. Rabbit/Zero/something small

The contributor would need to know how the notifications library is using its messaging components, but only for testing and debugging and not for extending them

@amansgith
Copy link

Hii @fatchat can "FastAPI Websocket Pub/Sub" package be used for it.. as its lightweight and maybe still effective for the pub sub model
Link

@ricky08sirus
Copy link

I want to contribute for this project as a part of DSP 2024.
please guide me with the procedure @fatchat .

1 similar comment
@srihari77
Copy link

I want to contribute for this project as a part of DSP 2024.
please guide me with the procedure @fatchat .

@AkanshuAich
Copy link

Hii @fatchat,

I am writing to express my interest in contributing to this project as a part of DSP 2024. Having thoroughly reviewed the project, I am impressed by its objectives and it seeks the potential for great impact in industries.

With my background in Backend using Django , MERN with practicing hands on Machine learning, I believe I can make valuable contributions to both backend and frontend part. My experience includes several projects like Society-Expenditure Manager using Django and Real Estate using MERN, which I believe align well with the goals of your project.

I am particularly interested in fulfilling the requirements of the project and have some ideas on how to approach it effectively. I am committed to adhering to best practices, contributing high-quality code, and actively collaborating with the project maintainers and community.

I am excited about the opportunity to contribute to Notification System for Dalgo and help further its mission. I look forward to discussing potential contributions and how I can best support the project.

Please guide me with procedure and with all your knowledge and experience.

@fatchat
Copy link
Contributor Author

fatchat commented Apr 11, 2024

hello all, thank you for your interest

please refer to the c4gt website / discord community on how to apply

and as much as i would love to, i won't be mentoring anyone during the application process... there are just too many people. whoever is selected will get two hours a week from me

thank you again

@SaumyaSamagra
Copy link

SaumyaSamagra commented Apr 11, 2024 via email

@SaumyaSamagra
Copy link

SaumyaSamagra commented Apr 11, 2024 via email

@AbhimanyuSamagra
Copy link

Do not ask process related questions about how to apply and who to contact in the above ticket. The only questions allowed are about technical aspects of the project itself. If you want help with the process, you can refer instructions listed on Unstop and any further queries can be taken up on our Discord channel titled DMP queries.

@AkanshuAich
Copy link

@fatchat for the notification system using Django framework it will be more efficient to go with the third-party applications like Pusher, Firebase Cloud Messaging (FCM), Amazon Simple Notification Service (SNS), and Twilio. Celery with redis/RabbitMQ is also a good option as the background function and the notification system both can work simultaneously.

@RSN601KRI
Copy link

Hello, @fatchat , I would like to contribute to this project. I have the required skillset for it. Kindly guide me so that I can contribute to this project.

@amansgith
Copy link

Hi @fatchat can you help me with these things regarding the project of C4GT:

  1. What problem exists in Dalgo or what will be enhanced by this system for which the notification system is to be developed?
  2. Is any previous work related to the notification system already started or done?
  3. As different channels like Email or discord have different methods for API usage and invocation method.. for handling these do we need to build a common platform so that new handles can be added in future?

Thanks

@fatchat
Copy link
Contributor Author

fatchat commented Apr 20, 2024

@amansgith

  1. We currently have notifications only for failures of flow-runs, and these only go to our Discord #ops channel. We would like to be able to send notifications to a user's email address, and let them configure this. More generally we would like to
    a. notify users when their connection schemas change
    b. notify users when the platform is going down for upgrades
    c. any other messages we would like to send our users

  2. No

  3. Yes, with limits. Right now we only want to be able to send text notifications, not html or rich-text or whatever else

@AbhimanyuSamagra
Copy link

Do not ask process related questions about how to apply and who to contact in the above ticket. The only questions allowed are about technical aspects of the project itself. If you want help with the process, you can refer instructions listed on Unstop and any further queries can be taken up on our Discord channel titled DMP queries. Here's a Video Tutorial on how to submit a proposal for a project.

@SachinSangaal
Copy link

SachinSangaal commented Apr 24, 2024

Hello @fatchat I want to contribute for this project of C4GT 2024.
please guide me with the procedure.

@techiAlok
Copy link

Hello @fatchat i too want to contribute to this project of C4GT 2024.
please guide me to move further in the process.

@nairabhishek73 nairabhishek73 changed the title Notification System for Dalgo Notification System for Dalgo (High) May 7, 2024
@Rishikesh63
Copy link

@fatchat is DMP selection of DalgoT4D announced?

@fatchat
Copy link
Contributor Author

fatchat commented May 30, 2024 via email

@fatchat fatchat changed the title Notification System for Dalgo (High) Notification System for Dalgo Jun 21, 2024
@huzaifmalik786
Copy link
Collaborator

huzaifmalik786 commented Jun 23, 2024

Weekly Learnings & Updates

Week 1

  • Set up the DDP_backend project locally along with prefect-proxy and airbyte server.

Week 2

Week 3

  • Create notification, recipients, and user preference table models and make migrations.
  • Create functions for managing user preferences.
  • Create APIs for calling functions for managing user preferences

Issues:

PR:

Week 4

  • Create functions for creating notification, deleting notification, fetching notification history, fetching notifications for a user, mark notification as read or unread.
  • Create APIs for managing notification related functions.
  • Create email and discord handlers.
  • Create a celery worker for scheduling notification.

Issues:

PR:

Week 5

  • Write pytests for notification APIs.
  • Write pytests for notification preferences APIs.
  • Write pytests for notification core functions.

Issues:

PR:

Week 6

  • Create UI for user panel to see notifications.
  • Integrate user panel with backend APIs.

Week 7

  • Add an API for fetching unread notification count.
  • Add tests for this API.
  • Integrate it with user panel frontend.

Issues

PR:

Week 8

  • Add a pop up to update user's notification preferences.
  • Intergrate user preferences with backend APIs.

Week 9

  • Planning and discussion for writing scripts to create and delete notifications
  • Assigned to 3 different tickets other than this ticket.

Issues

Week 9

  • Make the save button floating when scrolling throughout the table.

Issues

PR:

Week 10

  • Add column search in all the forms.

Issues

PR:

Week 11

PR:

Week 12

  • Created a new API to fetch graph for a flow run.
  • Added limit, offset and task_run_id to the logs API to fetch logs for a task run with pagination.

Issues:

PR:

Week 13

  • Changes in the webapp application to apply pagination to the logs.

PR

Week 14

  • Added scripts for creating and deleting notifications.
  • Tested all the use cases.

PR

@github-project-automation github-project-automation bot moved this from Jul - Sep 2024 to Apr - Jun 2024 in Dalgo Roadmap Jun 23, 2024
@fatchat fatchat moved this from Apr - Jun 2024 to Jul - Sep 2024 in Dalgo Roadmap Jun 23, 2024
@fatchat
Copy link
Contributor Author

fatchat commented Jun 27, 2024

Weekly Goals

Week 1

  • Talked about the project, architecture, approach

Week 2

  • Set up the codebase locally.
  • Make a documentation file for the ticket.
  • Learn how to make migrations and revert them.

Week 3

Week 4

  • Create functions for handling fetch, create, delete, update read_status of notifications and sending notification through email and discord.

Week 5

  • Manage scheduling of notifications.
  • Wrote pytests for all backend functions

Week 6

  • UI to view notifications

Week 7

  • API to get unread count

Week 8

  • Notification Preferences panel

Week 9

Week 10

Week 11

Week 12

Week 13

Week 14

  • Django management command to create a notification

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Jul - Sep 2024
Development

No branches or pull requests