Skip to content

SDD-005 — Interaction & Conversation System

Horizontal platform capability (như Identity, Notification, Evidence) — một Interaction Service dùng chung; cấm mỗi school/module tự xây comment riêng.

2. Entities & Targets (REQ-INX-01)

Interaction: Comment · Reply · Reaction · Mention · Annotation · Activity.

text
Comment: comment_id · author_id · target_type · target_id · parent_comment_id
· content · created_at · edited_at · visibility · status

target_type + target_id áp cho gần như mọi object: Learning Experience, Assessment (vd assessment_result/asr_28392), Lab, Question, Recommendation, Learner Report, Learning Package, Goal, Evidence, Mentor Session, Community Post, Media. Ví dụ luồng chuẩn: Parent comment dưới Recommendation → Mentor reply → Learner react/hỏi tiếp — conversation gắn với đúng object đó (REQ-PAR-07).

3. Threading (REQ-INX-02)

Data model hỗ trợ nesting đệ quy; UI giới hạn 1–2 cấp.

4. Visibility & Permission (REQ-INX-03, REQ-MEN-02)

Levels: private · learner_parent · mentor_team · school · community · internal_staff. Mentor note "có dấu hiệu đoán đáp án" = internal_staff, learner không thấy. Authorization ở backend theo relationship user↔learner (family, assignment).

5. Mentions & Notifications (REQ-INX-04)

@mentor @parent @learner → events CommentCreated, MentionCreated, ReplyCreated, ReactionAdded → Queue nemo12-events → Notification module → in-app, email, push (mobile-ready).

6. Moderation — K12 bắt buộc (REQ-INX-05)

Profanity/abuse/spam/inappropriate detection (AI classify qua AI Gateway) + report/hide/block + moderation queue + audit log. Quyết định nghiêm trọng: lưu evidence + human review. Pattern hidden_at (soft-hide) kế thừa sutucon.

7. Activity Stream (REQ-INX-06)

Mọi interaction tạo Activity Event → Learner Activity Timeline (Parent commented, Mentor replied, Learner completed lab, Recommendation acknowledged…) — feed cho Learner Model & Parent Model (SDD-002), và telemetry (login/page_view/course_open — FEAT-050) nhập cùng dòng behavior evidence.

8. Pending (⏳)

Vote up/down + mentor featured exemplars trên submissions (REQ-INX-07, Q-047) — schema dự phòng interaction_votes, bật khi được xác nhận.

Trace

REQMục
REQ-INX-01..06§2–§7
REQ-PAR-07§2
REQ-MEN-02§4