| ▲ | Show HN: WordPress WebSocket Relay in Rust with Yjs CRDT Provider for WP 7.0(wpsignal.io) | |
| 3 points by jaredrethman 11 hours ago | ||
WordPress 7.0 ships collaborative block editing via Yjs CRDT. The default transport is HTTP polling. The RTC layer exposes a `sync.providers` filter so you can swap in your own transport, so I built a WebSocket-based Yjs sync provider for it. While building that I realized WebSockets unlock a lot more in WordPress than just RTC. Any `add_action` hook can now push a realtime `CustomEvent` to connected browsers without polling or a custom server. The stack: - Relay server: Rust (Axum/Tokio), WebSocket-first with SSE fallback - Event payloads: AES-256-GCM encrypted before leaving WordPress, the relay only ever sees ciphertext - Publish auth: HMAC-SHA256 signed requests - Browser connections: short-lived scoped JWTs (5 min, auto-refresh) - WordPress plugin: open source (GPL-2.0), hosted relay is WPSignal GitHub - https://github.com/wpsignal/wordsocket/ A few use cases we've seen: live WooCommerce order updates, breaking news flags, realtime comment counts, and collaborative editing via WP 7.0 RTC. Curious what else people would build with a realtime event bus wired into WordPress action hooks? | ||