/chat-room

Primary LanguageJavaScript

Chat Application

A simple chat application built with Spring Boot, SockJS, STOMP, and React.js. This project demonstrates real-time communication between clients using WebSockets. The current implementation uses in-app memory for storing messages. Future improvements may include database integration and user authentication.

Features

  • Real-time messaging using WebSockets.
  • Public and private chat rooms.
  • Basic UI with React.js.
  • In-app message storage (no database).

Screenshots

image image

Technologies Used

  • Backend: Spring Boot
  • WebSocket: SockJS, STOMP
  • Frontend: React.js
  • Styling: CSS

Getting Started

Prerequisites

  • Java 11 or higher
  • Node.js and npm (Node Package Manager)

Setup

  1. Clone the Repository

    git clone https://github.com/yourusername/your-repository.git
    cd your-repository
  2. Backend Setup

    Navigate to the backend directory and run the following commands to build and run the Spring Boot application:

    cd backend
    ./mvnw clean install
    ./mvnw spring-boot:run

    The backend will run on http://localhost:8080.

  3. Frontend Setup

    Navigate to the frontend directory and install the required npm packages:

    cd frontend
    npm install

    Then, start the React development server:

    npm start

    The frontend will run on http://localhost:3000.

  4. Access the Application

    Open your browser and navigate to http://localhost:3000 to use the chat application.

Future Improvements

  • Integrate a database for message storage.
  • Add user authentication and authorization.
  • Improve UI/UX and responsiveness.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgements