Skip to main content
Version: v1 (Current)

Group Chat & Live Streaming Architecture

This guide is for platform contributors working across room/session persistence, attendee identity, messaging, AV state, signaling and stream destinations. Start with Group Chat & Live Streaming for ordered App setup, current request/response behavior and acceptance boundaries. Model/service names below describe this checkout; deployment and browser/media delivery need separate verification.

System boundaries​

LayerResponsibilities and limits
Project room configurationAudience/authentication, capacity/overflow, text/AV flags and moderation settings; stored flags are not universal enforcement guarantees
Chat session/participantAllocated participation, role, AV mode, counters and activity; numeric REST IDs differ from signaling codes and media IDs
MessagesContent, replies, reactions, attachments and moderation state; persisted/display-deleted/delivered are separate states
Media session/participantConnection and SFU identity bridged from the chat models; not interchangeable with a chat room participant
EventsFormatted lifecycle/update notifications on distinct message and AV channel families; delivery/auth/order require acceptance
Live stream/destinationOrchestrates inputs, configured outputs and provider/mixer work; stream live status need not mean every destination succeeded

The current implementation does not establish the older promises of ephemeral rooms from persist_messages=false, guaranteed supported participant counts, fully implemented provider AI replies or automatically functioning media from a stored AV mode. The integration overview records the source-backed boundaries and tested reproductions.

Storage and relationships​

These are selected model responsibilities, not executable SQL or a claim that model relationships imply every database foreign-key constraint. Consult current migrations/casts before changing storage.

Arrows summarize ownership/reference paths; the media references are optional, and a participant's admin/attendee/anonymous identity is separate from each path. Some streams use configured inputs rather than a room reference alone.

Room and session​

ChatRoom belongs to a project and stores its name/slug, active state, capacity/AV capacity, overflow mode and optional maximum concurrent sessions. Configuration also includes text/audio/video/screen-share flags, message/attachment/reply/reaction settings, authentication/anonymous settings, moderation and optional AI reference/settings. Creation-migration defaults are documented in the overview; inspect the saved resource rather than assuming a dashboard preset matches them.

ChatRoomSession belongs to a room and stores a generated session_code, session number, lifecycle status, participant/AV/max counts, timing/activity, optional media_session_id, creator and metadata. Status constants include waiting, active, paused, ended and terminated. Allocation queries use the applicable active-session scope and recorded counts; these are not a global capacity lock or measured throughput contract.

Use ChatRoom.id and ChatRoomSession.id for their numeric REST placeholders. The generated session code is a separate signaling identifier. Media-session and chat-session IDs must not be substituted merely because both are integers.

Participants and media references​

ChatRoomParticipant belongs to a chat session and can carry admin_id, attendee_id or anonymous_id, display/avatar data, role and explicit permissions. It separately stores av_mode, participant status, muted/video/screen-share/hand flags, timing/activity and an optional media_session_participant_id.

Chat roles are host/moderator/participant/viewer; AV modes are none/viewer/participant. Status constants include joining, active, away, disconnected, left, kicked and banned. A role label, AV mode or participant-row existence does not by itself prove authentication, an active producer or a disconnected browser. The current model is not an extension of the obsolete LiveSessionParticipant class described in the older guide; MediaSessionParticipant is a separate referenced media identity.

Counters, active participant queries, media references and browser tracks need reconciliation after partial failures. In particular, the overview documents the promote-to-viewer counter discrepancy and writes occurring before media initialization completes.

Messages, reactions and attachments​

ChatMessage stores chat-session and sender-participant IDs, content/type, optional reply parent, reply/reaction counts, edit/deletion/flag state and metadata. Replies are scoped to the selected session in the send service. Reactions and attachments have their own related records.

Send currently persists even with the room's persist_messages flag false. Deletion sets lifecycle fields while retaining content; the display accessor masks deleted content. Request upload rules, actual file storage and retention cleanup are separate concerns. Do not use a schema flag or a UI placeholder as evidence of no storage or physical erasure.

Streaming resources​

LiveStream associates project/room configuration with stream lifecycle, layout/participant selection, recording and provider/playback metadata. LiveStreamInput describes configured sources; LiveStreamBroadcast describes an output destination with platform, RTMP URL/key, enabled/order and status/error data. It is not merely a row joining an arbitrary chat-session ID to a stream.

