{"id":27796501,"url":"https://github.com/draphy/pushforge","last_synced_at":"2026-04-06T02:09:58.374Z","repository":{"id":288457067,"uuid":"968008329","full_name":"draphy/pushforge","owner":"draphy","description":"A modern, cross-platform Web Push Notification library with full VAPID support. Handles payload encryption, authentication, and delivery across Node.js, Browsers, Deno, Bun, and Cloudflare Workers. Zero dependencies, TypeScript-first, and built for modern web applications.","archived":false,"fork":false,"pushed_at":"2025-04-29T00:05:13.000Z","size":1119,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-29T01:25:16.200Z","etag":null,"topics":["browser","bun","cloudflare","cross-platform","deno","ecdh","hkdf","nodejs","typescript","vapid","web","webpush","webpush-notifications"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/org/pushforge","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/draphy.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,"zenodo":null}},"created_at":"2025-04-17T10:58:02.000Z","updated_at":"2025-04-29T00:02:53.000Z","dependencies_parsed_at":"2025-04-19T18:28:50.710Z","dependency_job_id":null,"html_url":"https://github.com/draphy/pushforge","commit_stats":null,"previous_names":["draphy/web-push-notifier","draphy/pushforge"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/draphy%2Fpushforge","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/draphy%2Fpushforge/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/draphy%2Fpushforge/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/draphy%2Fpushforge/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/draphy","download_url":"https://codeload.github.com/draphy/pushforge/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251416207,"owners_count":21585977,"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":["browser","bun","cloudflare","cross-platform","deno","ecdh","hkdf","nodejs","typescript","vapid","web","webpush","webpush-notifications"],"created_at":"2025-04-30T20:59:04.192Z","updated_at":"2026-04-06T02:09:58.368Z","avatar_url":"https://github.com/draphy.png","language":"TypeScript","readme":"\u003cdiv align=\"center\"\u003e\r\n\r\n\u003cimg src=\"images/logo.webp\" alt=\"PushForge Logo\" width=\"120\" /\u003e\r\n\r\n# PushForge\r\n\r\n**Web Push Notifications for the Modern Stack**\r\n\r\n[![npm version](https://img.shields.io/npm/v/@pushforge/builder.svg)](https://www.npmjs.com/package/@pushforge/builder)\r\n[![npm downloads](https://img.shields.io/npm/dm/@pushforge/builder.svg)](https://www.npmjs.com/package/@pushforge/builder)\r\n[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)\r\n[![TypeScript](https://img.shields.io/badge/TypeScript-first--class-blue.svg)](https://www.typescriptlang.org/)\r\n\r\nZero dependencies · Works everywhere · TypeScript-first\r\n\r\n[Documentation](packages/builder) · [npm](https://www.npmjs.com/package/@pushforge/builder) · [Report Bug](https://github.com/draphy/pushforge/issues)\r\n\r\n**[Try the Live Demo →](https://pushforge.draphy.org)**\r\n\r\n\u003c/div\u003e\r\n\r\n---\r\n\r\n## Live Demo\r\n\r\nSee PushForge in action at **[pushforge.draphy.org](https://pushforge.draphy.org)** — a fully working test site powered by PushForge on Cloudflare Workers.\r\n\r\n- **Enable push notifications** on your device with a single toggle\r\n- **Send a test notification** to all active devices — anyone visiting the page can send and receive\r\n- **See it working across browsers** — Chrome, Firefox, Edge, Safari 16+, and more\r\n- Subscriptions auto-expire after 5 minutes — no permanent data stored\r\n\r\nThe entire backend is a single Cloudflare Worker using `buildPushHTTPRequest()` from `@pushforge/builder` with zero additional dependencies.\r\n\r\n## The Problem\r\n\r\nTraditional web push libraries like `web-push` rely on Node.js-specific APIs that don't work in modern edge runtimes:\r\n\r\n```\r\n❌ Cloudflare Workers - \"crypto.createECDH is not a function\"\r\n❌ Vercel Edge - \"https.request is not available\"\r\n```\r\n\r\n## The Solution\r\n\r\nPushForge uses standard Web APIs that work everywhere:\r\n\r\n```typescript\r\nimport { buildPushHTTPRequest } from \"@pushforge/builder\";\r\n\r\nconst { endpoint, headers, body } = await buildPushHTTPRequest({\r\n  privateJWK: VAPID_PRIVATE_KEY,\r\n  subscription: userSubscription,\r\n  message: {\r\n    payload: { title: \"Hello!\", body: \"This works everywhere.\" },\r\n    adminContact: \"mailto:admin@example.com\"\r\n  }\r\n});\r\n\r\nawait fetch(endpoint, { method: \"POST\", headers, body });\r\n```\r\n\r\n## Why PushForge?\r\n\r\n| | PushForge | web-push |\r\n|---|:---:|:---:|\r\n| Dependencies | **0** | 5+ |\r\n| Cloudflare Workers | ✅ | [❌](https://github.com/web-push-libs/web-push/issues/718) |\r\n| Vercel Edge | ✅ | ❌ |\r\n| Convex | ✅* | ❌ |\r\n| Deno / Bun | ✅ | Limited |\r\n| TypeScript | Native | @types |\r\n\r\n\\* Requires `\"use node\";` directive — [see example](packages/builder#convex)\r\n\r\n## Quick Start\r\n\r\n```bash\r\n# Install\r\nnpm install @pushforge/builder\r\n\r\n# Generate VAPID keys\r\nnpx @pushforge/builder vapid\r\n```\r\n\r\n**Frontend** - Subscribe users:\r\n\r\n```javascript\r\nconst subscription = await registration.pushManager.subscribe({\r\n  userVisibleOnly: true,\r\n  applicationServerKey: VAPID_PUBLIC_KEY\r\n});\r\n// Send subscription.toJSON() to your server\r\n```\r\n\r\n**Backend** - Send notifications:\r\n\r\n```typescript\r\nimport { buildPushHTTPRequest } from \"@pushforge/builder\";\r\n\r\nconst { endpoint, headers, body } = await buildPushHTTPRequest({\r\n  privateJWK: process.env.VAPID_PRIVATE_KEY,\r\n  subscription,\r\n  message: {\r\n    payload: { title: \"New Message\", body: \"You have a notification!\" },\r\n    adminContact: \"mailto:admin@example.com\"\r\n  }\r\n});\r\n\r\nawait fetch(endpoint, { method: \"POST\", headers, body });\r\n```\r\n\r\nSee the [full documentation](packages/builder) for platform-specific examples (Cloudflare Workers, Vercel Edge, Convex, Deno, Bun).\r\n\r\n## Packages\r\n\r\n| Package | Description |\r\n|---------|-------------|\r\n| [@pushforge/builder](packages/builder) | Core library for building push notification requests |\r\n\r\n## Requirements\r\n\r\n- **Node.js 20+** or any runtime with Web Crypto API\r\n- Supported: Cloudflare Workers, Vercel Edge, Convex, Deno, Bun, modern browsers\r\n\r\n## Development\r\n\r\n```bash\r\ngit clone https://github.com/draphy/pushforge.git\r\ncd pushforge\r\npnpm install\r\npnpm build\r\n```\r\n\r\n## Contributing\r\n\r\nContributions welcome! See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.\r\n\r\n## License\r\n\r\nMIT © [David Raphi](https://github.com/draphy)\r\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdraphy%2Fpushforge","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdraphy%2Fpushforge","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdraphy%2Fpushforge/lists"}