Skip to content

This project is a modern, real-time chat application designed for reliability and scalability. It uses SockJS and STOMP.js on the frontend to ensure seamless WebSocket communication, falling back gracefully if native WebSockets are unavailable. The backend is developed with Java Spring Boot.

License

Notifications You must be signed in to change notification settings

winter000boy/Chat-Application

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Chat Application

A high-level, real-time chat application built with modern web technologies. The project leverages SockJS and STOMP.js (using the STOMP protocol) for robust WebSocket communication, and is powered by a Java Spring backend.


Features

  • Real-Time Messaging: Instant chat using WebSockets for low-latency communication.
  • SockJS & STOMP.js: Ensures reliable messaging even when native WebSockets are not available.
  • Spring Boot Backend: Scalable and production-ready server logic written in Java.
  • STOMP Protocol: Standard messaging protocol for interoperability and reliability.
  • User-Friendly Interface: Modern, responsive front-end for seamless chatting.

Tech Stack

  • Frontend
    • SockJS: WebSocket emulation for reliable real-time messaging.
    • STOMP.js: Implements STOMP protocol over WebSockets.
    • JavaScript, HTML, CSS (Framework/library can be specified if used)
  • Backend
    • Java Spring Boot: RESTful API and WebSocket/STOMP endpoint management.
    • Spring WebSocket, Spring Messaging

Getting Started

Prerequisites

  • Java 11 or higher
  • Node.js & npm (if building the frontend separately)
  • Maven or Gradle for managing backend dependencies

Running the Application

Backend (Spring Boot)

  1. Clone the repository:

    git clone https://github.com/winter000boy/Chat-Application.git
    cd Chat-Application
  2. Build and run the backend:

    ./mvnw spring-boot:run

    Or, if using Gradle:

    ./gradlew bootRun

Frontend

  • If the frontend is a separate project, follow its README or serve the static files as specified.

Architecture Overview

  • Client establishes a connection using SockJS.
  • STOMP.js is used to communicate with the backend using the STOMP protocol.
  • Spring Boot handles messaging, authentication, and business logic.
  • WebSocket endpoints are managed by the backend, ensuring real-time delivery.

Example WebSocket Flow

  1. Client connects to /ws endpoint via SockJS.
  2. STOMP.js subscribes to relevant chat topics (e.g., /topic/messages).
  3. Users send/receive messages in real time.

Contributing

Contributions are welcome! Please fork the repo and submit a pull request.


License

This project is licensed under the MIT License.


References

About

This project is a modern, real-time chat application designed for reliability and scalability. It uses SockJS and STOMP.js on the frontend to ensure seamless WebSocket communication, falling back gracefully if native WebSockets are unavailable. The backend is developed with Java Spring Boot.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published