{"id":19493334,"url":"https://github.com/negrel/webpush","last_synced_at":"2025-02-25T20:20:00.186Z","repository":{"id":241149630,"uuid":"804462304","full_name":"negrel/webpush","owner":"negrel","description":"Web Push library for Deno and other web compatible runtime.","archived":false,"fork":false,"pushed_at":"2024-05-22T16:49:28.000Z","size":39,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-05-22T17:56:45.765Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/negrel.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,"publiccode":null,"codemeta":null}},"created_at":"2024-05-22T16:25:28.000Z","updated_at":"2024-05-22T17:56:49.973Z","dependencies_parsed_at":"2024-05-22T17:56:49.379Z","dependency_job_id":"50b04b64-d2d9-4801-9008-41333d63c76f","html_url":"https://github.com/negrel/webpush","commit_stats":null,"previous_names":["negrel/webpush"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/negrel%2Fwebpush","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/negrel%2Fwebpush/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/negrel%2Fwebpush/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/negrel%2Fwebpush/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/negrel","download_url":"https://codeload.github.com/negrel/webpush/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240738768,"owners_count":19849652,"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":[],"created_at":"2024-11-10T21:25:23.566Z","updated_at":"2025-02-25T20:20:00.129Z","avatar_url":"https://github.com/negrel.png","language":"TypeScript","readme":"# `webpush` - Web Push library for Deno and other web compatible runtime.\n\n![jsr badge](https://jsr.io/badges/@negrel/webpush)\n![license MIT badge](https://img.shields.io/github/license/negrel/webpush)\n![code size badge](https://img.shields.io/github/languages/code-size/negrel/webpush)\n\n`webpush` is a Web Push library\n([RFC 8291](https://www.rfc-editor.org/rfc/rfc8291) and\n[RFC 8292](https://www.rfc-editor.org/rfc/rfc8292)) based on Web APIs.\n\n\u003e NOTE: This library hasn't been reviewed by crypto experts and may be unsecure.\n\u003e I've done my best to follow RFC recommandation and I only used primitives\n\u003e provided by the SubtleCrypto API.\n\n`webpush` is available on [JSR](https://jsr.io/@negrel/webpush).\n\n## Getting started\n\nBefore sending Web Push message to a user agent, you need to create VAPID keys\n(see [RFC 8292](https://www.rfc-editor.org/rfc/rfc8292)) to identify your server\n(`Application`) to the `Push Service`:\n\n```\n+-------+           +--------------+       +-------------+\n|  UA   |           | Push Service |       | Application |\n+-------+           +--------------+       +-------------+\n    |                      |                      |\n    |        Setup         |                      |\n    |\u003c====================\u003e|                      |\n    |           Provide Subscription              |\n    |--------------------------------------------\u003e|\n    |                      |                      |\n    :                      :                      :\n    |                      |     Push Message     |\n    |    Push Message      |\u003c---------------------|\n    |\u003c---------------------|                      |\n    |                      |                      |\n```\n\nRun\n[`generate-vapid-keys`](https://github.com/negrel/webpush/blob/master/cmd/generate-vapid-keys.ts)\nscript part of this repository to generate new keys:\n\n```sh\n# You can use any Web compatible runtime.\n$ deno run https://raw.githubusercontent.com/negrel/webpush/master/cmd/generate-vapid-keys.ts\n```\n\nCopy the output of the command and save it in `example/vapid.json`. Now you can\nrun example server.\n\n```\n$ cd example/\n$ deno run -A ./main.ts\n```\n\nCode is commented be sure to read it.\n\nI also wrote an\n[ok-ish blog post about Web Push and this library](https://www.negrel.dev/blog/deno-web-push-notifications/).\n\n## Dependencies\n\nThis library tries its best at keeping the minimum number of dependencies. It\nhas no external dependencies except some runtime agnostic\n[`@std/`](https://jsr.io/@std/) packages maintained by Deno team and\n[`http-ece`](https://github.com/negrel/http-ece), which I maintain.\n\n[`http-ece`](https://github.com/negrel/http-ece) also only depends on\n[`@std/`](https://jsr.io/@std/) packages.\n\n## Contributing\n\nIf you want to contribute to `webpush` to add a feature or improve the code\ncontact me at [alexandre@negrel.dev](mailto:alexandre@negrel.dev), open an\n[issue](https://github.com/negrel/webpush/issues) or make a\n[pull request](https://github.com/negrel/webpush/pulls).\n\n## :stars: Show your support\n\nPlease give a :star: if this project helped you!\n\n[![buy me a coffee](https://github.com/negrel/.github/blob/master/.github/images/bmc-button.png?raw=true)](https://www.buymeacoffee.com/negrel)\n\n## :scroll: License\n\nMIT © [Alexandre Negrel](https://www.negrel.dev/)\n","funding_links":["https://www.buymeacoffee.com/negrel"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnegrel%2Fwebpush","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnegrel%2Fwebpush","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnegrel%2Fwebpush/lists"}