Skip to content

Collab Phase 1: Websocket Server Skeleton, Auth, and Presence Rooms #513

@cubap

Description

@cubap

Summary

Add websocket infrastructure to TPEN-services for authenticated collaboration sessions and presence events.

Scope

  • Initialize websocket server alongside HTTP server startup.
  • Validate bearer tokens during websocket handshake.
  • Authorize room joins by project permission.
  • Support rooms: project:{projectId} and project:{projectId}:page:{pageId}.
  • Emit and relay presence events: join, leave, cursor, selection.
  • Feature flag websocket collaboration.

Acceptance Criteria

  • Authenticated users can connect and join allowed rooms.
  • Unauthorized joins are rejected.
  • Presence fanout works for at least 2 concurrent users in same page room.
  • Feature flag fully disables websocket endpoints.

Notes

Contract baseline: docs/collaboration/websocket-collaboration-contract.md

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions