ZYVOPDOCS
DEVELOPER PUBLISHING
Platform Features

Real-Time Notifications & SSE

Server-Sent Events (SSE) event streams, short-lived tokens, connection pooling, and automated weekly digests.

ZyVOP features a real-time notification engine that keeps authors and readers informed about community interactions, cross-posting status updates, and subscriber growth.


Server-Sent Events (SSE) Architecture

Instead of heavy WebSockets or battery-draining polling, ZyVOP utilizes lightweight Server-Sent Events (SSE) via HTTP/2 streaming:

graph LR
    Browser[Web Browser / Client] --> TokenReq[1. GET /notifications/sse-token]
    TokenReq --> JWT[Issue 5-Min SSE Token]
    JWT --> Browser
    Browser --> SSEStream[2. EventSource(/notifications/stream?token=...)]
    SSEStream --> Backend[Fastify / RxJS Stream Limiter]
    Backend --> Push[Push Event\nComments, Likes, Follows, Syndication]
    Push --> Browser

Why Dedicated SSE Tokens?

Browser EventSource APIs do not support sending custom Authorization: Bearer <token> HTTP headers. Rather than passing long-lived API keys in the URL query string, ZyVOP issues a short-lived 5-minute SSE token:

  1. Client authenticates via regular JWT authorization header: GET /notifications/sse-token.
  2. Backend returns an ephemeral token: { "token": "..." }.
  3. Client establishes the event stream: new EventSource('/notifications/stream?token=' + token).

Endpoints Reference

1. Request Short-Lived SSE Token

GET /notifications/sse-token HTTP/1.1
Host: api.zyvop.com
Authorization: Bearer <USER_JWT>

Response

200 OK
{
  "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
}

2. Connect to the Live Event Stream

GET /notifications/stream?token=<SSE_TOKEN> HTTP/1.1
Host: api.zyvop.com
Accept: text/event-stream

Event Format

event: notification
data: {"id":"notif_98a7f","type":"NEW_COMMENT","actorName":"Sarah Chen","postTitle":"Distributed Tracing with OpenTelemetry","createdAt":"2026-09-29T10:15:00Z"}

event: notification
data: {"id":"notif_98a80","type":"POST_SYNDICATED","platform":"DEVTO","postTitle":"Distributed Tracing with OpenTelemetry","sharedUrl":"https://dev.to/alex/..."}

Supported Notification Types

Event TypeTrigger
NEW_COMMENTA reader posted a comment on your article.
COMMENT_REPLYSomeone replied directly to your comment in a discussion.
POST_LIKEA reader reacted to or liked your article.
NEW_FOLLOWERA developer started following your author profile.
NEW_SUBSCRIBERA reader subscribed to your author newsletter.
POST_SYNDICATEDAn article was successfully syndicated to an external destination.
POST_SHARED_ON_SOCIALAn announcement was dispatched to connected social accounts.
BADGE_AWARDEDYou unlocked a new author milestone or achievement badge.
FEATURED_IN_DIGESTYour article was featured in the official ZyVOP weekly digest.

Weekly Email Digest

In addition to real-time browser notifications, ZyVOP's weekly digest system sends a personalized email summary to authors:

  • Article Performance: Total views, reading time, and reactions over the past 7 days.
  • Subscriber Growth: New newsletter subscribers and follower signups.
  • Top Discussions: Threads with high engagement or pending questions.
  • Custom Frequency: Authors can adjust digest preferences in Settings → Notifications.

On this page