@meshwhisper/push-service 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +27 -0
  2. package/package.json +7 -3
package/README.md ADDED
@@ -0,0 +1,27 @@
1
+ # @meshwhisper/push-service
2
+
3
+ Push-notification dispatcher for [MeshWhisper](https://github.com/twotwoonethree/meshwhisper). When a message arrives at a `@meshwhisper/node` for an offline device, the node calls this service's webhook and it fires a **silent, content-free wake signal** via Web Push (VAPID), APNs, or FCM. The device wakes, the SDK pulls the encrypted blobs, the app displays the message. No message content ever touches the push provider.
4
+
5
+ ## Run
6
+
7
+ ```bash
8
+ npm install -g @meshwhisper/push-service
9
+ PUSH_PORT=4000 VAPID_PUBLIC_KEY=... VAPID_PRIVATE_KEY=... VAPID_SUBJECT=mailto:you@example.com meshwhisper-push
10
+ ```
11
+
12
+ Point your node at it: `PUSH_WEBHOOK_URL=http://localhost:4000/notify`.
13
+
14
+ `npx @meshwhisper/cli init` scaffolds this as a Compose service with generated VAPID keys — you rarely need to set it up by hand.
15
+
16
+ ## Environment
17
+
18
+ | Variable | Purpose |
19
+ |---|---|
20
+ | `PUSH_PORT` | Listen port (default 4000) |
21
+ | `VAPID_PUBLIC_KEY` / `VAPID_PRIVATE_KEY` / `VAPID_SUBJECT` | Web Push (generate with `npx @meshwhisper/cli vapid`) |
22
+ | `APNS_KEY_ID` / `APNS_TEAM_ID` / `APNS_KEY_PATH` / `APNS_BUNDLE_ID` | iOS (optional) |
23
+ | `FCM_SERVICE_ACCOUNT_PATH` / `FCM_PROJECT_ID` | Android (optional) |
24
+
25
+ Push tokens are the most sensitive metadata in a MeshWhisper deployment — this service is the only component that holds them, and you run it yourself.
26
+
27
+ MIT
package/package.json CHANGED
@@ -1,14 +1,18 @@
1
1
  {
2
2
  "name": "@meshwhisper/push-service",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "MeshWhisper push notification service — dispatches APNs and FCM wake signals",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
7
7
  "bin": {
8
8
  "meshwhisper-push": "dist/index.js"
9
9
  },
10
- "files": ["dist"],
11
- "publishConfig": { "access": "public" },
10
+ "files": [
11
+ "dist"
12
+ ],
13
+ "publishConfig": {
14
+ "access": "public"
15
+ },
12
16
  "scripts": {
13
17
  "prepublishOnly": "npm run build",
14
18
  "build": "tsc",