NexChat: The Spring Boot Chat Stack That Treats Messaging, Calls, and AI Summaries as One System

A real-time Java backend that uses WebSockets for chat, WebRTC signaling for calls, and Gemini for conversation summaries, all wrapped in JWT security and rate limits.

8 min read • View on GitHub • More from krishna-1000

A central switchboard-like server routes three kinds of traffic at once: room-wide chat messages, user-specific call signals, and a small chamber that compresses long conversations into a short summary. The image explains that NexChat is not just a messenger, but a backend that coordinates multiple real-time communication flows.
NexChat’s core idea is structural: one backend, three communication paths.
Key Takeaways

Why NexChat Is More Than a Chat App

Most chat backends solve one problem: move text from one user to another. NexChat stretches that idea into something larger. It treats chat as a communication control plane, where the same backend handles room broadcasts, WebRTC signaling, and AI-generated summaries.

That matters because these are not the same kind of workload. Broadcast chat wants fan-out. WebRTC signaling wants precise user-to-user routing. Summarization wants bounded batch processing. NexChat puts all three under one Spring Boot roof instead of scattering them across separate services.

The repo also shows a clear bias toward production habits. JWT access and refresh tokens, WebSocket authentication at connect time, OTP verification, BCrypt, rate limiting, Actuator, and structured DTO mapping all suggest a backend that is trying to behave like a product, not a demo.

The Real-Time Core: Messages and WebRTC Signaling Share the Same Spine

The real surprise in NexChat is that the WebSocket layer is not just a chat pipe. It is the transport spine for two distinct real-time jobs: group messaging and WebRTC signaling. That keeps the real-time surface area small, even while the product surface grows.

One transport layer, three workflows. NexChat uses the same real-time spine for broadcast chat, call signaling, and summary generation.

@MessageMapping("/chat.send")
public void sendMessage(@Payload ChatMessageDto message) {
    chatService.save(message);
    messagingTemplate.convertAndSend("/topic/room." + message.getRoomId(), message);
}

@MessageMapping("/webrtc.signal")
public void handleWebRtcSignal(@Payload WebRtcRequest request) {
    messagingTemplate.convertAndSendToUser(
        request.getTargetUserId(),
        "/queue/webrtc",
        request
    );
}