This repository contains a complete real-time chat infrastructure using Spring Boot, Angular, and Keycloak, all orchestrated through an Nginx Reverse Proxy.
- Nginx (Port 443): The entry point for all traffic. Handles SSL termination and routes requests to the appropriate service.
- Keycloak (/auth): Identity and Access Management (IAM) for secure user authentication.
- Backend (/api & /ws): Spring Boot application handling business logic and real-time WebSocket communication.
- Frontend (/): Angular application served securely via HTTPS.
- PostgreSQL: Database for persisting messages and user metadata.
- Docker & Docker Compose installed.
- OpenSSL installed (to generate local security certificates).
Because security keys are not tracked in Git, you must generate a local self-signed certificate for Nginx to start correctly.
Run this command from the project root:
# Ensure the directory exists
mkdir -p ./chat-app-ui/ssl
# Generate the certificates
openssl req -x509 -nodes -days 365 -newkey rsa:2048 \
-keyout ./chat-app-ui/ssl/server.key \
-out ./chat-app-ui/ssl/server.crt \
-subj "/CN=localhost"