LiveStreamScene uses layout, layout_config, active/order fields and related sources. Scene definitions, a live stream's selected layout and actual mixer application must be validated together. The overview describes current service calls and why direct type: pip/active_scene_id examples were removed.

Backend ownership and call paths​

Room management and similarly named services​

The API room controller imports App\Services\Chat\ChatRoomService. This service creates/updates project rooms, returns statistics, activates/deactivates rooms, resolves a project slug and ensures an active session. deactivate() sets the room inactive and broadcasts room-deactivation events to its active sessions; it does not itself prove every session/track has ended.

There is also App\Services\ChatRoomService, with a different non-null admin/attendee join contract, spillover and notification/waitlist helpers. Do not apply one class's return shape or identity assumptions to the other because their short names match. Trace the actual controller import and method before extending a flow. The current API join path reviewed here uses ChatSessionService.

ChatSessionService​

App\Services\Chat\ChatSessionService::join(ChatRoom $room, Admin|Attendee|null $user, array $options = []) checks room activity, its authentication requirement and room bans, then allocates/creates a session or returns a waitlisted result through the overflow branch. The joined service result contains session and participant; the API controller separately generates applicable media credentials afterward. A late token failure can therefore follow a committed join.

Leave/kick, host transfer, media-state and moderator helpers have different checks and side effects. Use promoteToModerator()/demoteFromModerator() for moderator roles and transferHost() for host ownership; the old generic promote/demote examples are not these methods. Internal service calls do not substitute for the controller's principal/session resolution. See the overview for self-versus-other AV behavior and identity-helper limits.

ChatMessageService and moderation​

ChatMessageService owns send/edit/delete, replies/history/search and reaction operations. It uses ChatModerationService for banned-word and spam heuristics. A flagged message may still persist; blocked content fails. The public upload controller accepts uploaded files rather than every attachment shape accepted by internal helpers.

Active state/text checks, ownership/edit windows and deletion permissions are operation specific; the direct send service does not universally enforce the model's send_message permission or infer a correct session/sender pairing. The overview's scoped fixtures document persistence, cross-session reply rejection, edit/deletion, reactions and the direct-viewer boundary. Preserve actual route authorization and test excluded/other-attendee principals when extending behavior.

ChatAVModeService and ChatMediaService​

ChatAVModeService exposes promotion, demotion, request and status methods. It has no current approveAVRequest() method matching the older guide. The public promotion field is target_mode; promotion accepts viewer/participant and demotion none/viewer. Actor checks, capacity, counters and media calls are distinct stages; self-promotion and failed-media recovery need their own acceptance tests.

ChatMediaService bridges chat/session participants to media/session participants, generates credentials, initializes viewer media, updates media state and requests producer/complete disconnection. The current participant initializer accepts both the chat session and chat participant. Its credentials include token and signaling URL; server selection and media-state references can change across recovery. A completed method or mocked invocation is not proof the browser/SFU stopped or started tracks.

LiveStreamService and mixers​

App\Services\LiveStream\LiveStreamService provides create($project, $data), update, start, stop, input/destination and layout/participant configuration. Optional GCP provisioning is queued on creation. start() checks the configured room/active session and enabled outputs, starts the applicable provider channel and invokes mixers before marking the stream live.

LiveStreamMixerService exposes stream-level startMixer/stopMixer and update paths. Its per-destination starter is a protected implementation method, not the old public startBroadcast($broadcast) example. It calls enabled outputs, records individual errors and returns success if any output starts. GcpLiveStreamService owns provider channel operations; do not call invented channel methods on the orchestrator. Verify every required destination and real playback separately.

AI response boundary​

The join/message paths can create AI-marked participation and queue ProcessAiChatResponse. In this checkout its generation helper builds context but returns null as a placeholder. Those states are not proof of provider-generated replies. Supported installed-App AI integrations have separate operations and acceptance requirements; extending this job requires actual provider implementation and identity, retry/idempotency and billing review.


Mediasoup WebRTC Implementation​

Architecture​

Browser A ───┐
│
Browser B ───┼─── WebSocket ─── Mediasoup Server
│ │
Browser C ───┘ Group Session
│
┌───────────┼───────────┐
Transport A Transport B Transport C
│ │ │
Producers Producers Producers
│ │ │
└─────── Consumers ─────┘
(Selective Forwarding)

