Changeset 96c714f in Klonkt for .env.example


Ignore:
Timestamp:
07/22/2026 07:12:11 AM (7 weeks ago)
Author:
Robin <roboburr@…>
Branches:
main
Children:
9a00f28
Parents:
8240e80
git-author:
Robin <roboburr@…> (07/22/2026 07:11:54 AM)
git-committer:
Robin <roboburr@…> (07/22/2026 07:12:11 AM)
Message:

Feature: web push slice 4, burst throttle + docs

  • Burst throttle: a wave of likes or a mass-follow becomes one ping, not a wave of pushes. Per (user, type) at most one push per window (like/boost 300s, follow 60s, reply/dm 30s, test never throttled); extras drop silently — the events themselves still land in Berichten, only the ping is deduped. In-memory (one process; a restart costs at most one extra ping). Pure throttled() exported and pinned by test.
  • README: push notifications feature bullet, VAPID_* in the config table, storage/.vapid in the auto-generated-secrets + backup section (restoring without it silently breaks every subscription).
  • .env.example: VAPID block in the SESSION_SECRET/PAID_SECRET style.

Pruning (404/410 → row deleted) and the iOS install hint already landed in
slices 1-2; this closes the plan from docs/webpush-design.md.

Changed files:
src/services/PushService.js

  • throttled() + window table; notifyUser checks it first

test/push.test.js

  • throttle windows, per-type/per-user independence, test bypass

README.md

  • feature bullet, VAPID config row, backup warning

.env.example

  • VAPID_PUBLIC_KEY / VAPID_PRIVATE_KEY / VAPID_SUBJECT

-robo
Co-Authored-By: Claude Opus 4.8 <noreply@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • .env.example

    r8240e80 r96c714f  
    1515# so a database dump alone stays useless). Or set your own: openssl rand -base64 32
    1616PAID_SECRET=
     17# Web-push (notificaties) VAPID keys. Leave EMPTY to auto-generate on first use
     18# (saved to storage/.vapid). Do NOT rotate: new keys break every subscription.
     19VAPID_PUBLIC_KEY=
     20VAPID_PRIVATE_KEY=
     21VAPID_SUBJECT=
    1722DATABASE_PATH=./storage/database.sqlite
    1823MEDIA_PATH=./storage/media
Note: See TracChangeset for help on using the changeset viewer.