ChatApp is a real-time web chat application built with Spring Boot, WebSockets, and STOMP for backend communication, along with a Bootstrap & JavaScript frontend. This application enables users to exchange messages in real-time using WebSockets.
- Real-time messaging using Spring WebSockets & STOMP
- Multiple users can send and receive messages instantly
- Dynamic UI updates without refreshing the page
- Bootstrap UI for a responsive and clean chat interface
- Enter key support for quick message sending
- Previous message fetching (if database integration is added)
- Java 8+
- Spring Boot (Web, WebSocket, STOMP, Thymeleaf)
- Maven (Dependency Management)
- HTML, CSS, Bootstrap 5 (UI Styling)
- JavaScript (Client-Side Logic)
- SockJS & STOMP.js (WebSocket Communication)
chatApp/
│── src/main/java/com/suhruth/ChatApp/
│ ├── controller/ChatController.java # WebSocket Controller
│ ├── controller/model/ChatMessage.java # Chat Message Model
│── src/main/resources/static/
│ ├── chat.html # Chat UI
│ ├── test-image.png # Test Image File
│── pom.xml # Project Dependencies
│── README.md # Project Documentation
- User opens the chat page (
/chat). - WebSocket connection is established when the page loads.
- Users enter their name & message and press Send or hit Enter.
- Message is sent to the WebSocket endpoint (
/app/sendMessage). - Spring Boot broadcasts the message to all connected users via STOMP (
/topic/messages). - All clients receive and display the message instantly.
git clone https://github.com/SuhruthY/chatApp.git
cd chatAppmvn spring-boot:runVisit http://localhost:8080/chat in your browser.
- ✅ Store chat history in a database (MySQL/PostgreSQL)
- ✅ Add user authentication (Spring Security)
- ✅ Improve UI with real-time user presence indicators
Pull requests are welcome! Feel free to fork the repository and create new features. If you find any issues, please open an issue.
This project is open-source under the MIT License.
💡 Developed by Suhruth Yambakam 🚀