Key Files​

  • services/mediasoup/src/signaling/GroupSession.ts - Multi-participant session management
  • services/mediasoup/src/signaling/GroupSessionManager.ts - Session lifecycle
  • services/mediasoup/src/media/BandwidthManager.ts - Quality adaptation
  • services/mediasoup/src/services/ServerRegistry.ts - Redis-based server discovery
  • services/mediasoup/src/services/SessionStore.ts - Redis session storage

GroupSession lifecycle​

GroupSession owns the in-memory participant, producer and consumer maps for one SFU session. Its addParticipant method takes the participant ID, WebSocket, participant information, mediasoup server and optional TURN credentials. The server dependency is required; the earlier three-argument example was incomplete.

For a new participant, the method checks the configured participant capacity before initializing TransportManager. For an existing ID, it marks the old participant as reconnecting before transport initialization and rejects a concurrent reconnect. If initialization fails, it clears that flag. Replacement can notify the old socket with disconnected and reason reconnected_from_another_session. These are in-process reconnect controls, not a guarantee that media survives a server restart or that the database participant has rejoined.

handleProduce(participantId, kind, rtpParameters, appData) creates a producer and records its owner. Video with appData.source === "screen" updates screen-sharing state; other video updates camera state. This distinction describes server bookkeeping and does not grant browser capture permission.

setParticipantCapabilities stores the participant's RTP capabilities. Automatic consumer creation skips a participant without capabilities or when the router cannot consume the producer. A successful new-consumer notification includes consumerId, producerId, producerOwnerId, kind, rtpParameters, producerPaused and appData. The explicit consume path returns the consumer parameters; resuming is a separate operation. A joined participant or open WebSocket alone does not prove that remote media is playable.

Signaling ownership​

GroupSessionManager dispatches group-session messages after finding the session and participant. The following is a source-navigation map, not a standalone authentication or browser client implementation:

Message familyCurrent dispatcher messagesIntegration responsibility
Negotiationget-router-capabilities, set-rtp-capabilities, create-transport, connect-transportExchange client capabilities and connect the correct transport before expecting media.
Media productionproduce, producer-pause, producer-resume, producer-closeTrack actual producer IDs and reconcile close/pause notifications.
Media consumptionconsume, resume-consumer, get-producersCreate compatible consumers and resume them after transport setup.
State recoveryget-participants, get-session-state, update-media-stateReconcile participant, producer and media state after reconnecting.

The dispatcher also has chat, recording and moderation handlers. Their presence does not establish parity with Laravel message persistence, room policy enforcement or provider acceptance. Trace each handler and its authentication entry point before extending a client.

Viewer boundary​

The database av_mode values describe chat participation intent. The current GroupSession class does not expose the previously illustrated addViewer or upgradeViewerToParticipant methods. Do not implement promotion by calling those examples. Use the Laravel AV transition path described in the integration guide, then reconcile the resulting media credentials and browser transports. Whether a viewer can produce must be checked across token claims, signaling authorization and the client; an av_mode label alone is insufficient evidence of enforcement.

AV mode transitions and failure ordering​

Stored modeIntended participationAcceptance boundary
noneText participation without AVA database mode alone does not establish socket/track disconnection.
viewerReceive AV without publishingVerify signaling authorization and producer creation restrictions separately.
participantPublish and receive AVRequires successful media initialization, browser permissions and transport negotiation.

ChatAVModeService::promoteToAV accepts the target participant, a target mode of viewer or participant, and an optional promoting participant. Promoting someone else requires a host/moderator actor; self-promotion takes a different branch. The public controller resolves its current participant separately. Do not treat an internal call with an omitted actor as a complete authorization example.

For target participant, the service checks room AV capacity before updating the participant, even when that participant already has the requested mode. It updates mode/timestamps, increments the count when entering participant mode, initializes applicable media, then broadcasts the mode event. These writes are not enclosed in the all-or-nothing transaction shown in the older example: media initialization can fail after the mode and counter persist. Repeating a promotion at full capacity can fail before reaching an otherwise unchanged mode.

Promotion from participant to viewer does not decrement the current counter. Use the demotion path for that transition and reconcile observed counts after failures; do not copy a simplified increment/decrement algorithm into a client. demoteFromAV accepts none or viewer, checks other-actor permissions, and returns early when already at or below the requested target. Leaving participant mode requests producer disconnection and decrements capacity; target none also requests complete media disconnection before the stored mode/flags and event are updated. A service response is not proof that every browser track stopped.

