Appearance
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.graphqlhiện đang để trống - 1 workspace hội thoại chính gắn với
ConversationDetail
Actors & Permissions
| Nhóm chức năng | Ghi chú |
|---|---|
| Conversation runtime | Route tồn tại nhưng navigation trong module.ts hiện đang comment |
| Provider integration | Stringee / Twilio / conference wrappers |
Feature Groups
| Group | Mô tả |
|---|---|
| Conversation Detail Workspace | Gồ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
| Service | Vai trò |
|---|---|
| conversation-api | Actions cho Stringee, Twilio, conference/token |
| controller (Hasura) | Conversation tables, unread/search functions |
Databases
| DB | Key tables / functions |
|---|---|
| conversation | conversation, 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.tshiệ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