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.
- Real-time messaging using WebSockets.
- Public and private chat rooms.
- Basic UI with React.js.
- In-app message storage (no database).
- Backend: Spring Boot
- WebSocket: SockJS, STOMP
- Frontend: React.js
- Styling: CSS
- Java 11 or higher
- Node.js and npm (Node Package Manager)
-
Clone the Repository
git clone https://github.com/yourusername/your-repository.git cd your-repository
-
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
. -
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
. -
Access the Application
Open your browser and navigate to
http://localhost:3000
to use the chat application.
- Integrate a database for message storage.
- Add user authentication and authorization.
- Improve UI/UX and responsiveness.
This project is licensed under the MIT License - see the LICENSE file for details.
- Spring Boot Documentation: Spring Boot
- React.js Documentation: React.js
- SockJS Documentation: SockJS
- STOMP Protocol: STOMP