requestAVAccess is a permission-checked request notification. It neither reserves a capacity slot nor grants AV mode. The integration guide documents the public target_mode fields, failure statuses, event channels and retained offline transition cases. Validate the mode, counters, media identity and actual tracks together after a failed or lost response.

Live Streaming & Broadcasting​

Mixer pipeline and participant changes​

services/mediasoup/src/broadcast/GStreamerPipeline.ts manages the GStreamer process and participant media resources. Treat its implementation as the contract rather than the older illustrative element/pad manipulation example.

addParticipant(participantId, videoProducerId?, audioProducerId?) receives producer IDs, not an RtpPorts object. An existing participant follows the producer-update path. Removing a participant cleans up its mediasoup resources, removes it from the map and schedules a rebuild.

The current rebuild path checks whether the pipeline is running, stops the existing process, waits for port release, launches an updated pipeline, requests video keyframes and starts packet-flow monitoring. Comments describing a continuously running output or seamless hot reconfiguration do not establish that behavior: the actual method stops and relaunches the process. Test destination reconnection, visible interruption and audio/video synchronization when participants or layouts change.

start() returns early for an already-running pipeline. For an RTMP/RTMPS destination with no participants, it sets running/started state and emits started while deferring process launch. That state is not evidence that media is reaching the provider. For immediate launch, process startup and subsequent packet flow/playback remain distinct acceptance stages.

The Laravel mixer service's per-destination outcomes are described above and in the integration guide. Its fake-HTTP tests do not exercise GStreamer binaries, RTP consumers, encoding, process rebuilds or provider playback. No uninterrupted-output or codec/throughput benchmark is established by this architecture.

GCP Live Stream boundary​

Provider channel provisioning and playback are separate from the chat SFU and mixer. GcpLiveStreamService and the provisioning job manage the provider operation; LiveStreamService orchestrates stream startup. A successful mixer destination or a live database status does not prove that a GCP channel, manifest and browser player are healthy. See the integration guide for the current service boundary and per-destination outcomes.

Infrastructure provisioning, IAM, storage access, capacity planning and recovery procedures belong in the private operator runbooks. This public guide does not provide a production Terraform recipe.

Server discovery and session routing​

Selecting a server​

App\Services\Chat\MediaServerSelector reads server metadata from Redis. selectServer($requirements) returns null when there are no active or eligible servers; it does not invent a fallback assignment. Eligibility checks session capacity, expected participant capacity when supplied, and CPU/memory thresholds. These checks use reported metadata and are not an atomic resource reservation or a guarantee of measured capacity.

The current score combines session utilization (40%), projected participant utilization (20%), CPU (25%) and memory (15%). Projected participant utilization is zero when no expected participant count is supplied. These are implementation weights, not workload sizing recommendations; the old 50/30/20 example omitted participant utilization. getServerForSession($sessionId) reads the stored session's serverId and resolves that server separately from choosing a new one.

Registry and session metadata​

services/mediasoup/src/services/ServerRegistry.ts publishes serverId, internal/external addresses, pipe port, active/draining status, capacity metrics and heartbeat time under mediasoup:server:{serverId}, and adds the ID to mediasoup:servers. TTL and heartbeat interval come from configuration rather than the fixed constants previously shown. Registration skips when Redis is disabled, records unavailability when the client is missing, and logs/captures registration errors. An entry or cached metric is not proof that a browser can reach that server.

SessionStore.ts stores session metadata under mediasoup:session:{sessionId}. Creation uses SETNX to reject an existing key, then applies a one-hour expiry as a separate Redis operation. With Redis disabled or unavailable it returns without storing; reads can return null for absence or logged errors. Do not infer durable storage, transactionality of key creation/expiry, or recovered media resources from these metadata operations.

Redis discovery does not replicate the in-process GroupSession producer/consumer maps or an operating GStreamer process. Routing, draining, reconnect recovery, stale metadata and server loss need deployed acceptance. The presence of multiple registry entries does not itself prove a session-aware load balancer or seamless failover.

Deployment responsibility​

Media-server discovery and session routing depend on the deployed registry and server configuration. Replica count and CPU/memory settings require measured workload and failure testing; they are not established by the conceptual topology above. Keep Kubernetes manifests, rollout sequencing and recovery procedures in private operator runbooks.

