frontend/src/components/ChatList/index.js:8 renders the left rail of conversations and calls setCurrentChat when a user picks one.
frontend/src/components/ChatWindow/index.js:73 loads history with getMessages(chatId, token, page) and pushes new messages via sendMessage at line 240.
Utility hooks listen for socket.io events declared in frontend/src/_helper/ChatSocketListener.js, incrementing unread counts unless the active chat matches the payload.
frontend/src/api/chatApi.js:8 defines GET /chat for the user�s chat roster, GET /chat/{chatId} for message history, and POST /chat/send/{chatId} for outbound messages.
Routes are prepared in backend/r/chat.js, but they are currently commented out pending infrastructure enablement; toggling chat requires re-enabling this router in server.js.
The associated controller (backend/controllers/chatController.js) already implements request acceptance, messaging, and unread counters backed by PostgreSQL and Redis.
Because the HTTP endpoints are inactive by default, the frontend gracefully falls back to �Chat not found� (frontend/src/components/ChatWindow/index.js:176) when responses fail.
Chat sockets use room names matching chat_id; reconnections re-join all active rooms by iterating over getChatUsers.
When enabling chat server-side, ensure CORS and rate-limit settings match the rest of the API�we share the same cookie and session configuration.