docs: push notification setup in README, fix VAPID_SUBJECT example

- .env.example: VAPID_SUBJECT without mailto: prefix (library adds it)
- README: VAPID env vars in table, push notification setup section
- README: add dm/ to project structure, keygen instructions
- README: iOS tap-gesture requirement and Android battery optimization notes
This commit is contained in:
2026-07-02 15:40:18 -04:00
parent 53f8c6b2ef
commit b4e2f97dba
2 changed files with 17 additions and 1 deletions
+1 -1
View File
@@ -20,6 +20,6 @@ LIVEKIT_API_SECRET=<gener...n
# Web Push
VAPID_PUBLIC_KEY=<generated>
VAPID_PRIVATE_KEY=<generated>
VAPID_SUBJECT=mailto:admin@your.domain
VAPID_SUBJECT=admin@your.domain
# Integrations
GIPHY_API_KEY=your_giphy_api_key_here
+16
View File
@@ -96,6 +96,7 @@ dumpsterChat/
│ ├── invite/ # Server invite links
│ ├── bot/ # Bot framework, auth, commands
│ ├── webhook/ # Incoming webhooks
│ ├── dm/ # Direct messages (conversations)
│ ├── push/ # Push notification sender (VAPID)
│ ├── permissions/ # Permission bitflags and checker
│ ├── moderation/ # Mute, ban, kick, slowmode, audit log
@@ -133,6 +134,21 @@ See `.env.example` for the full list. Key variables:
| `LIVEKIT_*` | Voice/video server | No |
| `GIPHY_API_KEY` | Giphy API key for GIF search | No |
| `MINIO_*` | File upload storage | No |
| `VAPID_PUBLIC_KEY` | Web push public key | No (generate with `go run ./cmd/keygen`) |
| `VAPID_PRIVATE_KEY` | Web push private key | No |
| `VAPID_SUBJECT` | Contact for VAPID JWT (e.g. `admin@your.domain`) | No |
### Push Notifications
Web push uses VAPID keys. Generate a keypair:
```bash
go run ./cmd/keygen
```
Copy the output into your `.env`. Set `VAPID_SUBJECT` to your email address **without** the `mailto:` prefix (the library adds it automatically).
Users are prompted to enable notifications on login. On iOS, the prompt requires a tap gesture, so a banner appears instead of a silent auto-subscribe. On Android, notifications deliver through FCM when Chrome is running (even in background). Ensure Chrome battery optimization is set to Unrestricted for reliable delivery when the PWA is closed.
## Wiki