Skip to content

Conversation Module

Mục đích

Cung cấp lớp hội thoại realtime: danh sách conversation, message stream, conference/call provider wrappers và quyền truy cập hội thoại. Đây là module chat/call collaboration của Diva.

Quy mô

  • 1 FE page chính (ConversationDetail)
  • Nhiều component/provider/vendor wrapper cho list, message, Stringee và Twilio
  • GraphQL token ops nằm ở các composition files; graphql/conversation.graphql hiện đang để trống
  • 1 workspace hội thoại chính gắn với ConversationDetail

Actors & Permissions

Nhóm chức năngGhi chú
Conversation runtimeRoute tồn tại nhưng navigation trong module.ts hiện đang comment
Provider integrationStringee / Twilio / conference wrappers

Feature Groups

GroupMô tả
Conversation Detail WorkspaceGồm conversation list, messages, provider wrapper, conference dialog trong ConversationDetail.tsx và các component liên quan

Liên kết Modules

  • user — participant/account identities
  • notification — unread message, mention, push notifications tiềm năng
  • crm — call/chat context có thể liên quan customer operations

Backend Services

ServiceVai trò
conversation-apiActions cho Stringee, Twilio, conference/token
controller (Hasura)Conversation tables, unread/search functions

Databases

DBKey tables / functions
conversationconversation, conversation_member, conversation_message, conversation_message_reaction, unread/search functions

Đặc điểm kiến trúc

  • FE page count rất ít, nhưng phần lớn khả năng được gói trong provider wrappers (StringeeProviderWrapper, ConversationProvider).
  • useConversation.ts hiện gần như rỗng, cho thấy logic runtime chủ yếu đang nằm ở component/provider thay vì composition trung tâm.
  • Module có route shell nhưng chưa bật menu sidebar chính thức trong module.ts.
  • Runtime hiện đang tách thành 2 nhánh chính: Stringee cho hội thoại/video conference và Twilio cho overlay cuộc gọi từ conversationStore.

Deep Dives

  • runtime-and-provider-boundary — deep-dive audit cho workspace realtime, unread/search read models, Stringee/Twilio token-conference runtime và contract mismatch giữa FE, backend action và Hasura permissions