Frontend architecture​

Entry point and state ownership​

The current entry point is resources/js/Components/Chat/ChatRoomPage.vue. It imports useChatStore from @/Store/chatStore, useGroupChat from @/Composables/Chat/useGroupChat, and the header/content/sidebar/controls components. Follow these actual imports rather than treating the older illustrative component tree as a list of available components.

resources/js/Store/chatStore.js owns room configuration, the active session, join progress and errors. Its features computed value maps the room resource's snake-case feature fields to camel-case booleans. joinRoom(roomId, options) posts display_name, start_muted and start_video_off to the room join endpoint. Only a joined result stores the room and active session; a waitlisted result is returned for the caller to handle. The active-session object keeps numeric session/participant IDs, the session code and returned media credentials as distinct values.

isInRoom means that this client has a non-null active-session object. It is not a server heartbeat or proof of functioning AV. leaveRoom attempts the server leave request, then clears local room/session state even if that request fails. A disappeared UI therefore does not prove server participation was removed; recovery needs server-state reconciliation.

Signaling and media orchestration​

useGroupChat(config) is implemented in JavaScript. It creates useChatSignaling() with no URL argument, passes that signaling object to useChatMedia(signaling), and creates useChatMessages(). Its configuration includes room ID, session code, signaling URL, media token and plain feature booleans. ChatRoomPage unwraps store features before constructing this configuration. It constructs the composable from the session available during setup; if there is no active session then, the mount handler emits No active session. This is not a watcher that automatically joins after a later store update.

connect(displayName, { startMuted, startVideoOff }) guards concurrent/already-connected calls, connects signaling using the URL/token, installs handlers, initializes the media device/transports when audio or video is enabled, starts enabled capture, and requests existing producers. startMuted mutes after audio capture starts; it does not mean the browser microphone permission/capture step is skipped. startVideoOff skips initial video capture. Errors set the composable error and are rethrown; its finally clears the connecting flag, not every partially initialized resource.

disconnect() cleans up media, disconnects signaling and clears participant/local connection state. Keep this separate from the REST leave operation. Browser capture, transport readiness, remote consumers and stored participation require separate checks. A client connected flag alone is insufficient acceptance for the whole flow.

Message state and reconciliation​

useChatMessages owns the message list, history loading/pagination, reply and editing state. loadHistory(sessionId, { beforeId, limit }) sends before_id/limit, replaces the initial list or prepends older messages, and derives hasMore from returned metadata or page length. An empty history and a request failure are different outcomes: failures are rethrown.

sendMessage(sessionId, content, attachments) creates multipart FormData, adds the selected reply ID and indexed file uploads, and returns the server's resource after clearing reply state. It expects the message to be added through an event rather than appending it directly. A successful send response without event delivery can therefore leave a stale visible list. Custom optimistic rendering must reconcile by message ID to avoid duplicate rows when the event arrives.

Event handler contracts are also operation specific: handleMessageDeleted receives a message ID, while edit/reaction handlers receive their corresponding data. useGroupChat subscribes to signaling chat-message and forwards it to handleNewMessage; that is a separate path from the Laravel private message-event channel. Before adding a custom subscriber, verify its payload mapping and delivery route instead of assuming all message events have the same wire envelope.

The overview's backend fixtures establish selected persistence and transition contracts. They do not exercise these Vue components, browser permissions, duplicate/out-of-order notifications or reconnect cleanup. Those remain frontend/runtime acceptance tasks.

Event channels and payload ownership​

Laravel broadcast events and SFU WebSocket messages are separate transports. Laravel event classes select private logical channels; the deployed broadcaster, channel authorization, client event-name convention and queue delivery must also work. Do not subscribe to one session channel and assume it receives every event family.

Source event familyPrivate logical channelBroadcast alias
App\Events\Chat participant join/leave, host transfer, media state and session endchat.session.{sessionId}The corresponding Pascal-case event name, such as ParticipantJoined or HostTransferred
App\Events\Chat message send/edit/delete and reaction changeschat.session.{sessionId}MessageSent, MessageEdited, MessageDeleted, ReactionAdded, ReactionRemoved
App\Events\ParticipantAVModeChangedchat-session.{sessionId}participant.av_mode_changed
App\Events\AVCapacityChangedchat-session.{sessionId}av.capacity_changed
App\Events\AVAccessRequestedchat-session.{sessionId}.moderatorsav.access_requested
App\Events\Chat\WaitlistPositionUpdatedadmin.{id} and/or attendee.{id} when the entry contains those identitiesWaitlistPositionUpdated

