ChatApp is a simple local network chatroom application built with Java 17, Spring Boot, and WebSockets. It enables real-time, bidirectional messaging between clients on the same LAN using STOMP over WebSocket.
- ☕ Java JDK 17
- 🌱 Spring Boot 3.5.3
- 🔄 WebSocket (STOMP protocol)
- 🧩 SockJS (WebSocket fallback)
- ✍️ Lombok
- 📦 Maven
- 💬 Real-time messaging over LAN
- 🔁 Bi-directional communication using WebSockets
- 🕒 Timestamped messages
- ⚡ Lightweight Spring-based architecture
- 🎨 Fully functional front-end (HTML, CSS, JS)
chatapp/
├── src/
│ └── main/
│ ├── java/com/jose/chatapp/
│ │ ├── config/WebSocketConfig.java # WebSocket configuration
│ │ ├── controller/ChatController.java # Message handler
│ │ ├── model/ChatMessage.java # Message model
| | └── ChatappApplication.java # main()
│ └── resources/static/
│ ├── index.html # Web UI
│ ├── app.js # Front-end logic
│ └── main.css # Stylesheet
├── pom.xml # Maven dependencies and build
└── README.md # Project documentation
- Java 17+
- Maven
git clone https://github.com/your-username/chatapp.git
cd chatapp
mvn spring-boot:runThen open http://localhost:8080 in your browser.
- Clients connect to the WebSocket endpoint at
/ws(with SockJS fallback). - Messages are sent to
/app/chat. - The server adds a timestamp and broadcasts the message to all subscribers on
/topic/messages. - The front-end receives and displays messages in real time.
-
Works only on the local network (LAN).
-
❌ No authentication or message persistence.
-
⚠️ Messages are not encrypted — use only for learning or internal LAN communication. -
Can be extended with:
- JWT Authentication
- HTTPS support
- User login system
- Chat rooms
- 👥 Private & group chats (chat rooms)
- 🔐 User authentication & login
- 🔒 Encrypted TLS communication
- 💡 Front-end revamp (React, Angular, etc.)
- 💾 Message history persistence
MIT License © José Barroso