Stage 1: SRV — IRC server #1

Closed
opened 2026-10-16 17:06:10 +00:00 by muse-lantern · 1 comment
Member

proj-rechat-srv tier-3-hard

Build the hand-rolled IRC server (rechat-server binary). This is the foundation — standard IRC clients must be able to connect, so we can test messaging and auth before the official client exists.

Scope

  • TCP/TLS listener, IRC protocol parsing (RFC 2812)
  • Virtual channels:
    • &auth — per-user isolated auth interaction, never broadcast, ephemeral (no history)
    • &index — generated per-user channel/server directory from permissions
  • Discord-style namespacing: 8-char UUID prefixes on channel names (#a1b2c3d4-general)
  • Enriched message format: :srv PRIVMSG #ch :<uuidv7> <user+uid+nick> message
  • srv pseudo-user for server-originated messages
  • Profile queries via /msg srv profile <uid>

Message chunking

IRC lines cap at 512 bytes. After the UUIDv7+UID+nick prefix is applied, if the remaining body doesn't fit:

  • Split the body into chunks that fit
  • Each chunk is sent as a separate PRIVMSG with the same message hash/ID
  • Backend stores it as one message; standard IRC clients see multiple lines, official client reassembles

Auth (stage 1 subset)

  • &auth channel login flow
  • IP-bound JWT issuance
  • Per-client ed25519 keypair registration (see #6 for full keypair design)

Validation

  • Connect with a standard IRC client (weechat/irssi), verify messaging works
  • Verify chunked messages reassemble correctly in the backend store
  • Auth flow works end-to-end
proj-rechat-srv tier-3-hard Build the hand-rolled IRC server (`rechat-server` binary). This is the foundation — standard IRC clients must be able to connect, so we can test messaging and auth before the official client exists. ## Scope - TCP/TLS listener, IRC protocol parsing (RFC 2812) - Virtual channels: - `&auth` — per-user isolated auth interaction, never broadcast, ephemeral (no history) - `&index` — generated per-user channel/server directory from permissions - Discord-style namespacing: 8-char UUID prefixes on channel names (`#a1b2c3d4-general`) - Enriched message format: `:srv PRIVMSG #ch :<uuidv7> <user+uid+nick> message` - `srv` pseudo-user for server-originated messages - Profile queries via `/msg srv profile <uid>` ## Message chunking IRC lines cap at 512 bytes. After the UUIDv7+UID+nick prefix is applied, if the remaining body doesn't fit: - Split the body into chunks that fit - Each chunk is sent as a separate PRIVMSG with the **same message hash/ID** - Backend stores it as **one** message; standard IRC clients see multiple lines, official client reassembles ## Auth (stage 1 subset) - `&auth` channel login flow - IP-bound JWT issuance - Per-client ed25519 keypair registration (see #6 for full keypair design) ## Validation - Connect with a standard IRC client (weechat/irssi), verify messaging works - Verify chunked messages reassemble correctly in the backend store - Auth flow works end-to-end
Author
Member

Implemented and pushed in fc485ae.

Verified live:

  • NICK/USER → 001, JOIN → broadcast + NAMES
  • PRIVMSG → enriched :srv PRIVMSG #ch :<uuidv7> <uid> <nick> body
  • &auth LOGIN flow works, JWT issued on success
  • &index returns channel directory
  • 600-char message → 2 chunks, same UUIDv7, [1/2]/[2/2] suffixes, stored as 1 message
  • PING→PONG, DM to offline nick → 401

Build/vet/test clean, CGO_ENABLED=0 clean (~10MB static binary).

Implemented and pushed in fc485ae. Verified live: - NICK/USER → 001, JOIN → broadcast + NAMES - PRIVMSG → enriched `:srv PRIVMSG #ch :<uuidv7> <uid> <nick> body` - `&auth` LOGIN flow works, JWT issued on success - `&index` returns channel directory - 600-char message → 2 chunks, same UUIDv7, `[1/2]`/`[2/2]` suffixes, stored as 1 message - PING→PONG, DM to offline nick → 401 Build/vet/test clean, CGO_ENABLED=0 clean (~10MB static binary).
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
residual/rechat#1
No description provided.