How nqtrang1801/whats-app-spring works
Main Components
• Frontend (Angular 19): This is the client-side single-page application. It includes the application’s pages (such as the main chat page), components (e.g., chat-list), services (e.g., for API calls and Keycloak integration), and configuration files.
• Backend (Spring Boot): This component comprises various packages dealing with chat, messaging, user handling, files, notifications, security (with Keycloak integration), WebSocket configuration, and supporting layers such as controllers and services.
• External Systems & Integrations: This includes:
• Keycloak server: Provides authentication and authorization.
• PostgreSQL Database: Used by the backend via Spring Data JPA for storing users, chats, messages, etc.
• WebSockets: For real-time messaging. This is implemented within the Spring Boot backend.
Architectural Patterns and Principles
• Separation of Concerns: Emphasize that the UI, business logic, security, and data layers are cleanly separated.
• Modular Design: Both the frontend and backend directories are well-structured into modules/services, following patterns like MVC or service-based design.
• Real-Time Communication: Clearly show that WebSocket is an integral part of the backend layer which directly interacts with the Angular frontend.
• Security Integration: Mark the Keycloak authentication layer as essential for both frontend login/sign-up and backend protected endpoints. Also indicate the presence of token interceptors on the frontend and KeycloakJwtAuthenticationConverter/configurations on the backend.
Technologies, Frameworks, and Libraries
• Frontend: Angular 19, RxJS, Angular Material.
• Backend: Spring Boot, Spring Security, Spring Data JPA, and WebSockets.
• Database: PostgreSQL.
• Authentication: Keycloak.
• Containerization/Deployment: Docker Compose (as evident from the docker-compose.yml) for orchestrating multi-container setups.