AOSSIE-Org / AOSSIE-Org/Resonate-Backend

Add backend support for real-time in-room text chat

未关闭
#148 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
JavaScript
星标
43
派生
120
PR 合并指标
30 天内没有已合并 PR

描述

### 🚀 The feature
Resonate currently supports real-time voice rooms, but there is no backend infrastructure to support text-based communication within rooms.

This proposal introduces **backend support for real-time in-room text chat**, enabling clients to send, receive, and moderate text messages during active voice rooms.

This issue complements the frontend feature request opened in the Resonate app repository for in-room text chat.

---

### Problem statement
At present:
- There is no backend mechanism to handle real-time text messages in rooms
- Messages cannot be persisted or synchronized across participants
- Moderation actions (delete, mute, block) cannot be enforced server-side

Without backend support, any frontend chat implementation would be incomplete and unreliable.

---

### Proposed solution

#### Core backend responsibilities
- Provide real-time message delivery to all participants in a room
- Persist a limited message history per room
- Enforce access control and moderation rules

#### Suggested implementation scope
- Define a `RoomMessage` data model with fields such as:
- `id`
- `room_id`
- `sender_id`
- `content`
- `timestamp`
- `is_deleted`
- Implement real-time message transport using:
- WebSockets, or
- existing real-time infrastructure already used by the backend
- Store the last N messages per room (e.g., 50–100)
- Load recent message history when a user joins a room

---

### Moderation & security
Backend should enforce:
- Message deletion by room moderators
- Temporary chat mute at room level
- Blocking muted or banned users from sending messages
- Authorization checks to ensure only room participants can post messages

Moderation logic must be handled server-side, not only in the client.

---

### Acceptance criteria
- Messages sent by one participant are delivered to all active room participants in real time
- Message history is retrievable when joining an ongoing room
- Moderation actions are enforced consistently
- System remains stable under concurrent room usage
- Backend APIs or socket events are documented

---

### Impact
- Enables a critical missing feature in Resonate voice rooms
- Improves accessibility and engagement
- Provides a secure and scalable foundation for future features such as reactions, threads, and notifications
- Aligns with long-term roadmap and GSoC-sized contributions

---

### References
- Related frontend issue: https://github.com/AOSSIE-Org/Resonate/issues/730

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。