AOSSIE-Org / AOSSIE-Org/Resonate-Backend

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

Đang mở
#148 2 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
JavaScript
Star
43
Fork
120
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

### 🚀 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

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.