This repository contains the WhisperWire chat application, consisting of a web frontend, backend API, and supporting infrastructure.
/
├── ww-web/ # Frontend application
├── ww-api/ # Backend API service
└── infrastructure/ # Infrastructure configuration
- Node.js (v23 or higher)
- Java 23
- Docker and Docker Compose (eg. through Docker Desktop)
- IntelliJ IDEA (recommended for backend development)
- Minikube (for local Kubernetes development)
Navigate to the frontend directory:
cd ww-webInstall dependencies:
npm installStart the development server:
npm run devThe application will be available at http://localhost:5173/conversations/1.
You can specify the user name by changing the query parameter userName, eg. go to http://localhost:5173/conversations/1?userName=Frodo
- Open the ww-api directory in IntelliJ IDEA
- Let the IDE sync the Gradle dependencies
- Add a run/debug configuration (if it doesn't pick it up automatically from
.run/Start dev server.run.xml) with:
./gradlew bootRun SPRING_PROFILES_ACTIVE=localThe API will be available at http://localhost:8080.
The application requires Zookeeper, Kafka, and PostgreSQL. Start these services using Docker Compose:
cd infrastructure
docker compose upAfter starting with docker compose, create the required Kafka topic:
docker exec -it kafka kafka-topics \
--create \
--topic test-topic \
--partitions 1 \
--replication-factor 1 \
--bootstrap-server localhost:9092Run all services in a production-like configuration:
docker compose -f docker-compose-prod.yml upStart Minikube:
minikube startLoad the images into minikube (given that you've built them through docker compose above, if not, do that first through docker compose -f docker-compose-prod.yml build):
minikube image load wwapi:latest
minikube image load wwweb:latestApply infrastructure configurations:
kubectl apply -f persistent-volumes.yml
kubectl apply -f persistent-volume-claims.yml
kubectl apply -f zookeeper.yml
kubectl apply -f kafka.yml
kubectl apply -f postgres.yml
kubectl apply -f jobs/kafka-topic-init.yml
kubectl apply -f api.yml
kubectl apply -f www.ymlUse port forwarding so that both www and the api can be reached inside the cluster:
kubectl port-forward service/api 8080:8080Open www:
minikube service www