This repository hosts the code for a chat application that utilizes Spring Boot for backend services and includes a client application. The backend is split into two services: auth-service
for managing user authentication, and chat-service
for managing chat messages. The client application provides a basic web interface built using React. All services are containerized using Docker and managed with Docker Compose. The application is accessed through a single entry point on port 80, which is managed by Nginx. Nginx serves the static files for the frontend application and also functions as an API gateway, managing communication with and between the backend services.
-
auth-service
: Handles user authentication. It uses Spring Security for authentication and JWT for maintaining user sessions. -
chat-service
: Handles chat messages. It uses MongoDB for storing messages and Redis for caching. -
chat-app-client
: A simple web interface for the chat application. It is built using React and uses STOMP Client for real-time communication with the chat service.
To get started with the application, you need to have Docker and Docker Compose installed on your machine. Once you have these prerequisites, you can clone the repository and use Docker Compose to build and run the application.
- Clone the repository:
git clone https://github.com/misterneo/spring-microservices-chat-app.git
cd spring-microservices-chat-app
- Build the services:
docker compose build
- Start the application
docker compose up -d
- Access the application at
http://localhost
To stop the application, run the following command:
docker compose down
This project is for demonstration purposes only. It is not intended for production use. If you have any suggestions for improvements, please feel free to open an issue or submit a pull request.
This project is licensed under the MIT license. See the LICENSE file for more details.