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-web
Install dependencies:
npm install
Start the development server:
npm run dev
The 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=local
The 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 up
After 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:9092
Run all services in a production-like configuration:
docker compose -f docker-compose-prod.yml up
Start Minikube:
minikube start
Load 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:latest
Apply 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.yml
Use port forwarding so that both www and the api can be reached inside the cluster:
kubectl port-forward service/api 8080:8080
Open www:
minikube service www