MessageSent formats the message through ChatMessageService and broadcasts it under message; it implements both ShouldBroadcast and ShouldDispatchAfterCommit. That metadata does not prove arrival, ordering or client rendering. HostTransferred sends the new host's identity under new_host.

AV mode payloads contain participant_id, old_mode, new_mode, promoted_by, reason and changed_at; promoted_by is the optional changing participant ID, including demotion paths. Capacity payloads contain av_participant_count and av_slots_available. Access requests contain a nested participant with ID/display/avatar plus requested_at, rather than the older flat request shape. A request notification is not an approval event.

Waitlist updates contain waitlist_id, room_id, position, status, update_type and nullable expires_at. Entries without an admin or attendee identity produce neither of those recipient channels. Re-fetch authoritative state after missing or conflicting updates; these event declarations do not establish durable replay or guest delivery.

The overview's retained metadata fixture verifies selected aliases/channel families, not deployed subscriptions. Trace the particular class's broadcastWith() and the frontend handler before implementing a subscriber. The older AVModeChanged, AVAccessApproved and AVAccessDenied examples are not the current AV event contract.

REST route map​

These routes are declared in routes/api/v1/routes.php under the selected API host's /api/v1 mount. Project collection routes use team/project slugs; bound room/session/participant/message/stream placeholders use numeric IDs. Select the serving host and authenticated principal according to the API context; this table does not supply credentials or grant permissions. Read the integration guide for identity resolution, joined/waitlisted results and failure recovery.

Rooms and waitlists​

MethodPath below /api/v1Controller operation
GET / POST/projects/{teamSlug}/{projectSlug}/chat-roomsList / create rooms
GET / PATCH / DELETE/chat-rooms/{chatRoom}Show / update / delete room
POST/chat-rooms/{chatRoom}/activate or /deactivateChange room activity
POST/chat-rooms/{chatRoom}/joinJoin or enter overflow handling
GET/chat-rooms/{chatRoom}/sessionsList room sessions
GET / DELETE/chat-rooms/{chatRoom}/waitlistList / leave waitlist
GET/chat-rooms/{chatRoom}/waitlist/statusCurrent waitlist status
POST/chat-rooms/{chatRoom}/waitlist/acceptAccept a notification
POST/chat-rooms/{chatRoom}/waitlist/{chatWaitlist}/admitAdmit an entry
DELETE/chat-rooms/{chatRoom}/waitlist/{chatWaitlist}Remove an entry

Waitlist registration is source-verified here; full admission, expiry and identity acceptance is a separate integration scope. Do not treat a listed operation as an anonymous-public capability.

Sessions, participants and messages​

MethodPath below /api/v1Controller operation
GET/chat-sessions/{chatSession}Show session
POST/chat-sessions/{chatSession}/leave, /transfer-host, /end or /heartbeatParticipation/lifecycle operation
GET/chat-sessions/{chatSession}/participantsList participants
GET / POST/chat-sessions/{chatSession}/messagesHistory / send
GET/chat-sessions/{chatSession}/messages/searchSearch messages
POST/chat-sessions/{chatSession}/typingTyping notification
POST/chat-sessions/{chatSession}/recording/start or /recording/stopRecording operation
GET/chat-sessions/{chatSession}/recording/statusRecording status
GET/chat-participants/{chatParticipant}Show participant
PATCH/chat-participants/{chatParticipant}/media-stateUpdate media state
POST/chat-participants/{chatParticipant}/kick, /mute, /promote or /demoteParticipant moderation/role operation
POST/chat-participants/{chatParticipant}/promote-av, /demote-av or /request-avAV transition/request
GET/chat-sessions/{chatSession}/av-statusAV status
GET / PATCH / DELETE/chat-messages/{chatMessage}Show / edit / delete message
POST/chat-messages/{chatMessage}/reactionsAdd reaction
DELETE/chat-messages/{chatMessage}/reactions/{emoji}Remove reaction
GET/chat-messages/{chatMessage}/repliesList replies

