Skip to Content
System Map

System Map

This page defines how the Main Site, Chat Frontend, and Chat Backend operate as a single platform.

It is the authoritative reference for system boundaries and data flow.


Systems Overview


System Responsibilities

Main Site

Purpose Application shell and identity entrypoint.

Owns

  • Routing
  • OAuth redirects
  • Session cookies
  • Embeds

Does NOT own

  • Real-time chat state
  • Message routing
  • Persistence

Chat Frontend

Purpose Real-time interaction and rendering layer.

Owns

  • WebSocket client lifecycle
  • Message rendering
  • Commands, emotes, embeds
  • UI moderation affordances

Does NOT own

  • Auth validation
  • Fanout logic
  • Storage

Chat Backend

Purpose Authoritative real-time system.

Owns

  • WebSocket authentication
  • Channel membership
  • Message routing
  • Moderation enforcement
  • Persistence

Identity Flow

Invariant

Identity is established once and asserted downstream. No re-derivation.


Message Flow

Guarantees

  • Low-latency delivery
  • Eventual persistence
  • Backend authority

Failure Containment

FailureImpactContained To
Database unavailableMessages not storedBackend
Redis unavailableSingle-node modeBackend
Invalid auth cookieRead-only UIFrontend
Frontend crashNo data lossClient

Design Invariants

These must never be violated:

  1. Backend is the source of truth
  2. Frontend never trusts itself
  3. Main Site never handles chat state
  4. Persistence is not on the hot path
  5. All real-time flows are observable

Last updated on