A real-time web-based chat application built using Spring Boot and WebSocket technology, enabling multiple users to communicate instantly through a browser-based interface. The application uses STOMP over WebSocket with SockJS fallback support, a server-rendered frontend using Thymeleaf, and a responsive UI built with HTML and Bootstrap.
- Real-time messaging using WebSockets
- STOMP-based message broker architecture
- SockJS fallback for browsers without native WebSocket support
- Simple and responsive user interface
- Server-side rendering with Thymeleaf
- Lightweight and easy to extend
Backend
- Java
- Spring Boot
- Spring Web
- Spring WebSocket
- STOMP Protocol
- Lombok
Frontend
- HTML5
- Bootstrap
- Thymeleaf
- JavaScript
Additional technologies used:
- STOMP for structured messaging
- SockJS for WebSocket fallback support
- Clients connect to the server via WebSocket endpoints.
- Messages are sent using the STOMP protocol.
- The server broadcasts messages to subscribed clients.
- SockJS ensures compatibility across different browsers.
- Thymeleaf renders the initial UI, while JavaScript handles live message updates.
- Clone the repository:
git clone https://github.com/sonjyoti/Real-Time-Chat-App.git- Navigate to the project directory:
cd Real-Time-Chat-App/app- Run the application:
mvn spring-boot:run- Open your browser and visit:
http://localhost:8080/chat- User authentication and authorization
- Private (one-to-one) messaging
- Message persistence using a database
- Online/offline user status
- Typing indicators
- Message timestamps and read receipts
This project demonstrates:
- Practical use of Spring Boot WebSockets
- Real-time messaging with STOMP
- Client-server communication patterns
- Integration of frontend and backend in a single application
- Server broadcasts messages to subscribed topics.
- All connected clients receive updates in real time.