Each suffix in a multi-operation row is appended to that row's resource prefix. Role promotion/demotion and AV promotion/demotion are different operations. The current route group has no separate approve-av or deny-av endpoint; use the actual AV controller contract rather than the obsolete examples. Recording route presence does not prove provider capture, storage availability or playable output.

Streams​

MethodPath below /api/v1Controller operation
GET / POST/projects/{teamSlug}/{projectSlug}/live-streamsList / create streams
GET / PATCH / DELETE/live-streams/{liveStream}Show / update / delete stream
POST/live-streams/{liveStream}/start or /stopStart / stop stream
PATCH/live-streams/{liveStream}/layoutUpdate layout
GET/live-streams/{liveStream}/stats or /eventsRead statistics / events
POST/live-streams/{liveStream}/broadcastsAdd a destination

The inspected API group does not declare the earlier generic /live-streams collection, /provision or /live-stream-broadcasts/{broadcast} start/stop/scene routes. Provider provisioning and destination orchestration must follow their actual service/controller paths. A registered stream route and a successful database update do not certify every destination or actual playback.

Admin Panels​

Project and system ownership​

Project dashboard route resources for chat rooms and live streams declare index/store/show/update/destroy, with separate stream start/stop/layout, broadcast and provider-management actions. They are dashboard routes, distinct from the versioned API map above. Use dashboard navigation and generated route names rather than assuming the old hard-coded URL patterns match the current mount.

Project controllers call model policies for viewing and mutation. ChatRoomPolicy inherits BaseDashboardPolicy; LiveStreamPolicy inherits it with an explicit LiveStream model key. Check project permission context and the applicable base-policy decision before granting access. System room/stream controllers and routes provide cross-project monitoring; appearing in a route file does not establish that an arbitrary project admin can access it.

Contributor source entry points:

  • Project controllers: app/Http/Controllers/Admin/Project/ChatRoomController.php and LiveStreamController.php.
  • System controllers: the corresponding classes under app/Http/Controllers/Admin/System/.
  • Dashboard registrations: routes/admin/dashboard.php and routes/admin/system.php.
  • Frontend management helpers: resources/js/Composables/useChatRooms.js and useLiveStreams.js.
  • Project screens: resources/js/Dashboard/Pages/Admin/Projects/ChatRooms/ and LiveStreams/.

Source presence identifies ownership; it does not certify every administrative operation, production permission assignment or provider action. Keep provider provisioning/recovery instructions in private operator runbooks.

Migration Guide​

LiveSession → MediaSession​

Tables renamed:

  • live_sessions → media_sessions
  • live_session_participants → media_session_participants
  • live_session_events → media_session_events
  • live_session_assets → media_session_assets
  • live_session_rate_limits → media_session_rate_limits

Columns renamed:

  • ai_sessions.live_session_id → ai_sessions.media_session_id
  • Related event, asset and participant tables also rename live_session_id to media_session_id.

Model updates:

// Old
use App\Models\LiveSession;
$aiSession->liveSession;

// New
use App\Models\MediaSession;
$aiSession->mediaSession;

Migration and contributor verification​

The historical rename explains older LiveSession references; it is not a deployment procedure. Schema rollout, rollback, backups and post-deployment database checks belong in private operator runbooks and must follow the target release's migration history.

For contributor verification, use the platform repository's documented container-based development environment. Keep service-contract tests separate from deployed acceptance: database fixtures can establish persistence and transition behavior, while actual signaling, browser permissions, media frames, queue/channel delivery and provider playback require their own integration checks. The integration guide records the reviewed behavior and outstanding runtime boundaries.

Review evidence and acceptance limits​

This architecture was reconciled against the named models, migration, services, route registrations, event classes, SFU classes and frontend entry points. The companion repository audit is docs/group-chat-review-2026-10-14.md; inspected source hashes are recorded in docs/coverage/group-chat-source-snapshot.json. A document-only reader review confirmed the identity, failure, routing and recovery distinctions.

The integration overview retains 19 focused cases/76 assertions across separately scoped offline fixtures, including a disposable PostgreSQL wait-estimate query, SQLite contract cases and fake transport/provider boundaries. Those are not a full architecture or production acceptance suite. Actual route/channel authorization, browser capture and reconnect behavior, SFU traffic, GStreamer rebuild interruption, provider output, cleanup and concurrent allocation remain deployment/runtime acceptance work. Source review completion does not certify those outcomes.