backend-realtime

Solid

Implement real-time features using WebSockets, Supabase Realtime, Server-Sent Events, and live data. Use when user wants "real-time", "live updates", "WebSocket", "notifications", "chat", "collaborative", "presence", "live data", or "instant sync".

Web & Frontend 9 stars 0 forks Updated yesterday MIT

Install

View on GitHub

Quality Score: 82/100

Stars 20%
33
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

# Real-time Features Skill **Degree of freedom: MIXED.** Which transport and event `[HIGH freedom]`; existing-subscription probes and unmount cleanup `[LOW freedom — run exactly]`. ## How to reason 1. **Observe** — existing channels, sockets, hooks, cleanup 2. **Interpret** — new subscription vs reuse vs transport mismatch 3. **Classify** — postgres-changes / presence / broadcast / SSE / optimistic 4. **Severity** — leaked or duplicate subscription outranks a missing typing indicator ## Worked example > **Observe:** chat mounts `useRealtimeMessages` twice; no untrack on leave; `package.json` already has `@supabase/supabase-js`. > **Interpret:** duplicate INSERT listeners; leftover presence. > **Classify:** one channel hook with unmount cleanup; reuse Supabase Realtime — do not add Socket.io. > **Verify:** one `postgres_changes` subscription; `removeChannel` on unmount; no second socket lib. ## Self-critique before reporting - **Existing first** — grepped channels/sockets before adding a library - **Cleanup** — every subscribe has unmount `removeChannel` / `close` - **One listener** — no duplicate subscription for the same event - **Right owner** — FE↔BE payload mismatch → `debug-fe-be-integration`; queue/job instead of live push → `backend-patterns` Implement live, collaborative features using WebSockets, Supabase Realtime, and Server-Sent Events. > Code examples assume a **Next.js App Router + Supabase** stack > (`@/lib/supabase/client`, `'use client'`). Adapt impor...

Details

Author
kensaurus
Repository
kensaurus/cursor-kenji
Created
7 months ago
Last Updated
yesterday
Language
JavaScript
License
MIT

Integrates with

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category

API & Backend Listed

realtime-websockets

Build production realtime servers over WebSockets and Server-Sent Events — connection lifecycle, the heartbeat/ping-pong + idle-timeout contract, automatic reconnection with exponential backoff and resume tokens, backpressure and per-connection send queues, horizontal scale-out via a Redis/NATS pub-sub fan-out, presence tracking, and auth on the upgrade handshake. Use when adding live updates (chat, notifications, collaborative cursors, live dashboards), choosing WebSocket vs SSE vs long-poll, debugging dropped or zombie connections, or scaling a socket server past one node. Boundary vs api-design — api-design owns request/response HTTP contracts (REST/GraphQL, idempotency, RFC 9457 errors) and stops at the protocol-upgrade boundary; this skill owns the persistent bidirectional connection after upgrade. Carries higher-level subscription protocols (e.g. graphql-ws) as transport but defers their payload schema to graphql.

6 Updated yesterday
kouroshez
Web & Frontend Solid

realtime-websockets

Use when building realtime features with WebSockets or Server-Sent Events. Covers protocol choice, connection lifecycle, reconnection and backfill, scaling across instances, and backpressure.

26 Updated 3 weeks ago
nimadorostkar
Web & Frontend Listed

serve-realtime-with-websockets

Use when pushing realtime updates to connected clients over WebSockets (a socket.io / WS gateway) — authenticating the socket at the handshake (once, not per message), joining sockets to rooms for targeted broadcast, scaling across instances with a Redis pub/sub adapter (+ sticky sessions), bridging domain events to room emits, and connection-lifecycle hygiene (reconnect, listener cleanup). NestJS/socket.io reference, framework-flexible.

1 Updated 1 months ago
kennguyen887