src/sockets/socket-manager.ts
Initialization
initializeSocket(io) registers connection handler on the shared Socket.IO Server instance created in app.ts.
User → socket mapping
Clients connect with query paramuserId:
userSocketMap: Map<userId, socketId[]> for targeted emits (e.g. profile updates).
Connection handlers
Listener registration (once)
Called during app bootstrap after Mongo connects.