I followed a tutorial on YouTube to build this multiple user chat application. You can watch the tutorial for detailed instructions on how to create a similar application:
Github by Bouali Ali
!! Docker file is changed
services:
mongodb:
image: mongo
container_name: mongo_db
ports:
- 27017:27017
volumes:
- mongo:/data
environment:
- MONGO_INITDB_ROOT_USERNAME=fatih
- MONGO_INITDB_ROOT_PASSWORD=fatih
mongo-express:
image: mongo-express
container_name: mongo_express
restart: always
ports:
- 8081:8081
environment:
- ME_CONFIG_MONGODB_ADMINUSERNAME=fatih
- ME_CONFIG_MONGODB_ADMINPASSWORD=fatih
- ME_CONFIG_BASICAUTH_USERNAME=fatih
- ME_CONFIG_BASICAUTH_PASSWORD=fatih
- ME_CONFIG_MONGODB_SERVER=mongodb
volumes:
mongo: { }
During the development of this application, I utilized the following technologies:
- Spring Boot: A powerful Java framework for building web applications.
- WebSocket: A communication protocol for real-time, full-duplex communication between a client and a server.
- STOMP (Simple Text Oriented Messaging Protocol): A messaging protocol that defines the format and rules for data exchange.
- SockJS: A JavaScript library that provides a WebSocket-like object in browsers that don't support WebSocket.
- MongoDB: A NoSQL database program, MongoDB stores data in flexible, JSON-like documents.
- Docker: Docker provides a way to package and distribute software in containers, making it easier to deploy and run applications consistently across different environments.
- Clone this repository to your local machine.
- Make sure you have Java and Maven installed.
- Navigate to the project directory in your terminal.
- Run the following command to start the application:
mvn spring-boot:run
Here are some screenshots of the chat application:
For further information, you can refer to the following resources:
- Spring Framework Reference Documentation: You can explore the official documentation for detailed information about Spring Boot and other Spring technologies.
- WebSocket API Documentation: Visit the WebSocket API documentation on MDN Web Docs for more information about WebSockets.
- MongoDB Documentation: The official MongoDB documentation provides comprehensive guides and references for using MongoDB.
- Docker Documentation: Explore Docker documentation for detailed instructions on how to use Docker for containerization and deployment.