Skip to content

This repository contains the source code for a chat application built with Spring Boot for the backend services and a client application.

Notifications You must be signed in to change notification settings

misterneo/spring-microservices-chat-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Spring Boot Chat Application

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.

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.

Application Architecture Diagram

diagram

Getting Started

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.

Running the Application

  1. Clone the repository:
git clone https://github.com/misterneo/spring-microservices-chat-app.git
cd spring-microservices-chat-app
  1. Build the services:
docker compose build
  1. Start the application
docker compose up -d
  1. Access the application at http://localhost

Stopping the Application

To stop the application, run the following command:

docker compose down

Disclaimer

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.

License

This project is licensed under the MIT license. See the LICENSE file for more details.

About

This repository contains the source code for a chat application built with Spring Boot for the backend services and a client application.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published