WebSocket-to-IRCbridge
A Rust Axum service that bridges WebSocket clients to an Ergo IRC server — adding JWT auth, per-channel Valkey history, rate limiting, and a shared chat schema so web and game clients speak the same vocabulary as the IRC network. Fronts KBVE's /minechat and /gamechat channels.
Per-channel backscroll
A dedicated listener task per channel holds its own IRC connection and appends every PRIVMSG to a Valkey-backed ring buffer, so freshly connected clients see recent history plus live messages.
- Auth — JWT verified before channel access.
- Schema — bevy_chat ChatMessage ⇄ IRC PRIVMSG.
What it gives you
Features
WebSocket ↔ IRC bridge
Proxies WebSocket sessions onto Ergo IRC connections.
JWT auth
Validates tokens before granting channel access.
Per-channel history
A listener task per channel rings recent PRIVMSGs for backscroll.
Rate limiting
Ingress throttling to protect the IRC backend.
Shared chat schema
bevy_chat ChatMessage ⇄ IRC PRIVMSG translation.
REST + WebSocket transports
HTTP endpoints alongside the live socket.
Runtime
Usage & deploy
Built and deployed as the kbve/irc-gateway container on Kubernetes; clients
connect over WebSocket with a valid JWT to join a channel and receive recent
history plus live messages.
Questions
Frequently asked
What does the IRC Gateway do?
It is a Rust Axum service that bridges WebSocket clients to an Ergo IRC server, adding JWT authentication, per-channel chat history, rate limiting, and a shared chat message schema.
How is chat history handled?
A dedicated listener task per channel holds its own IRC connection and appends every PRIVMSG to a per-channel ring buffer, so freshly connected clients can be shown recent backscroll.
What transport and auth does it use?
It exposes WebSocket and REST transports over Axum with JWT verification, and uses the shared bevy_chat schema to translate between ChatMessage and IRC PRIVMSG frames.
