This repository demonstrates how to build a real-time notification system using Spring Boot and WebSocket. It is designed for instant updates in applications such as chat systems, order tracking, and admin-triggered notifications.
- Real-Time Communication: Bi-directional WebSocket communication between clients and the server.
- Order Tracking System: Track order statuses in real-time with step-wise progress indicators.
- Admin Dashboard: Allows admins to send bulk notifications or update order statuses.
- Scalable Architecture: Designed for flexibility and growth, with optional integration for messaging queues.
- Client Feedback System: Collect star ratings from users once orders are completed.
Repository: Real-Time-Notifications-Springboot-Websocket
- Backend:
- Spring Boot
- WebSocket with STOMP for real-time communication
- Maven for project management
- Frontend:
- HTML, CSS, JavaScript for static clients
- Font Awesome for icons
- Optional Enhancements:
- Integration with RabbitMQ/Kafka for distributed messaging
- RESTful APIs for further backend capabilities
Follow the steps below to set up and run the application:
- Java 17 or later installed
- Maven installed
- A web browser for testing the frontend clients
- Clone the repository:
git clone https://github.com/18-RAJAT/Real-Time-Notifications-Springboot-Websocket.git cd Real-Time-Notifications-Springboot-Websocket
- Build the project:
mvn clean install
- Run the application:
mvn spring-boot:run
- Open the client files in a browser:
- Client Page: Open
client1.html
fromsrc/main/resources/templates/
- Admin Panel: Open
admin.html
from the same directory
- Client Page: Open

- The server establishes WebSocket connections with clients using the STOMP protocol.
- Clients subscribe to a notification topic (
/status/notification
) for real-time updates.
- Displays step-wise progress (e.g., "Order Received," "Order Dispatched").
- Automatically updates client pages when order statuses are updated by the admin.
- Provides a simple interface for admins to trigger notifications.
- Updates the status of orders in bulk or individually.
- Clients can rate their experience after an order is delivered.
- Displays a star-based rating widget.
src/
├── main/
│ ├── java/
│ │ └── com.rajat/
│ │ ├── config/
│ │ │ └── WebSocketConfig.java
│ │ ├── controller/
│ │ │ ├── NotificationController.java
│ │ └── NotificationSystemApplication.java
│ └── resources/
│ ├── static/
│ └── templates/
│ ├── admin.css
│ ├── admin.html
│ ├── admin.js
│ ├── client1.css
│ ├── client1.html
│ └── client1.js