Skip to content
This repository was archived by the owner on Mar 29, 2022. It is now read-only.

Repository files navigation

Simple Chat-App using ReactJS, STOMP, Java SprintBoot with H2-Database containerized in Docker.

Pre-Requisites

  • Docker

Run the application

  1. docker-compose -f docker-compose.prod.yml build to build the containers
  2. docker-compose -f docker-compose.prod.yml up -d to run the containers
  3. (http://localhost:3000) to access the application

Commands

docker-compose [-f docker-compose.prod.yml] build to build the containers [in production mode]
docker-compose [-f docker-compose.prod.yml] up [-d] to start up the [production] containers [in detached mode]
docker-compose down to tier down the containers
Further commands can be found on the official Docker documentation website

Configurations

"docker-compose.yml" containing Docker config for development mode "docker-compose.prod.yml" containing Docker config for production mode

Open Points / Next Steps

  • Analyze Web-Security of the application in detail and take necessary actions
  • Show connection errors in UI
  • Simplify & optimize Docker configuration, eg. adding a .dockerignore file

Choices of Technology

Backend

DependencyReasonIdentified Risks
JavaBackend Technology as preferred in challenge description
SpringBootEfficiently create Controller, Services and RepositoryLots of hidden magic
SpringSecurityHandle general security incl. CORS
H2-DatabaseMost simple in memory database
MockitoSimplifying mocking of test classesInappropriate usage can facilitate violation of SOLID
JUnit5To test the application

Frontend

DependencyReasonIdentified Risks
ReactEfficiently develop Frontend applicationLacking support for very old browser versions
Material-UIEfficient creation of a good-looking, responsive designBig UI-framework (decreasing app performance)
Cross-FetchTo communicate with Backend using REST
STOMP.jsTo communicate with Backend using STOMP
SockJSTo communicate with Backend using STOMP
MomentTransforming dates - Do not reinvent the wheelRather large library, given that there is only one use case so far
JestTo test the application

About

Simple chat application using React, Spring Boot, WebSocket and Docker

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages