{"id":21964950,"url":"https://github.com/decisiontreetechnology/webpushnotificationservice","last_synced_at":"2025-04-24T02:42:42.474Z","repository":{"id":193972194,"uuid":"689766589","full_name":"DecisionTreeTechnology/WebPushNotificationService","owner":"DecisionTreeTechnology","description":"An integrated web push notification service ABP Framework module","archived":false,"fork":false,"pushed_at":"2024-04-26T02:16:44.000Z","size":8888,"stargazers_count":5,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-30T06:11:15.441Z","etag":null,"topics":["abp-framework","webpush-notifications"],"latest_commit_sha":null,"homepage":"https://decisiontree.tech/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DecisionTreeTechnology.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2023-09-10T20:39:18.000Z","updated_at":"2024-12-07T05:57:40.000Z","dependencies_parsed_at":null,"dependency_job_id":"b8277a5a-4d60-48be-8898-f2a3ec5e29a0","html_url":"https://github.com/DecisionTreeTechnology/WebPushNotificationService","commit_stats":null,"previous_names":["decisiontreetechnology/webpushnotificationservice"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DecisionTreeTechnology%2FWebPushNotificationService","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DecisionTreeTechnology%2FWebPushNotificationService/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DecisionTreeTechnology%2FWebPushNotificationService/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DecisionTreeTechnology%2FWebPushNotificationService/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DecisionTreeTechnology","download_url":"https://codeload.github.com/DecisionTreeTechnology/WebPushNotificationService/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250551085,"owners_count":21449130,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["abp-framework","webpush-notifications"],"created_at":"2024-11-29T12:31:17.759Z","updated_at":"2025-04-24T02:42:42.453Z","avatar_url":"https://github.com/DecisionTreeTechnology.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# WebPushNotificationService ABP Framework Module\n# Overview\nThis module integrates web push notification services into applications using the [ABP framework](https://abp.io/). It facilitates real-time communication by enabling the sending and receiving of notifications directly through web browsers.\n\n# Features\n- Notification Management: Create, send, and manage web push notifications.\n- Subscription Handling: Manage user subscriptions for receiving notifications.\n- Real-Time Updates: Deliver notifications in real-time to engage users effectively.\n# Getting Started\nTo implement this module in your ABP framework application, @\u003cLexuan Zhou\u003e TBD... Ensure to configure the necessary dependencies and integrate the service with your application's frontend and backend.\n\n# Configuration\nStep 1:\n\n1. Install the [WebPushNotificationService ABP Framework Module](https://github.com/DecisionTreeTechnology/WebPushNotificationService) from Nuget into your project\n\n2. Add DependsOn(typeof(WebPushxxxModule)) attribute to configure the module dependencies.\n\n3. Add ```builder.ConfigureWebPush();``` to the OnModelCreating() method in ```MyProjectMigrationsDbContext.cs```.\n\n4. Add EF Core migrations and update your database.  The service will rely on three table to retrive and push notifications: ```WebPushContents```, ```WebPushSubscriptions``` and ```WebPushNotifications```\n\n\nStep 2:\n\nA pair of VAPID key is needed for the system (what is [VAPID Key](https://stackoverflow.com/questions/40392257/what-is-vapid-and-why-is-it-useful) 🤔). There are multiple ways to generate them. \n\nFor Angular:\n\n- Install the [web-push](https://www.npmjs.com/package/web-push) package from NPM by running ```npm install web-push -g```\n- Generate the vapid keys by running ```web-push generate-vapid-keys [--json]```. An example of a pair of VAPID Keys would be \n\n```\nPublic Key:\nBFwNomlUWWD2-wDR1cLhPQOxFskYDuUmseG_Pvi2DWI8eMMQuQufq27cQWa_tpO9sGK-AxRrKLdM2YLtdHTW1Dc\n\nPrivate Key:\nYcpv7MDLJpB9512dZoQ6m2puX6tlnhMoKVtydY0Lz94\n```\n\n\nStep 3:\n\nSet up the configuration by putting the pair of VAPID Keys into your application appsettings.json file. The structure of the key value pair would be as follow:\n\n```\n\"WebPush\": {\n    \"VapidKeys\": {\n      \"PublicKey\": \"YOUR-PUBLIC-KEY\",\n      \"PrivateKey\": \"YOUR-PUBLIC-KEY\"\n    },\n    \"Email\": \"YOUR-EMAIL\"\n  }\n```\n\n# Usuage\nCreate a ETO (event trasfer object) and push it to the event bus and it will handle the notification queue under the hood\n```\nvar pushNotificationEto = \n        new CreateWebPushNotificationEto(CurrentTenant.Id, new List\u003cGuid\u003e{createMessageInput.ToUserId}, createMessageInput.Subject, \n            null, null, null, null, new DateTime?(), null);\nawait _distributedEventBus.PublishAsync(pushNotificationEto);\n```\n\n\n\n\nContributions are welcome! If you have suggestions or improvements, please fork the repository and submit a pull request.\n\n# License\nThis project is licensed under the MIT License - see the LICENSE file for details.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdecisiontreetechnology%2Fwebpushnotificationservice","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdecisiontreetechnology%2Fwebpushnotificationservice","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdecisiontreetechnology%2Fwebpushnotificationservice/lists"}