Project description
TranslatedTechnically we expect WebSocket transport for live delivery with a reasonable fallback option and automatic reconnection on connection loss. Messages must be persisted in the database so chat history loads correctly when reopening a conversation, and delivery should be ordered and deduplicating even on unstable networks. We need a typing indicator, 'delivered' and 'read' statuses for each message, unread counters per chat, and presence (online, last seen). Attachments are important: users should be able to send images and documents with previews and safe size limits. When the recipient is offline or the tab is closed, a push notification alerts them to the new message. The backend should rely on our current user accounts and access permissions rather than introducing a separate auth system.
We consider security and abuse prevention part of the task: authenticated socket connections tied to active sessions, permission checks (a user reads only threads they participate in), input sanitization against XSS when displaying messages, and basic rate limiting against spam. We expect clean documented code in our current stack, brief integration instructions, and tests for main scenarios.
— Private and group chats with participant management
— WebSocket delivery with reconnection and offline fallback
— Typing indicator, delivery/read statuses, unread counters, presence
— Image and document attachments with previews and size limits
— Push notifications for offline recipients
— History, ordering, deduplication and message persistence
— Session-bound sockets, per-thread permission checks, XSS protection, rate limiting