Node.js-runtime route handler die een dedicated pg-Client opent op DIRECT_URL en LISTEN't op het scrum4me_changes-kanaal. Per inkomende NOTIFY-payload filtert het server-side op product (uit query-param), sprint (active sprint van het product) en persoonlijke relevantie (assignee_id == userId, of assignee_id IS NULL voor stories voor de claim-lijst). Auth via iron-session cookie: - 401 als sessie ontbreekt - 400 als product_id query-param ontbreekt - 403 als de user geen toegang heeft tot het product - demo-tokens mogen lezen (geen write-tools op deze route) Stream-bouw: - text/event-stream met juiste headers (no-cache, no-transform, X-Accel-Buffering: no voor proxy-vrije buffering) - ready-event bij connect met product_id en active sprint_id - heartbeat (SSE-comment) elke 25s - hard-close na 240s als safety-net onder Vercel maxDuration; client herconnect via EventSource - cleanup op request.signal abort (tab dicht / refresh) Cleanup-pad sluit de pg-client en de stream-controller idempotent. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| (app) | ||
| (auth) | ||
| api | ||
| styles | ||
| apple-icon.png | ||
| favicon.ico | ||
| globals.css | ||
| icon.png | ||
| layout.tsx | ||
| page.tsx | ||